Fake Store API

Development API · Mock data · E-commerce · Prototyping · Products

TL;DR

Fake Store API provides realistic e-commerce data for testing and prototyping. Browse 20 products across categories (electronics, jewelry, men's clothing, women's clothing) with images, prices, ratings, and descriptions. Includes user accounts with addresses and shopping carts. Full CRUD support for products, and cart management. No API key required.

Quick start: https://fakestoreapi.com/products

No API key needed — free e-commerce test data!

How to Use This API

1. Get All Products

Returns the full product catalog with 20 items:

https://fakestoreapi.com/products

2. Get Single Product

https://fakestoreapi.com/products/1

3. Get Products by Category

https://fakestoreapi.com/products/category/electronics

4. JavaScript — Product Catalog

fetch('https://fakestoreapi.com/products')
  .then(r => r.json())
  .then(products => {
    products.forEach(p => {
      console.log(`${p.title.slice(0, 40)}... — $${p.price}`);
      console.log(`  Category: ${p.category}, Rating: ${p.rating.rate}/5`);
      console.log(`  Image: ${p.image}`);
    });
  });

5. Python — Cart Operations

import requests

# Get user's cart
user_id = 1
cart = requests.get(f'https://fakestoreapi.com/carts/user/{user_id}').json()
print(f"User {user_id} has {len(cart)} carts")

for c in cart:
    print(f"Cart {c['id']}: {c['date']}")
    for item in c['products']:
        product = requests.get(
            f"https://fakestoreapi.com/products/{item['productId']}"
        ).json()
        print(f"  ×{item['quantity']} {product['title'][:30]}...")

# Add new product (POST)
new = requests.post('https://fakestoreapi.com/products', json={
    'title': 'Test Product',
    'price': 13.99,
    'description': 'Test description',
    'image': 'https://via.placeholder.com/300',
    'category': 'electronics'
})
print(f"\nCreated product ID: {new.json()['id']}")
All products: https://fakestoreapi.com/products

Frequently Asked Questions

What endpoints are available?
/products (all, single, category list, by category), /carts (all, single, by user, by date), /users (all, single), /auth/login (authentication). Full CRUD supported.
How many products are in the catalog?
20 products across 4 categories: electronics, jewelry, men's clothing, and women's clothing. Each product includes image, price, description, category, and rating.
Can I add new products?
Yes — POST to /products with JSON body. The API will return the created product with an auto-generated ID. Note that data is not persisted permanently (in-memory store).
What user data is available?
Users include username, email, name (first/last), address (street, city, zip, lat/lng), and phone. User IDs range from 1 to 10. Use /users to list them all.
Do shopping carts work?
Yes — carts contain product IDs with quantities and dates. Query /carts/user/{userId} for a user's carts. Each cart has an ID, user ID, date, and products array.
Is there a rate limit?
No strict rate limit. Fake Store API is free for testing and prototyping. Data is reset periodically as it's an in-memory store, so your changes may not persist indefinitely.

API Details

API URL
https://fakestoreapi.com/
Documentation
fakestoreapi.com/docs
Category
Development
Authentication
Not Required
Methods
GET, POST, PUT, PATCH, DELETE

What You Can Build