Skip to main content

Fake Product Data API

MOCK DATA

Fake e-commerce products with category-themed names, prices in real currencies (whole yen for JPY), valid EAN-13 barcodes, SKUs, ratings and image URLs.

Generated test data for fixtures and development

Base URL
/api/products
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/products

Live requestRuns against the public API
No key required
GET/api/products?category=electronics&maxPrice=100&count=5

Request parameters

Only generate products in this category — names, descriptions, SKU prefix and image label all follow it. Omit for a random mix.

Minimum price (inclusive). Must be ≤ maxPrice.

Maximum price (inclusive). Must be ≥ minPrice.

ISO 4217 currency code (3 letters, case-insensitive). Prices are rounded to the currency's minor unit — JPY/KRW give whole numbers, KWD three decimals. Supported: USD, EUR, GBP, JPY, CNY, CHF, CAD, AUD, NZD, SEK, NOK, DKK, PLN, CZK, SGD, HKD, KRW, INR, BRL, MXN, ZAR, TRY, KWD.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/products?category=electronics&maxPrice=100&count=5"
const res = await fetch("https://randomapi.dev/api/products?category=electronics&maxPrice=100&count=5");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/products?category=electronics&maxPrice=100&count=5").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/products?category=electronics&maxPrice=100&count=5"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 4
category enum

Only generate products in this category — names, descriptions, SKU prefix and image label all follow it. Omit for a random mix.

allowed: electronics | clothing | home | beauty | sports | toys | books | food | automotive | garden
example: category=electronics
minPrice float

Minimum price (inclusive). Must be ≤ maxPrice.

default: 1
allowed: 0 – 1000000
example: minPrice=10
maxPrice float

Maximum price (inclusive). Must be ≥ minPrice.

default: 999.99
allowed: 0 – 1000000
example: maxPrice=500
currency string

ISO 4217 currency code (3 letters, case-insensitive). Prices are rounded to the currency's minor unit — JPY/KRW give whole numbers, KWD three decimals. Supported: USD, EUR, GBP, JPY, CNY, CHF, CAD, AUD, NZD, SEK, NOK, DKK, PLN, CZK, SGD, HKD, KRW, INR, BRL, MXN, ZAR, TRY, KWD.

default: USD
example: currency=EUR
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=name,description
exclude list

Return all fields except these (comma-separated).

example: exclude=imageUrl
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 10
name string

Category-themed product name: adjective + material + noun from the category's pools.

example: Wireless Aluminum Headphones

description string

1–2 sentence marketing blurb that mentions the product and its category.

example: Meet the wireless aluminum headphones — a customer favorite from the electronics range.

category string

One of the 10 product categories.

example: electronics

price float

Price within minPrice..maxPrice, rounded to the currency's decimal digits (whole numbers for JPY/KRW).

example: 129.99

currency string

ISO 4217 code the price is denominated in.

example: USD

sku string

Stock keeping unit: 3-letter category prefix, 5 digits, 2 letters (e.g. ELE-04821-QX).

example: ELE-04821-QX

ean13 string (EAN-13)

13-digit European Article Number with a valid GS1 check digit (kept as a string to preserve leading zeros).

example: 4006381333931

rating float

Average customer rating, 1.0–5.0 in 0.1 steps.

example: 4.3

inStock boolean

Availability flag (true for roughly 80% of records).

example: true

imageUrl string (URL)

Ready-to-use 640×480 placeholder from this platform's image API, labeled with the category.

example: https://randomapi.dev/api/images/placeholder?width=640&height=480&text=electronics

Documented examples

