NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server

Random User API

The Random User API generates fake random user data such as name, email, address, username for placeholders or application testing.

(4.4)

From 9,002 users

1,600+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
338ms358ms401ms758ms1010ms

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

  • count  optional

    Number of users to generate (1-30). Default: 10

  • gender  optional

    Filter by gender: "male", "female", "nonbinary", or "any". Default: "any"

  • min_age  optional

    Minimum age (0-1000). Default: 0

  • max_age  optional

    Maximum age (0-1000). Default: 100

  • locale  optional

    Locale for generating localized data (e.g., "en_US", "de_DE", "fr_FR"). Default: "en_US"

  • fields  optional

    Comma-separated list of fields to include (e.g., "name,email,phone"). If not specified, all available fields are returned.

  • exclude  optional

    Comma-separated list of fields to exclude from the response.

  • seed  optional

    Seed value for reproducible random data generation.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of random user objects, or an error if the request is unsuccessful.

  • id

    Unique user identifier

  • username

    Username

  • password

    Password

  • email

    Email address

  • name

    Full name

  • first_name

    First name

  • last_name

    Last name

  • full_name

    Full name (alternative)

  • prefix

    Prefix, e.g. 'Mr.', 'Ms.' etc.

  • suffix

    Suffix, e.g. 'Jr.', 'PhD'

  • phone

    Phone number

  • cell

    Cell phone number

  • address

    Mailing address

  • street_address

    Street address

  • city

    City

  • state

    State

  • postal_code

    Postal code

  • country

    Country

  • latitude

    Latitude

  • longitude

    Longitude

  • timezone

    Timezone

  • dob

    Date of birth

  • age

    Age

  • gender

    Gender

  • job

    Job title

  • company

    Company name

  • company_email

    Work/company email

  • ssn

    Social security number

  • credit_card

    Credit card number

  • credit_card_provider

    Credit card provider

  • iban

    IBAN

  • ipv4

    IPv4 address

  • ipv6

    IPv6 address

  • mac_address

    MAC address

  • user_agent

    User agent string

  • url

    URL

  • domain

    Domain name

  • picture

    Picture URL

  • avatar

    Avatar URL

  • uuid

    UUID

  • md5

    MD5 hash

  • sha1

    SHA1 hash

  • sha256

    SHA256 hash

  • locale

    Locale code

Sample Request Live Demo!

count
gender
min_age
max_age
locale

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=1

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    data:[
      {
        id:"ca91be7d-590d-487d-890e-5fce1230e71e",
        username:"bayers",
        password:"J!bBb0WS@h7D",
        email:"eric80@example.com",
        name:"Renee Hodges",
        first_name:"Anna",
        last_name:"Boyd",
        full_name:"Christine Molina",
        prefix:"Ms.",
        suffix:"PhD",
        phone:"(648)309-6667x7350",
        cell:"980.638.1668x1484",
        address:"953 Everett Locks Apt. 407, Paulstad, WA 71681",
        street_address:"61011 Adam Ville Apt. 459",
        city:"West Justinborough",
        state:"Louisiana",
        postal_code:"55582",
        country:"Macao",
        latitude:26.057296,
        longitude:-29.357945,
        timezone:"Europe/Simferopol",
        dob:"1941-12-06",
        age:88,
        gender:"nonbinary",
        job:"Advertising art director",
        company:"Rodriguez-Jones",
        company_email:"pconway@stewart-white.info",
        ssn:"386-91-0691",
        credit_card:"3500864529934943",
        credit_card_provider:"Maestro",
        iban:"GB42WOZH74182924370603",
        ipv4:"57.201.213.61",
        ipv6:"986a:fb21:ff0d:f106:c76e:8a9e:3d89:1d4a",
        mac_address:"d8:c1:a2:44:e0:ba",
        user_agent:"Opera/9.89.(X11; Linux x86_64; os-RU) Presto/2.9.161 Version/11.00",
        url:"http://swanson-diaz.com/",
        domain:"mcgee.com",
        picture:"https://picsum.photos/906/342",
        avatar:"https://picsum.photos/200/200",
        uuid:"d250e501-50e3-4836-b352-c733ef56306b",
        md5:"5b3c2518bd09e8038dc2930435b4107a",
        sha1:"4d87d53eda7414a1dad236005511e0540bce2036",
        sha256:"83a06e7ba6066fa5f9e111114a2e46eb6572e38a796dda363e003eddead6ebcf",
        locale:"fil_PH"
      }
    ]
}

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

  • 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.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • 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.
  • 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.
  • 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.
  • Use the gender parameter with male, female, nonbinary, or any (the default), and set the min_age and max_age parameters (each 0-1000) to bound the age range. You can also set count to generate between 1 and 30 users per request; browse other generators in the API catalog.
  • Each user object includes identity fields like name, email, and username, contact and location fields such as phone, address, and timezone, plus technical placeholders like uuid, ipv4, user_agent, and credit_card. To trim the payload, pass fields with a comma-separated whitelist (e.g. name,email,phone) or use exclude to drop specific fields; for word-level placeholders see the Random Word API.
  • Yes, pass the seed parameter to produce the same random data on every call for reproducible tests, and use the locale parameter (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.