Random User API
The Random User API generates fake random user data such as name, email, address, username for placeholders or application testing.
From 9,002 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 338ms | 358ms | 401ms | 758ms | 1010ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v2/randomuser GET
https://api.api-ninjas.com/v2/randomuser
Returns fake random user profiles. Supports customizable fields, filtering, and localization.
Parameters
countoptionalNumber of users to generate (1-30). Default: 10
genderoptionalFilter by gender:
"male","female","nonbinary", or"any". Default:"any"min_ageoptionalMinimum age (0-1000). Default: 0
max_ageoptionalMaximum age (0-1000). Default: 100
localeoptionalLocale for generating localized data (e.g.,
"en_US","de_DE","fr_FR"). Default:"en_US"fieldsoptionalComma-separated list of fields to include (e.g.,
"name,email,phone"). If not specified, all available fields are returned.excludeoptionalComma-separated list of fields to exclude from the response.
seedoptionalSeed value for reproducible random data generation.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of random user objects, or an error if the request is unsuccessful.
idUnique user identifier
usernameUsername
passwordPassword
emailEmail address
nameFull name
first_nameFirst name
last_nameLast name
full_nameFull name (alternative)
prefixPrefix, e.g. 'Mr.', 'Ms.' etc.
suffixSuffix, e.g. 'Jr.', 'PhD'
phonePhone number
cellCell phone number
addressMailing address
street_addressStreet address
cityCity
stateState
postal_codePostal code
countryCountry
latitudeLatitude
longitudeLongitude
timezoneTimezone
dobDate of birth
ageAge
genderGender
jobJob title
companyCompany name
company_emailWork/company email
ssnSocial security number
credit_cardCredit card number
credit_card_providerCredit card provider
ibanIBAN
ipv4IPv4 address
ipv6IPv6 address
mac_addressMAC address
user_agentUser agent string
urlURL
domainDomain name
picturePicture URL
avatarAvatar URL
uuidUUID
md5MD5 hash
sha1SHA1 hash
sha256SHA256 hash
localeLocale code
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/randomuser?count=1Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/randomuser?count=1" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the Random User API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Random User API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Random User API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Random User API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What are some use cases for the Random User API?
It generates fully fabricated user profiles for placeholders, UI mockups, and application or database testing without exposing real personal data. Pair it with the Random Image API for placeholder photos or the Lorem Ipsum API for filler text to build complete test fixtures.How do I generate users of a specific gender and age range?
Use thegenderparameter withmale,female,nonbinary, orany(the default), and set themin_ageandmax_ageparameters (each 0-1000) to bound the age range. You can also setcountto generate between 1 and 30 users per request; browse other generators in the API catalog.What fields does each random user include, and can I limit them?
Each user object includes identity fields likename,email, andusername, contact and location fields such asphone,address, andtimezone, plus technical placeholders likeuuid,ipv4,user_agent, andcredit_card. To trim the payload, passfieldswith a comma-separated whitelist (e.g.name,email,phone) or useexcludeto drop specific fields; for word-level placeholders see the Random Word API.Can I get reproducible or localized random user data?
Yes, pass theseedparameter to produce the same random data on every call for reproducible tests, and use thelocaleparameter (e.g.en_US,de_DE,fr_FR) to generate region-appropriate names and addresses. If you need localized first names for the same data, check out the Baby Names API.