Free Demo REST API for Testing
A free, ready-to-use REST API with fake data for testing and prototyping. No sign-up and no API key. Use it to practise fetch and Axios, build mobile app screens, follow tutorials or test your HTTP client. Need an API key, richer data and three structure formats? Try the Fake API generator.
Try it now
Loading examples…
Base URL
https://freetoolza.com/wp-json/demo/v1
Resources
| Resource | Items | Fields |
|---|---|---|
/posts | 100 | userId, id, title, body |
/comments | 500 | postId, id, name, email, body |
/albums | 100 | userId, id, title |
/photos | 5000 | albumId, id, title, url, thumbnailUrl |
/todos | 200 | userId, id, title, completed |
/users | 10 | id, name, username, email, address, phone, website, company |
Routes
| Method | Route | Result |
|---|---|---|
| GET | /posts | List all posts |
| GET | /posts/1 | One post |
| GET | /posts/1/comments | Comments of post 1 |
| GET | /albums/1/photos | Photos of album 1 |
| GET | /users/1/posts, /users/1/albums, /users/1/todos | Items belonging to user 1 |
| POST | /posts | Fake create, returns 201 with id 101 |
| PUT, PATCH | /posts/1 | Fake update, returns the changed item |
| DELETE | /posts/1 | Fake delete, returns {} |
Write requests return a realistic response but nothing is saved, so the next GET shows the original data.
Filtering, sorting and paging
| Query | Meaning |
|---|---|
?userId=1, ?postId=1, ?completed=true | Filter by any simple field |
?_limit=10&_page=2 | Paging. Total count is in the X-Total-Count header |
?_start=20&_end=30 | Slice by position |
?_sort=title&_order=desc | Sort by a field |
Examples
JavaScript
fetch("https://freetoolza.com/wp-json/demo/v1/posts/1")
.then((res) => res.json())
.then((post) => console.log(post));
Create a post (fake)
fetch("https://freetoolza.com/wp-json/demo/v1/posts", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "foo", body: "bar", userId: 1 })
}).then((res) => res.json()).then(console.log);
cURL
curl "https://freetoolza.com/wp-json/demo/v1/users/1/todos?completed=true"
Swift
let url = URL(string: "https://freetoolza.com/wp-json/demo/v1/posts?_limit=5")!
let (data, _) = try await URLSession.shared.data(from: url)
FAQ
Do I need an API key?
No. This API is open. CORS is enabled, so browsers and web views can call it directly.
Is the data real?
No. All text, names and emails are generated samples and use example domains. Photos are placeholder images.
Will my POST be saved?
No. The API only simulates writes, so every user sees the same stable data.
Can I use it in production?
No. It is meant for learning, demos and testing, with no uptime guarantee.