
Posted on · 4 min read
Free APIs for Testing in 2026: 15 Fake and Mock JSON APIs That Actually Work
On this page · 10 sections
If you need an endpoint to test against right now, use JSONPlaceholder for classic posts and todos, DummyJSON for realistic products, users and auth, and httpbin to simulate errors and slow responses. All three are free, need no API key, and returned correct responses in our checks this week.
Test APIs are some of the most-used entries in the public-apis list. They're how people learn fetch, build UI prototypes before a back end exists, write integration tests and record demos. The catch is that free mock services come and go: of the 37 test-data APIs in our directory, 27 were online in our October 24, 2026 health check. This guide sticks to the ones that work and shows what each is best at.
#Quick comparison
API | Best for | Writes (POST/PUT) | Simulate errors/delay | Key |
|---|---|---|---|---|
Posts, comments, todos, users | Faked (not saved) | No | No | |
Products, carts, users, login, search | Faked (not saved) | Yes ( | No | |
Inspecting requests, status codes, delays | Echoes back | Yes | No | |
Realistic user profiles with photos | No | No | No | |
E-commerce prototypes | Faked | No | No | |
ReqRes | Users with pagination | Faked | Delay | Free key for some features |
Chaos testing: random failures, latency | Yes | Yes | No | |
Products, posts, todos, any status code | Yes | Yes | No |
#1. JSONPlaceholder: the classic
JSONPlaceholder has six resources (posts, comments, albums, photos, todos, users) with predictable IDs, which makes it ideal for tutorials. Write requests return a realistic response but aren't stored, so your test data never changes.
// Read
const todo = await fetch("https://jsonplaceholder.typicode.com/todos/1").then((r) => r.json());
// "Create": returns 201 with id 101, but nothing is saved
const created = await fetch("https://jsonplaceholder.typicode.com/posts", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "Hello", body: "Testing", userId: 1 }),
}).then((r) => r.json());
console.log(todo.title, created.id); // "delectus aut autem" 101Nested routes work too: /posts/1/comments, /users/1/todos.
#2. DummyJSON: realistic data, auth and pagination
DummyJSON goes further: 194 products with images and prices, carts, recipes and users. It supports limit, skip and select for pagination, search, and a working JWT login flow, which makes it great for practising authenticated requests.
# Page 2 of products, only two fields
curl "https://dummyjson.com/products?limit=10&skip=10&select=title,price"
# Search
curl "https://dummyjson.com/products/search?q=phone"
# Log in with a test user and get a JWT
curl -X POST https://dummyjson.com/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"emilys","password":"emilyspass"}'It can also simulate slow networks and errors, which is perfect for testing loading states:
curl "https://dummyjson.com/products/1?delay=1500" # responds after 1.5 s
curl -i "https://dummyjson.com/http/404" # returns a 404 with a JSON body#3. httpbin: test your HTTP client
httpbin doesn't serve fake data. It echoes your request back, so you can verify exactly what your code sends: headers, query strings, JSON bodies and auth. It's also the easiest way to force a specific status code or a slow response.
import requests
# What headers is my client actually sending?
print(requests.get("https://httpbin.org/headers", timeout=10).json())
# Does my retry logic handle a 503?
r = requests.get("https://httpbin.org/status/503", timeout=10)
print(r.status_code) # 503
# Does my timeout fire? (/delay/n waits n seconds before answering)
try:
requests.get("https://httpbin.org/delay/5", timeout=2)
except requests.Timeout:
print("timed out as expected")#4. RandomUser: realistic people
RandomUser generates user profiles with names, emails, addresses and profile photos. Use results for a batch, nat to pick nationalities, inc to choose fields, and seed to get the same users every time, which keeps tests deterministic.
curl "https://randomuser.me/api/?results=5&nat=gb,us&inc=name,email,picture&seed=demo"#5. FakeStoreAPI: e-commerce prototypes
FakeStoreAPI has products, categories, carts and users shaped like a small online shop. It's a favourite for React and Vue shop tutorials:
const products = await fetch("https://fakestoreapi.com/products?limit=5").then((r) => r.json());
products.forEach((p) => console.log(p.title, p.price));#More test APIs worth knowing
- ReqRes: users with page-based pagination (
/api/users?page=2), a common fit for frontend interview tasks. Some features now ask for a free key; check its docs. - flaky and Supercrontab Mock Endpoint: chaos testing. Force failures, add latency and get any status code.
- TestingAPIs: products, posts and todos, plus any HTTP status code and CORS enabled.
- RoboHash, Dicebear Avatars and Waldrand Avatar: placeholder avatars from any string.
- Bacon Ipsum and Metaphorsum: filler text.
- loremfile: sample files in 78 formats for upload testing.
- Mockaroo: custom schemas exported as JSON, CSV or SQL (free API key).
See every keyless option ranked on our free APIs for testing list. It puts endpoints our health check saw returning JSON first.
#Mock API or a real public API?
Mock APIs are perfect for predictable tests, but a real public API often makes a better demo. If you want live data with no key, these were all working this week:
- Weather:
https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.13¤t=temperature_2m - Currency:
https://api.frankfurter.dev/v1/latest?base=USD&symbols=EUR,GBP - Crypto:
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd - Pokémon:
https://pokeapi.co/api/v2/pokemon/pikachu
#How to test against a free API responsibly
- Don't hammer it from CI. Running a test suite against a shared free service on every commit can get your IP rate-limited, or the service shut down. Record responses once and replay them with a tool like MSW, nock or VCR.py.
- Pin your expectations to the shape, not the values. Assert that
priceis a number, not that it equals549. - Handle failure. Free services go down. In our check, 10 of the 37 test-data APIs were unreachable.
- Use a seed where the API supports one (RandomUser) so snapshots stay stable.
#FAQ
#What is the best free API for testing?
JSONPlaceholder for simple CRUD examples, DummyJSON for realistic data with auth and pagination, and httpbin for testing HTTP clients, status codes and timeouts.
#Is there a fake API that supports POST requests?
Yes. JSONPlaceholder, DummyJSON and FakeStoreAPI accept POST, PUT, PATCH and DELETE and return realistic responses, but they don't save your changes.
#How do I simulate a slow or failing API?
Use httpbin's /delay/{seconds} and /status/{code} endpoints, or DummyJSON's ?delay= parameter and /http/{code} route.
#Do these test APIs need an API key?
JSONPlaceholder, DummyJSON, httpbin, RandomUser and FakeStoreAPI need no key. Mockaroo needs a free key, and some ReqRes features do too.