ReqRes API
Hosted REST API with real responses to test your front-end against.
What it does
ReqRes is a hosted fake REST API that returns real, well-formed JSON responses so you can build and test a front-end before the real backend exists. It has paginated user lists, single resources, and endpoints that accept POST/PUT/PATCH/DELETE and echo back a plausible result.
Base URL
Authentication
None for reads. As of 2024 write and some read endpoints expect a free API key in an x-api-key header (the docs show reqres-free-v1 for testing). No accounts, no OAuth — it’s a sandbox.
Code examples
curl -s "https://reqres.in/api/users?page=2" -H "x-api-key: reqres-free-v1"
import requests
H = {"x-api-key": "reqres-free-v1"}
# list
users = requests.get("https://reqres.in/api/users", params={"page": 2}, headers=H).json()
print(users["page"], users["total"], len(users["data"]))
# create
new = requests.post(
"https://reqres.in/api/users",
json={"name": "ada", "job": "engineer"},
headers=H,
).json()
print(new["id"], new["createdAt"])const H = { "x-api-key": "reqres-free-v1", "Content-Type": "application/json" };
const list = await (await fetch("https://reqres.in/api/users?page=2", { headers: H })).json();
console.log(list.data);
const created = await (await fetch("https://reqres.in/api/users", {
method: "POST",
headers: H,
body: JSON.stringify({ name: "ada", job: "engineer" }),
})).json();
console.log(created);Rate limits & quotas
No published hard limit on the free tier, but it’s a shared demo service — keep test suites reasonable and don’t point load tests at it. Add ?delay=3 to any GET to simulate a slow network for your loading states.
Key response fields
| page / per_page / total / total_pages | Standard pagination metadata on list endpoints |
| data | Array (list) or object (single resource) of the fake records |
| data.id / email / first_name / last_name / avatar | Fields on the user resource |
| id / createdAt / updatedAt | Returned by POST/PUT/PATCH — not actually stored |
| support | A canned support-message object appended to most responses |
Common errors
| 400 | POST /register or /login without both email and password. |
| 401 | Missing x-api-key header on an endpoint that now requires it. |
| 404 | Single-resource id that doesn’t exist, e.g. /users/23. |
When to use it (and alternatives)
Use ReqRes when you want responses that look like a real users API with pagination. For totally arbitrary nested resources use JSONPlaceholder; to inspect exactly what your client sends (headers, body, auth) use HTTPBin or Postman Echo; to generate large volumes of fake data offline, use a library like Faker instead of an API.
FAQ
Does ReqRes actually save the data I POST?
No. It validates your request and returns a realistic response with an id and timestamp, but nothing is persisted — the next GET won’t show your record.
Why am I suddenly getting 401s from ReqRes?
The service added an API-key requirement. Send the header x-api-key: reqres-free-v1 (the free testing key from its docs).
New to APIs?
Short guides for working with this API — and any other.