RandomAPI has a new beta!

Please sign up at http://beta.randomapi.com for the new beta. The old beta (this site) is no longer accepting new users and will be shutting down November 2016.

It's like Lorem Ipsum, but with actual data

RandomAPI is a fully customizable random data generator that returns results in JSON/CSV/SQL/YAML via API.

Rather than testing out your applications with arbitrary data such as "asdf", "blah", "user1", etc., RandomAPI can help you produce realistic results that are unique to your applications.

Sign up for free!

0 results | 0 requests | 0 APIs | 0 Lists | 0 users
Since December 2014

Pricing

RandomAPI offers a few different tiers ranging from completely free up to $10 depending on the extent of your needs.

View details »

Security

HTTPS for secure tier upgrades and API calls as well as an extensive permissions system for your APIs and lists keeps your connection and content completely secure.

View details »

Sharing

Think you've made an API or list that may be beneficial for others? Publish it for others to use and copy for their APIs!

View details »

How it works

Step 1

Create your custom API with our easy to learn syntax.

This example to the right is actually the source code of the v 0.4.1 Random User Generator API from randomuser.me.

Hover over anywhere on the code to the right to get an explanation of what is going on ->
1.  user
2.  $base_url  = http://api.randomuser.me/portraits/
3.  $version   = 0.4.1
4.                                              
5.  gender     = {gender}
6.  name       = {array,3}
7.  title      = {if,{field,gender},==,male,mr,{list,fu0h1w}}
8.  first      = {if,{field,gender},==,male,{list,oy859x},{list,dowrrp}}
9.  last       = {list,1zcz06}
10. location   = {array,4}
11. street     = {random,numeric,1000,9999} {list,nofqxe}
12. city       = {list,zoocot}
13. state      = {list,fwypla}
14. zip        = {random,numeric,10000,99999}
15. email      = {field,first}.{field,last}{random,numeric,10,99}@example.com
16. username   = {list,yw3xy4}{list,vn6n1s}{random,numeric,1,999}
17. password   = {list,lk4fcw}
18. salt       = {random,special,1,8}
19. $pass_salt = {field,password}{field,salt}
20. md5        = {hash,md5,{$pass_salt}}
21. sha1       = {hash,sha1,{$pass_salt}}
22. sha256     = {hash,sha256,{$pass_salt}}
23. registered = {random,numeric,915148800,{timestamp}}
24. dob        = {random,numeric,0,504921600}
25. phone      = ({random,numeric,100,999})-{random,numeric,100,999}-{random,numeric,1000,9999}
26. cell       = ({random,numeric,100,999})-{random,numeric,100,999}-{random,numeric,1000,9999}
27. SSN        = {random,numeric,100,999}-{random,numeric,10,99}-{random,numeric,1000,9999}
28. picture    = {array,3}
29. $pic_id    = {random,numeric,0,{if,{field,gender},==,male,99,96}}
30. large      = {$base_url}/{if,{field,gender},==,male,men,women}/{$pic_id}.jpg
31. medium     = {$base_url}/med/{if,{field,gender},==,male,men,women}/{$pic_id}.jpg
32. thumbnail  = {$base_url}/thumb/{if,{field,gender},==,male,men,women}/{$pic_id}.jpg
33. version    = {$version}
                    
 

Step 2

Access your API by calling RandomAPI's backend with an API ID and API key and have your generated results returned in the format that you request.

$ curl 'https://randomapi.com/api/?key=ABCD-1234-EFGH-5678&id=yz535c&fmt=json'
{"results":[{"user":{"gender":"male","name":{"title":"mr","first":"aaron","last":"grant"},"location":{"street":"1451 walnut hill ln","city":"eureka","state":"iowa","zip":"96416"},"email":"aaron.grant12@example.com","username":"orangetiger719","password":"indon","salt":"fffmSvX0","md5":"cc008745fdcf70c87b8e2d64af9d4726","sha1":"10783c3838f8d28224d831c6596535b1aff803a0","sha256":"ac0488fa829cc3652922d91d0b1c499404375a0ff93d62db44b775cb030e778c","registered":"1267360033","dob":"317419916","phone":"(461)-560-9045","cell":"(672)-941-9490","SSN":"960-75-4615","picture":{"large":"http://api.randomuser.me/portraits/men/39.jpg","medium":"http://api.randomuser.me/portraits/med/men/39.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/men/39.jpg"},"version":"0.4.1"}}]}
                            
