API Referencev1.0.0

Random User API

Generate realistic random user data for testing, prototyping, and development. Free, no authentication required.

RESTJSONNo Auth

Introduction

The Random User API is a free RESTful endpoint that returns a randomly generated user object. It is built for developers who need realistic placeholder data for UI mockups, automated testing, and demos.

Each response contains a complete user profile: name, email, username, gender, location, and an avatar image URL — all assembled from a curated data pool.

Base URL

Endpoint
https://random-api-lite.vercel.app/api/users

Authentication

This API is completely public. No API key, token, or header is required. Just send a GET request and receive a random user.

Endpoints

GEThttps://random-api-lite.vercel.app/api/users

Query Parameters

All parameters are optional. When omitted, the API returns a fully random, unfiltered user.

genderstringoptional

Filter results by gender.

MALEFEMALE
countrystringoptional

Filter results by country name.

GreeceGermanyFranceUnited States...

Example Requests

https://random-api-lite.vercel.app?gender=MALE
https://random-api-lite.vercel.app?country=Greece
https://random-api-lite.vercel.app?gender=FEMALE&country=Germany

Response Schema

The response body has the following structure:

FieldTypeDescription
messagestringStatus message
statusnumberHTTP status code
randomUser.namestringFull name (first + last)
randomUser.emailstringGenerated email address
randomUser.usernamestringUnique username
randomUser.genderstring"MALE" or "FEMALE"
randomUser.location.citystringCity name
randomUser.location.statestringState or region
randomUser.location.countrystringCountry name
randomUser.avatarstringAvatar image URL

Response Example

A successful request returns a 200 response:

Response Body
{
  "message": "Users fetched successfully",
  "status": 200,
  "randomUser": {
    "name": "Eleanor Wilson",
    "email": "eleanor.wilson@example.com",
    "username": "eleanor.wilson490",
    "gender": "FEMALE",
    "location": {
      "city": "Athens",
      "state": "Prague",
      "country": "Greece"
    },
    "avatar": "https://randomuser.me/api/portraits/women/14.jpg"
  }
}

Usage Examples

Copy-paste ready code for the most common integration patterns.

Basic Request

const res = await fetch(`${BASE_URL}/api/users`);
const data = await res.json();

console.log(data.randomUser.name);
// "Eleanor Wilson"

With Query Parameters

const res = await fetch(`${BASE_URL}/api/users?gender=MALE&country=Greece`);
const data = await res.json();

console.log(data.randomUser);

Full Example with Error Handling

async function getRandomUser(gender, country) {
  const params = new URLSearchParams();
  if (gender) params.set("gender", gender);
  if (country) params.set("country", country);

  const res = await fetch(`${BASE_URL}/api/users?${params}`);

  if (!res.ok) {
    throw new Error(`HTTP ${res.status}`);
  }

  const { randomUser } = await res.json();
  return randomUser;
}

// Usage
const user = await getRandomUser("MALE", "Greece");
console.log(user.name, user.email);

Error Handling

The API uses standard HTTP status codes. On failure, the response includes an error field.

StatusMeaning
200Success — user returned
400Bad request — invalid parameters
500Internal server error
Error Response
{
  "error": "Internal server error"
}

FAQ

Is this API free?
Yes. Completely free, no API key required.
Can I use this in production?
It is primarily designed for development, testing, and prototyping. The data is randomly generated and not real.
How unique are the generated users?
Each request produces a randomly assembled user. Usernames include a random numeric suffix, but collisions are possible across many requests.
API Referencev1.0.0

Random Products API

Generate realistic random product data for e-commerce testing, prototyping, and development. Free, no authentication required.

RESTJSONNo Auth

Introduction

The Random Products API is a free RESTful endpoint that returns randomly generated product objects. It is built for developers who need realistic placeholder data for e-commerce UI mockups, automated testing, and demos.

Each response contains a complete product: name, description, price, category, and a photo URL — all assembled from a curated product pool.

Base URL

Endpoint
https://random-api-lite.vercel.app/api/products

Authentication

This API is completely public. No API key, token, or header is required. Just send a GET request and receive random products.

Endpoints

GEThttps://random-api-lite.vercel.app/api/products

Query Parameters

All parameters are optional. When omitted, the API returns all available products.

limitnumberoptional

Limit the number of products returned.

13510...

Example Requests

https://random-api-lite.vercel.app/api/products
https://random-api-lite.vercel.app/api/products?limit=3
https://random-api-lite.vercel.app/api/products?limit=10

Response Schema

The response body has the following structure:

FieldTypeDescription
messagestringStatus message
statusnumberHTTP status code
countnumberNumber of products returned
products[].idnumberUnique product identifier
products[].namestringProduct name
products[].descriptionstringProduct description
products[].pricenumberProduct price
products[].categorystringProduct category
products[].photostringProduct photo URL
products[].createdAtstringCreation timestamp
products[].updatedAtstringLast update timestamp

Response Example

A successful request returns a 200 response:

Response Body
{
  "message": "Products fetched successfully",
  "status": 200,
  "count": 1,
  "products": [
    {
      "id": 1,
      "name": "Wireless Mouse",
      "description": "Ergonomic wireless mouse with adjustable DPI",
      "price": 29.99,
      "category": "Electronics",
      "photo": "https://example.com/mouse.jpg",
      "createdAt": "2026-07-12T00:00:00.000Z",
      "updatedAt": "2026-07-12T00:00:00.000Z"
    }
  ]
}

Usage Examples

Copy-paste ready code for the most common integration patterns.

Basic Request

const res = await fetch(`${BASE_URL}/api/products`);
const data = await res.json();

console.log(data.products[0].name);
// "Wireless Mouse"

With Limit Parameter

const res = await fetch(`${BASE_URL}/api/products?limit=5`);
const data = await res.json();

console.log(data.count);
// 5

Full Example with Error Handling

async function getProducts(limit) {
  const params = new URLSearchParams();
  if (limit) params.set("limit", limit);

  const res = await fetch(`${BASE_URL}/api/products?${params}`);

  if (!res.ok) {
    throw new Error(`HTTP ${res.status}`);
  }

  const { products } = await res.json();
  return products;
}

// Usage
const products = await getProducts(3);
console.log(products[0].name, products[0].price);

Error Handling

The API uses standard HTTP status codes. On failure, the response includes an error field.

StatusMeaning
200Success — products returned
400Bad request — invalid limit parameter
500Internal server error
Error Response
{
  "error": "Invalid limit. Must be a positive integer."
}

FAQ

Is this API free?
Yes. Completely free, no API key required.
Can I use this in production?
It is primarily designed for development, testing, and prototyping. The data is randomly generated and not real.
How are products generated?
Each request randomly selects products from the database. You can limit the number of results using the limit query parameter.