Products API with Mock API Studio
The editor below is preset with a product catalogue: title, description, price, discount, rating, stock, brand, category, SKU, a thumbnail and an images array. Press Create my API and you get 25 products (the free maximum) behind an HTTPS /products endpoint that you can filter by price, sort by rating and change with POST, PATCH and DELETE.
- Look at the three sample products. Rename or add fields (weight, color, warranty) and the field preview on the right updates; category becomes a fixed list of the values your samples use.
- Keep 25 products (the free maximum) and press Create my API. Your three samples stay at the top of the list; the other 22 are generated.
- Render a product grid from GET /products?_page=1&_limit=12 and read X-Total-Count for the page count. Every thumbnail is a working image URL.
- Build filters against real query parameters: ?category=electronics, ?price_gte=20&price_lte=100, ?inStock=true, and ?sort=rating&order=desc to sort by rating.
- Build the admin side: POST /products adds an item, PATCH /products/2 with {"stock": 12} restocks it, DELETE /products/3 removes it and the next GET returns 404.
What to know
A shop frontend needs more than a list. Category pages, price sliders, out-of-stock badges and an admin form all hit different parameters, and a hard-coded JSON file answers none of them. Here the filters are real: ?price_gte=50&price_lte=150 returns only products in that range, ?category=footwear&category=outdoor returns either category, and ?title_like=shoe does a case-insensitive substring match on one field while ?q=shoe searches every text field.
Images are the part placeholder data usually gets wrong. Fields named thumbnail, image, photo or cover get image URLs that load (640 by 480 from a placeholder photo service), so your card layout, aspect ratios and lazy loading are tested against real network images. Arrays such as images are copied from your sample records, so keep a sample with one image and one with several to exercise both gallery states.
Prices are numbers between 5 and 500 with two decimals, stock is a count from 0 to 500 and rating is a whole number from 1 to 5. A POST with a string in price returns 422 with {"error":"validation_failed","field":"price"}, which is what you need to build form error states. Category is validated against the values your samples use, so a typo such as "electronic" is rejected the same way.
Many public fake store APIs return a made-up response to POST, PUT and DELETE without storing anything, so an admin screen cannot be tested end to end. This API keeps every write in your project: add a product and it appears in the next list, sold-out flags and price edits survive a reload, and Reset to seed restores the original 25 products when a test run has made a mess.
Updated · Cosmovex
Questions
Which fields does each fake product have?
The ones in your sample: here id, title, description, price, discountPercentage, rating, stock, brand, category, sku, thumbnail, images, inStock and createdAt. Add or remove a field in the editor before you press Create my API and every generated product follows the new shape.
How do I filter products by price range?
Add _gte and _lte to the field name: /products?price_gte=20&price_lte=100. The same works for stock (?stock_lte=5 for a low-stock view) and for dates (?createdAt_gte=2026-06-01). Combine them with ?category=outdoor and ?sort=price&order=asc.
Do the product images actually load?
Yes. Generated thumbnails are https URLs from a public placeholder photo service, sized 640 by 480, and your sample URLs are kept as they are. If you need your own product photos, PATCH the image fields with your URLs and they are stored.
Can I have more than 25 products?
Not on the free plan: it holds 25 records per resource, which is enough for 3 pages of a grid, filters and sorting. Pro raises it to 5,000 per resource, adds latency and error injection for loading states, and costs $5 a month.
Can I add a cart or orders endpoint too?
Yes. Add another top-level array such as "orders" with a productId field before creating the API; productId is recognised as a link to products and filled with real product ids. A free project holds 2 resources (products plus one more); Pro holds 50.
The free plan covers everything on this page. Mock API Studio Pro ($5/mo, billed monthly) is described on the Mock API Studio page.