BYTETOOLS

DummyJSON API

Free fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples.

No API key requiredCORS enabledHTTPSCompletely free.

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the DummyJSON API?

DummyJSON is a free fake REST API providing realistic dummy data — products, users, carts, posts, recipes and comments — with support for search, pagination, sorting and simulated authentication. No API key is required.

DummyJSON is the more capable successor to the classic placeholder APIs. Where older mock services return flat lists, DummyJSON supports search, pagination, sorting, field selection and even a simulated JWT login flow — which means you can prototype a realistic app without writing a backend.

The product data in particular is well suited to e-commerce prototypes: each item has a title, description, price, discount percentage, rating, stock level, brand, category and multiple image URLs, so a product grid built against it looks convincing straight away.

Quick facts

Base URL
https://dummyjson.com
Authentication
No key needed. A simulated JWT auth flow exists at /auth/login for testing token handling.
Rate limit
No published limit; fair use expected.
Pricing
Completely free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the DummyJSON API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Fetch a single product

GET https://dummyjson.com/products/1

curl
curl 'https://dummyjson.com/products/1'
JavaScript (fetch)
const res = await fetch("https://dummyjson.com/products/1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://dummyjson.com/products/1", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "id": 1,
  "title": "Essence Mascara Lash Princess",
  "description": "The Essence Mascara Lash Princess is a popular mascara known for its volumizing and lengthening effects. Achieve dramatic lashes with this long-lasting and cruelty-free formula.",
  "category": "beauty",
  "price": 9.99,
  "discountPercentage": 10.48,
  "rating": 2.56,
  "stock": 99,
  "tags": [
    "beauty",
    "mascara"
  ],
  "brand": "Essence",
  "sku": "BEA-ESS-ESS-001",
  "weight": 4,
  "dimensions": {
    "width": 15.14,
    "height": 13.08,
    "depth": 22.99
  },
  "warrantyInformation": "1 week warranty",
  "shippingInformation": "Ships in 3-5 business days",
  "availabilityStatus": "In Stock",
  "reviews": [
    {
      "rating": 3,
      "comment": "Would not recommend!",
      "date": "2025-04-30T09:41:02.053Z",
      "reviewerName": "Eleanor Collins",
      "reviewerEmail": "eleanor.collins@x.dummyjson.com"
    },
    {
      "rating": 4,
      "comment": "Very satisfied!",
      "date": "2025-04-30T09:41:02.053Z",
      "reviewerName": "Lucas Gordon",
      "reviewerEmail": "lucas.gordon@x.dummyjson.com"
    },
    {
      "rating": 5,
      "comment": "Highly impressed!",
      "date": "2025-04-30T09:41:02.053Z",
      "reviewerName": "Eleanor Collins",
      "reviewerEmail": "eleanor.collins@x.dummyjson.com"
    }
  ],
  "returnPolicy": "No return policy",
  "minimumOrderQuantity": 48,
  "meta": {
    "createdAt": "2025-04-30T09:41:02.053Z",
    "updatedAt": "2025-04-30T09:41:02.053Z",
    "barcode": "5784719087687",
    "qrCode": "https://cdn.dummyjson.com/public/qr-code.png"
  },

2. Add a product with a POST request

POST https://dummyjson.com/products/add

curl
curl -X POST 'https://dummyjson.com/products/add' \
  -H 'Content-Type: application/json' \
  -d '{"title":"ByteTools Widget"}'
JavaScript (fetch)
const res = await fetch("https://dummyjson.com/products/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"title":"ByteTools Widget"}),
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

headers = {
    "Content-Type": "application/json",
}

payload = {"title":"ByteTools Widget"}

res = requests.post("https://dummyjson.com/products/add", headers=headers, json=payload, timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 201
{
  "id": 195,
  "title": "ByteTools Widget"
}

Parameters

ParameterTypeRequiredDescription
<resource>pathRequiredproducts, users, carts, posts, comments, recipes, todos or quotes. products
limit / skipintegerOptionalPagination controls. `limit=0` returns everything. 10
selectstringOptionalComma-separated fields to return, shrinking the payload. title,price
qstringOptionalSearch term, used with the /search path. phone
sortBy / orderstringOptionalField to sort by and direction, asc or desc. price

Response fields

idinteger
Resource identifier.
title / descriptionstring
Product name and description text.
price / discountPercentagenumber
Price and discount, useful for testing money formatting.
rating / stocknumber
Rating out of 5 and stock level.
images / thumbnailarray|string
Real image URLs you can render directly.

What you can build with the DummyJSON API

  • Prototype an e-commerce product grid with realistic images and prices
  • Test pagination, search and sorting UI against a real API
  • Practise JWT login and token refresh flows with the simulated auth endpoints
  • Seed design mockups with plausible user and product records

Common errors and how to fix them

404

Unknown resource or id.

Fix: Check the resource name is plural and lowercase, e.g. /products not /product.

POST result not retrievable

Writes are simulated, like other mock APIs.

Fix: Expect a 201 and a returned object, but do not expect persistence.

DummyJSON API — frequently asked questions

Is DummyJSON free to use?

Yes, entirely free with no API key or signup. It is intended for prototyping, testing and learning.

Does DummyJSON support POST and PUT requests?

Yes, it accepts POST, PUT, PATCH and DELETE and returns realistic responses, but like all mock APIs the changes are simulated and not persisted between requests.

How is DummyJSON different from JSONPlaceholder?

DummyJSON offers richer data — real product images, prices, stock and ratings — plus search, pagination, sorting, field selection and a simulated JWT auth flow. JSONPlaceholder is simpler and better for the most basic examples.

Can I test authentication with DummyJSON?

Yes. POST credentials to /auth/login to receive a simulated JWT, then send it as a Bearer token to protected endpoints — useful for testing token storage and refresh logic.

Tools that pair with this API

DummyJSON is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.