Build-generated requests and complete responses
3
Five electronics under $100
GET /api/products?category=electronics&maxPrice=100&count=5
{
  "data": [
    {
      "name": "Ultra-Slim Graphite Webcam",
      "description": "Meet the ultra-slim graphite webcam — a customer favorite from the electronics range. Backed by a 30-day guarantee like everything in the electronics lineup.",
      "category": "electronics",
      "price": 32.59,
      "currency": "USD",
      "sku": "ELE-40701-UY",
      "ean13": "7363853868351",
      "rating": 4.2,
      "inStock": false,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=electronics"
    },
    {
      "name": "Wireless Aluminum Monitor",
      "description": "A standout addition to the electronics catalog: wireless aluminum monitor. Backed by a 30-day guarantee like everything in the electronics lineup.",
      "category": "electronics",
      "price": 53.19,
      "currency": "USD",
      "sku": "ELE-52498-QT",
      "ean13": "8877639823896",
      "rating": 3.3,
      "inStock": true,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=electronics"
    },
    {
      "name": "High-Definition Aluminum Speaker",
      "description": "Meet the high-definition aluminum speaker — a customer favorite from the electronics range. One of the most-wishlisted items in the electronics department.",
      "category": "electronics",
      "price": 47.18,
      "currency": "USD",
      "sku": "ELE-03255-DU",
      "ean13": "0367525997902",
      "rating": 3.8,
      "inStock": true,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=electronics"
    },
    {
      "name": "Smart Carbon-Fiber Headphones",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Whole-yen prices for a Japanese shop
GET /api/products?currency=JPY&minPrice=500&maxPrice=20000&count=3
{
  "data": [
    {
      "name": "Aerodynamic Mesh Jump Rope",
      "description": "Aerodynamic mesh jump rope, new in our sports collection. One of the most-wishlisted items in the sports department.",
      "category": "sports",
      "price": 10819,
      "currency": "JPY",
      "sku": "SPO-77864-YS",
      "ean13": "3638538683586",
      "rating": 4.5,
      "inStock": false,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=sports"
    },
    {
      "name": "Wireless Polycarbonate Webcam",
      "description": "Wireless polycarbonate webcam, new in our electronics collection. One of the most-wishlisted items in the electronics department.",
      "category": "electronics",
      "price": 19789,
      "currency": "JPY",
      "sku": "ELE-64130-TX",
      "ean13": "8776398238951",
      "rating": 1.3,
      "inStock": false,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=electronics"
    },
    {
      "name": "Heavy-Duty Rubber Tire Inflator",
      "description": "Heavy-Duty rubber tire inflator, new in our automotive collection.",
      "category": "automotive",
      "price": 11514,
      "currency": "JPY",
      "sku": "AUT-03255-DU",
      "ean13": "0367525997902",
      "rating": 3.8,
      "inStock": true,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=automotive"
    }
  ],
  "meta": {
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Reproducible beauty catalog
GET /api/products?category=beauty&seed=42&count=10
{
  "data": [
    {
      "name": "Gentle Jojoba Cleanser",
      "description": "Meet the gentle jojoba cleanser — a customer favorite from the beauty range. Backed by a 30-day guarantee like everything in the beauty lineup.",
      "category": "beauty",
      "price": 319.77,
      "currency": "USD",
      "sku": "BEA-40701-UY",
      "ean13": "7363853868351",
      "rating": 4.2,
      "inStock": false,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=beauty"
    },
    {
      "name": "Hydrating Aloe Vera Body Lotion",
      "description": "A standout addition to the beauty catalog: hydrating aloe vera body lotion. Backed by a 30-day guarantee like everything in the beauty lineup.",
      "category": "beauty",
      "price": 527.62,
      "currency": "USD",
      "sku": "BEA-52498-QT",
      "ean13": "8877639823896",
      "rating": 3.3,
      "inStock": true,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=beauty"
    },
    {
      "name": "Fragrance-Free Aloe Vera Shampoo",
      "description": "Meet the fragrance-free aloe vera shampoo — a customer favorite from the beauty range. One of the most-wishlisted items in the beauty department.",
      "category": "beauty",
      "price": 467.05,
      "currency": "USD",
      "sku": "BEA-03255-DU",
      "ean13": "0367525997902",
      "rating": 3.8,
      "inStock": true,
      "imageUrl": "https://randomapi.dev/api/images/placeholder?width=640&height=480&text=beauty"
    },
    {
      "name": "Nourishing Charcoal Face Cream",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates believable store inventory. Names are assembled from per-category word pools (adjective + material + noun), so ?category=books really returns things like Annotated Leather-Bound Atlas — never headphones. The description, the sku prefix and the imageUrl label all follow the chosen category too; omit category for a random mix.

Prices honor minPrice/maxPrice exactly (inclusive) and are rounded to the currency's ISO 4217 minor unit: JPY and KRW produce whole numbers, KWD three decimals, everything else two. Impossible combinations fail loudly instead of fudging the data — minPrice above maxPrice, an unknown currency code, or a range so narrow that no representable price exists (e.g. currency=JPY&minPrice=2.5&maxPrice=2.7) each return a 400 that explains the problem.

Every ean13 carries a valid GS1 check digit, every sku follows XXX-00000-XX (3-letter category prefix, 5 digits, 2 letters), and rating is a 1.0–5.0 score in 0.1 steps. With a seed the whole catalog reproduces byte-for-byte.

Use it for

  • Seed a demo storefront or staging database with category-consistent inventory
  • Test price formatting and currency edge cases, incl. zero-decimal JPY and three-decimal KWD
  • Stable cart/checkout fixtures via seed — the same catalog in every CI run

Frequently asked questions

Do products come with barcodes?

Yes — every product carries a checksum-valid ean13 (pair it with the barcodes endpoint to render it as an SVG) plus sku, price and stock flag.

Can I bound prices?

minPrice/maxPrice genuinely constrain price, currency stamps the ISO code, and category keeps records in one department.

Are the image URLs real?

Yes, in the safest way: imageUrl points at this platform's own placeholder-image API, so product cards render actual images with no external dependencies.

Standards & references