$ curl 'https://randomapi.com/api/?key=ABCD-1234-EFGH-5678&id=yz535c&fmt=sql'
INSERT INTO `user` (`gender`, `title`, `first`, `last`, `street`, `city`, `state`, `zip`, `email`, `username`, `password`, `salt`, `md5`, `sha1`, `sha256`, `registered`, `dob`, `phone`, `cell`, `SSN`, `large`, `medium`, `thumbnail`, `version`) VALUES ('male', 'mr', 'aaron', 'grant', '1451 walnut hill ln', 'eureka', 'iowa', '96416', 'aaron.grant12@example.com', 'orangetiger719', 'indon', 'fffmSvX0', 'cc008745fdcf70c87b8e2d64af9d4726', '10783c3838f8d28224d831c6596535b1aff803a0', 'ac0488fa829cc3652922d91d0b1c499404375a0ff93d62db44b775cb030e778c', '1267360033', '317419916', '(461)-560-9045', '(672)-941-9490', '960-75-4615', 'http://api.randomuser.me/portraits/men/39.jpg', 'http://api.randomuser.me/portraits/med/men/39.jpg', 'http://api.randomuser.me/portraits/thumb/men/39.jpg', '0.4.1');
                            
$ curl 'https://randomapi.com/api/?key=ABCD-1234-EFGH-5678&id=yz535c&fmt=csv'
gender,title,first,last,street,city,state,zip,email,username,password,salt,md5,sha1,sha256,registered,dob,phone,cell,SSN,large,medium,thumbnail,version
male,mr,aaron,grant,"1451 walnut hill ln",eureka,iowa,96416,aaron.grant12@example.com,orangetiger719,indon,fffmSvX0,cc008745fdcf70c87b8e2d64af9d4726,10783c3838f8d28224d831c6596535b1aff803a0,ac0488fa829cc3652922d91d0b1c499404375a0ff93d62db44b775cb030e778c,1267360033,317419916,(461)-560-9045,(672)-941-9490,960-75-4615,http://api.randomuser.me/portraits/men/39.jpg,http://api.randomuser.me/portraits/med/men/39.jpg,http://api.randomuser.me/portraits/thumb/men/39.jpg,0.4.1
                            
$ curl 'https://randomapi.com/api/?key=ABCD-1234-EFGH-5678&id=yz535c&fmt=yaml'
---
results:
- user:
    gender: male
    name:
      title: mr
      first: aaron
      last: grant
    location:
      street: 1451 walnut hill ln
      city: eureka
      state: iowa
      zip: "96416"
    email: aaron.grant12@example.com
    username: orangetiger719
    password: indon
    salt: fffmSvX0
    md5: cc008745fdcf70c87b8e2d64af9d4726
    sha1: 10783c3838f8d28224d831c6596535b1aff803a0
    sha256: ac0488fa829cc3652922d91d0b1c499404375a0ff93d62db44b775cb030e778c
    registered: "1267360097"
    dob: "317419916"
    phone: (461)-560-9045
    cell: (672)-941-9490
    SSN: 960-75-4615
    picture:
      large: http://api.randomuser.me/portraits/men/39.jpg
      medium: http://api.randomuser.me/portraits/med/men/39.jpg
      thumbnail: http://api.randomuser.me/portraits/thumb/men/39.jpg
    version: 0.4.1
...
                            
 

Step 3

Incorporate your generated data with your application for a more realistic testing experience.