JSONPlaceholder alternative: the Mockfly API Hub
JSONPlaceholder is the fake REST API every tutorial uses, and for good reason: it is free, it needs no signup and it never changes. The Mockfly API Hub keeps all of that, uses the same resource names, and adds the things you end up missing: pagination, forced status codes, delays, products and a path to your own endpoints.
Same resources, so the switch is a base URL
Replace https://jsonplaceholder.typicode.com with https://api.mockfly.dev/hub and the routes you already know keep working. Nested routes work the same way: /users/1/posts, /posts/1/comments, /albums/1/photos.
| Resource | Mockfly API Hub | JSONPlaceholder |
|---|---|---|
| /users | 100 users with address, company and avatar | 10 users |
| /posts | 100 posts with tags and likes | 100 posts |
| /comments | 500 comments | 500 comments |
| /albums | 100 albums | 100 albums |
| /photos | 500 photos with real placeholder images | 5000 photos |
| /todos | 200 todos with priority and due date | 200 todos |
| /products | 100 e-commerce products with price, stock and rating | Not available |
Try it
# A single user, always the same one
curl https://api.mockfly.dev/hub/users/5
# Page 2 of the products, 20 per page
curl "https://api.mockfly.dev/hub/products?_page=2&_limit=20"
# Force a 500 to test your error handling
curl "https://api.mockfly.dev/hub/posts?_status=500"
# Simulate a slow network (2 seconds)
curl "https://api.mockfly.dev/hub/todos?_delay=2000"Features comparison
| Feature | Mockfly API Hub | JSONPlaceholder |
|---|---|---|
| Free, no signup, no key | ✅ | ✅ |
| Deterministic data | ✅ | ✅ |
| Simulated writes (POST, PUT, PATCH, DELETE) | ✅ | ✅ |
| Pagination (_page, _limit) | ✅ | ✅ |
| Force any status code (_status) | ✅ | ❌ |
| Simulated latency (_delay) | ✅ | ❌ |
| Products resource | ✅ | ❌ |
| Machine-readable catalog | ✅ /hub/catalog | ❌ |
| Upgrade path to your own endpoints | ✅ Free Mockfly project | Run json-server yourself |
When JSONPlaceholder is the better choice
If a tutorial you are following uses it, keep using it: the two are close enough that you gain little by switching mid-lesson. Its 5000 photos are also handy when you specifically need a very long list. For anything where you need to see a loading spinner, an error state or a paginated table, the Hub is the shorter path.
Browse every resource and its endpoints on the API Hub page, or create your own mock API for free at app.mockfly.dev.
Frequently asked questions
Is the Mockfly API Hub really free?
Yes. The API Hub is a public service with no signup, no API key and no credit card. It is rate limited by IP so everyone gets a fair share, which is more than enough for tutorials, demos and test suites.
Is the data stable between requests?
Yes. Every item is generated once with a seeded Faker.js instance, so /hub/users/5 returns the same user today, tomorrow and after every deploy. Tests that assert on a specific user keep passing.
Can I POST, PUT, PATCH and DELETE?
Yes. Writes answer like a real API, echoing your payload with a new id and the right status code, but nothing is persisted. That is the same behaviour JSONPlaceholder has, so existing code keeps working.
How do I test error handling and slow networks?
Add ?_status=500 (or any status code) to force the response status, and ?_delay=2000 to delay it by up to 3000 ms. JSONPlaceholder has no equivalent; you need your own mock server for that.
What if I need my own shape of data?
The Hub is fixed on purpose. When you need your own endpoints, fields, status codes or rules, create a free Mockfly project: 4 endpoints and 500 requests a day on the free plan, unlimited on Pro.