Skip to content

Products

The Products resource provides fake product data with names, prices, descriptions, and categories.

Available Endpoints

MethodEndpointDescription
GET/v1/productsList all products
GET/v1/products/:idGet a specific product
{
"id": 1,
"name": "Ergonomic Rubber Keyboard",
"description": "Carbonite neutralizes our open-source, virtual RAM drive.",
"price": 299.99,
"category": "smartphones",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
Field Type Description
id number Unique identifier
name string Product name
description string Product description
price number Product price
category string Product category
createdAt string ISO 8601 timestamp
updatedAt string ISO 8601 timestamp
Terminal window
curl https://api.phantomjson.app/v1/products
Parameter Type Default Description
page number 1 Page number
limit number 20 Items per page (max: 100)
sort string Sort field and direction
q string Search query
fields string Fields to return
name string Filter by name
category string Filter by category
{
"data": [
{
"id": 1,
"name": "Ergonomic Rubber Keyboard",
"description": "Carbonite neutralizes our open-source, virtual RAM drive.",
"price": 299.99,
"category": "smartphones"
}
],
"meta": {
"total": 100,
"page": 1,
"limit": 20,
"totalPages": 5
}
}
Terminal window
curl https://api.phantomjson.app/v1/products/1
{
"data": {
"id": 1,
"name": "Ergonomic Rubber Keyboard",
"description": "Carbonite neutralizes our open-source, virtual RAM drive.",
"price": 299.99,
"category": "smartphones"
}
}
Terminal window
curl "https://api.phantomjson.app/v1/products?q=keyboard"
Terminal window
curl "https://api.phantomjson.app/v1/products?category=smartphones"
Terminal window
curl "https://api.phantomjson.app/v1/products?price[gte]=50&price[lte]=200"
Terminal window
# Cheapest first
curl "https://api.phantomjson.app/v1/products?sort=price:asc"
# Most expensive first
curl "https://api.phantomjson.app/v1/products?sort=price:desc"
Terminal window
curl "https://api.phantomjson.app/v1/products?fields=id,name,price,category"
Terminal window
# Cheap smartphones sorted by price
curl "https://api.phantomjson.app/v1/products?category=smartphones&price[lte]=500&sort=price:asc&fields=id,name,price"

Available product categories:

  • smartphones
  • laptops
  • tablets
  • accessories
  • cameras
  • audio
  • Products are standalone resources with no relationships to other endpoints.