restful-api.dev API
Free fake REST API with real GET, POST, PUT, PATCH and DELETE support and no key. Ideal for tutorials, HTTP client demos and integration tests. Live example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the restful-api.dev API?
restful-api.dev is a free online REST API for testing HTTP clients. `GET https://api.restful-api.dev/objects` returns a list of sample device objects, and the same path accepts POST, PUT, PATCH and DELETE so you can exercise a full CRUD cycle without an API key or account.
Most fake REST APIs pretend to accept writes and quietly discard them. restful-api.dev actually stores what you POST, gives it a new id and serves it back on later GETs, which makes it far more useful for demonstrating an HTTP client, a retry policy or an optimistic UI. Objects you create are yours and separate from the seeded catalogue, and they are periodically cleaned up.
The response shape is a deliberate lesson in defensive parsing. `id` is a string even though every seeded value looks numeric, `data` is either `null` or a free-form object, and the keys inside `data` are wildly inconsistent between records: `capacity`, `capacity GB`, `Capacity` and `Screen size` all appear, spaces included. If you are teaching people to handle untidy JSON, this is a better fixture than anything you would hand-write.
Quick facts
- Base URL
https://api.restful-api.dev- Authentication
- No key or token. Anyone can read the shared object list; anything you create is public too, so do not post real data.
- Rate limit
- Not published. Fair use; the service is a free community resource.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the restful-api.dev API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. List the seeded objects
GET https://api.restful-api.dev/objects
curl 'https://api.restful-api.dev/objects'const res = await fetch("https://api.restful-api.dev/objects");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.restful-api.dev/objects", timeout=20)
res.raise_for_status()
print(res.json())[
{
"id": "1",
"name": "Google Pixel 6 Pro",
"data": {
"color": "Cloudy White",
"capacity": "128 GB"
}
},
{
"id": "2",
"name": "Apple iPhone 12 Mini, 256GB, Blue",
"data": null
},
{
"id": "3",
"name": "Apple iPhone 12 Pro Max",
"data": {
"color": "Cloudy White",
"capacity GB": 512
}
},
{
"id": "4",
"name": "Apple iPhone 11, 64GB",
"data": {
"price": 389.99,
"color": "Purple"
}
},
{
"id": "5",
"name": "Samsung Galaxy Z Fold2",
"data": {
"price": 689.99,
"color": "Brown"
}
},
{
"id": "6",
"name": "Apple AirPods",
"data": {
"generation": "3rd",
"price": 120
}
},
{
"id": "7",
"name": "Apple MacBook Pro 16",
"data": {
"year": 2019,
"price": 1849.99,
"CPU model": "Intel Core i9",
"Hard disk size": "1 TB"
}
},
{
"id": "8",
"name": "Apple Watch Series 8",
"data": {
"Strap Colour": "Elderberry",
"Case Size": "41mm"
}
},
{
"id": "9",
"name": "Beats Studio3 Wireless",
"data": {
"Color": "Red",
"Description": "High-performance wireless noise cancelling headphones"
}
},
{
"id": "10",
"name": "Apple iPad Mini 5th Gen",
"data": {
"Capacity": "64 GB",
"Screen size": 7.9
}
},
{
"id": "11",
"name": "Apple iPad Mini 5th Gen",
"data": {
"Capacity": "254 GB",
"Screen size": 7.9
}
},
{
"id": "12",
"name": "Apple iPad Air",
"data": {
"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string or array | Optional | Filter the list to specific ids by repeating the parameter, e.g. `?id=3&id=5`. 3 |
(request body) | JSON | Optional | For POST and PUT: `{"name": "...", "data": { ... }}`. Any JSON object is accepted inside `data`. {"name":"Test","data":{"year":2024}} |
Response fields
idstring- Object identifier, always a string. Seeded objects use `"1"` to `"13"`; objects you create get a long generated id.
namestring- Display name of the device. This is the only field guaranteed to be present on every record.
dataobject or null- Free-form attribute bag, or `null` for records with no attributes. Key names are inconsistent across records, including keys containing spaces, so never index into it blindly.
createdAt / updatedAtstring- ISO 8601 timestamps returned on objects you create or modify. Seeded objects do not carry them.
What you can build with the restful-api.dev API
- Demonstrate a full CRUD cycle in an HTTP client tutorial or a REST course
- Smoke-test a new API wrapper, retry policy or error handler against a live server
- Populate a front-end prototype with data that survives a page reload
- Teach defensive JSON parsing using genuinely inconsistent field names
- Verify that your proxy, VPN or corporate firewall passes non-GET methods correctly
Common errors and how to fix them
404
The object id does not exist, or someone else's created object has been cleaned up.
Fix: Re-read the collection and use a current id. Do not persist ids from this API between test runs.
405
The method is not allowed on that path.
Fix: Collection-level POST goes to `/objects`; PUT, PATCH and DELETE need an id, as in `/objects/{id}`.
400
Malformed JSON body or a missing `name` field on create.
Fix: Send `Content-Type: application/json` and include at least `name` in the body.
restful-api.dev API — frequently asked questions
Is restful-api.dev really free with no key?
Yes. There is no signup, no key and no token. Every request is anonymous, which also means anything you create is visible to everyone else.
Do POST requests actually persist?
Yes, unlike most fake APIs. Created objects are stored and returned by later GET requests, though the service prunes them periodically, so do not rely on long-term storage.
Why is the id a string when it looks like a number?
The API models ids as opaque strings so that generated ids for user-created objects can share the same field. Casting them to integers will break as soon as you create your own object.
How does it compare with JSONPlaceholder?
JSONPlaceholder fakes writes and always returns the same canned data, which is fine for read-only demos. restful-api.dev stores writes, so it is the better choice when you need to show a create-then-read flow.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
cURL to Fetch Converter
Paste a curl command and get a ready-to-use JavaScript fetch() snippet plus an axios version — method, headers, body and auth mapped automatically, all offline.
HTTP Status Code Lookup
Search HTTP status codes from 100 to 599 with name, category and clear description. Filter by number or text — a fast, free, private in-browser reference.
restful-api.dev is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.