

API for creating random users in your application - aram
http://randomuser.me/

======
patio11
So a lesson from when I was young and stupid: If you make fake data, it's
often advantageous to make it obviously fake data. If, in a fit of boredom,
you decide to do something _clever_ and e.g. generate plausible names and
birthdates for fake students by using government lists for the most common
names and surnames for people born that year, and you e.g. hypothetically
leave 6 pages of no-actual-human-involved fake data sitting on an office
printer, you might hypothetically end up in a very awkward conversation with
the local person in charge of regulated data breaches.

~~~
masklinn
> So a lesson from when I was young and stupid: If you make fake data, it's
> often advantageous to make it obviously fake data.

A second one: if you make fake data, it's aways advantageous to make it _edge-
case_ fake data. Your generator should break more or less every falsehood
programmers believe about names[0]

[0] [http://www.kalzumeus.com/2010/06/17/falsehoods-
programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/)

~~~
mkenyon
Masklinn, I have to point out that patio11 wrote the article to which you
linked!

------
jokull
Very cool! Limited to US only though. Check out behindthename.com/api/ if you
need country distribution. Had to map country codes to groups of names. Let me
know if you need this data. I’ve got some scripts to generate random users,
although not address or picture data.

------
Aarvay
I use Faker :) [http://faker.rubyforge.org/](http://faker.rubyforge.org/)

~~~
rabino
Or the PHP port which is awesome:
[https://github.com/fzaninotto/Faker](https://github.com/fzaninotto/Faker)

------
paulnechifor
I did a similar thing for Romanian identities [1]. Then I discovered that some
are way more extensive [2] [3].

[1] [http://minimul.ro/identitate-falsa](http://minimul.ro/identitate-falsa)

[2] [http://fakenamegenerator.com](http://fakenamegenerator.com)

[3]
[http://www.datafakegenerator.com/generador.php](http://www.datafakegenerator.com/generador.php)

------
cdcarter
Providing an md5 hash of the example password is just asking for bad password
models in new apps! Users, don't use the provided hashes, instead run the user
and password through the exact sign-up method real user data will go through.

------
Chetane
Cool idea! Btw, your Ajax code snippet won't work, 'return' is a reserved
keyword :) I would suggest using 'data' or 'response' instead for your
variable name.

------
aram
Disclaimer: I'm not the creator and I'm not associated in any way with the
project. Just found it interesting and posted here.

------
andyhmltn
On the example, it displays the gender as male and the title as 'mrs' \- Is
this a typo or an actual response?

~~~
andyhmltn
Just to help: The title isn't being updated on the ajax call :-) Everything
else is so 50% of the time it's correct 50% it's wrong haha

------
theandym
For Rails Rumble last year I created a Rails app for generating test data in
various formats. It definitely isn't as polished as this (only had 48 hours),
but allows for the user to specify their own format. After the competition I
cleaned it up a bit more and converted the data generation functionality into
a standalone Ruby gem. I'd appreciate any feedback...

App: [http://proglipsum.com/](http://proglipsum.com/)

Gem:
[https://github.com/theandym/mannequin](https://github.com/theandym/mannequin)

------
jlebrech
cool, I could make a dating site with this ;)

------
chrisbridgett
Neat little API. Would be cool if there were a way to generate users with a
particular locale - e.g. so I could generate UK users with UK addresses,
telephone numbers, etc.

------
BetaCygni
Isn't parsing the JSON and converting to your own data format more work than
just generating random users yourself?

~~~
chrisbridgett
Doesn't seem like much work at all to me, compared to creating random users.

Then again, maybe it's just me that isn't creative enough to be able to come
up with names other than "Test User", "Another User", "Somebody Else", etc.
:-p

~~~
gog
There is a library called Faker that can do this for you. It exists for perl,
ruby, php and probably other languages.

I am interested in where do this pictures come from? Did these people give
their permission to be used like this?

~~~
C1D
If you scroll to the bottom of the page you can see he got them from Greg
Peverill-Conti's 1,000 faces project, which is licensed under Creative Commons
BY-NC-SA 2.0,

------
C1D
Even though the pictures are under Creative Commons BY-NC-SA 2.0 I do feel
right using them and it seems like a lot of work to parse the data into your
own website, there are server side libraries that can do this for you.

------
ismaelc
Test console for easy testing - [https://www.mashape.com/community/random-
user-generator#!doc...](https://www.mashape.com/community/random-user-
generator#!documentation)

~~~
pdq

      You don't have permissions to see or consume this API.

------
martin-adams
Very nice idea. Anyone know of an equivalent for fake e-commerce product data?

------
emeraldd
Huh, it looks like the api is ignoring the gender option entirely. It seems to
return a random gender no matter what the value of the gender parameter ....

------
um304
gender: "male", name: { title: "mrs", first: "james", last: "ramirez" },

Never knew "mrs" can be used as a male title.

~~~
polymatter
Never assume anything about names. Never attempt to validate them. It is
probably a good edge case (depending on the system in question).

I think a sibling comment has mentioned this, but it deserves repeating
([http://www.kalzumeus.com/2010/06/17/falsehoods-
programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-
believe-about-names/))

------
nirmel
all users are caucasian middle-aged people with anglo names? that's not so
random.

------
rhizome
Nasty negative left margin.

~~~
aram
It looks fine on my end; what browser/OS are you using?

~~~
rhizome
Android Chrome.

