S SCHEMA.BIZ

Last updated:

Free Fake API for Testing

A fake API with related data, open to every origin, no key needed.

How to use the fake API

Pick an example above or type an address after /fake/v1/, then choose Send: the box shows the status, the headers that matter and the JSON. From your own code, call the same addresses on https://schema.biz. A GET returns fixed records; a POST, PUT, PATCH or DELETE is checked and answered as if it worked, but nothing is saved, so every visitor always sees the same data.

There are 8 resources with 760 records between them, linked by ids: a post belongs to a user, a comment to a post and a user, a review to a product. The data was generated from a JSON Schema per resource by the Mock Data Generator's engine with a fixed seed, and every record passes its schema.

Base URL and resources

https://schema.biz/fake/v1
ResourceRecordsWhat's in itNested lists
/users 30 People with an email, phone, company, address and role. /users/1/posts, /users/1/comments, /users/1/todos, /users/1/orders, /users/1/carts, /users/1/reviews
/posts 100 Blog posts, each written by a user, with tags. /posts/1/comments
/comments 200 Comments on posts, each by a user. none
/todos 150 To-do items, each belonging to a user, done or not. none
/products 50 Products with a category, price, stock count, SKU and rating. /products/1/reviews
/orders 60 Orders placed by users: line items, a status, a shipping address and a total. none
/carts 20 Shopping carts, one per user at most, with line items and a total. none
/reviews 150 Product reviews by users, rated 1 to 5. none

Each resource has a list (/users) and records by id (/users/1). Ids are whole numbers starting at 1. A nested list is the same as a filter: /users/1/posts returns what /posts?userId=1 does. /fake/v1/ on its own lists the resources and their addresses.

Every parameter

ParameterExampleWhat it does
any field?userId=1&completed=falseOnly records whose field equals the value. Repeat a field to match any of several values: ?userId=1&userId=2. Fields that hold an object or a list, such as an address, can't be filtered; search them with _q.
_q?_q=chicagoFull-text search: records with any text value, nested ones included, that contains the term, ignoring case.
_sort, _order?_sort=price&_order=descSort by one or more fields, separated by commas, each asc (the default) or desc.
_page, _limit?_page=2&_limit=10Page through a list: 100 records a page at most, 10 by default. With either, the response has a Link header with the first, previous, next and last pages.
_delay?_delay=1500Wait this many milliseconds before answering, up to 3,000.
_status?_status=404Answer with this status, from 400 to 599, as problem details, instead of the real response.

Every list response has an X-Total-Count header: how many records matched, before paging. A parameter the API doesn't know, a field a resource doesn't have, or a value out of range gets a 400 that says what's allowed, so a typo doesn't silently return everything. A lone _ parameter, the cache-buster some libraries add, is ignored.

curl -i "https://schema.biz/fake/v1/comments?_page=2&_limit=10"

x-total-count: 200
link: <https://schema.biz/fake/v1/comments?_page=1&_limit=10>; rel="first", <https://schema.biz/fake/v1/comments?_page=1&_limit=10>; rel="prev", <https://schema.biz/fake/v1/comments?_page=3&_limit=10>; rel="next", <https://schema.biz/fake/v1/comments?_page=20&_limit=10>; rel="last"

Examples for each resource

Each block shows the same three things with a different resource: a filtered list with fetch, one record with curl, and a write with axios. The write's body is a valid record, so it gets a 201; change a field to see the 422.

Users: /users

People with an email, phone, company, address and role. You can filter on id, name, email, phone, website, company, role and createdAt.

const response = await fetch("https://schema.biz/fake/v1/users?role=admin");
const users = await response.json();
console.log(response.headers.get("X-Total-Count"), users);
curl https://schema.biz/fake/v1/users/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/users", {
  "name": "Christopher Anderson",
  "email": "joseph_lopez@example.com",
  "phone": "(793) 682-4632",
  "website": "https://www.sunt.io/ut",
  "company": "Moore Ltd",
  "role": "editor",
  "address": {
    "street": "Pine Rd",
    "city": "Los Angeles",
    "zipcode": "10979",
    "country": "US"
  },
  "createdAt": "2024-05-01T19:37:20Z"
});
// status 201: the new user, with the next id. Nothing is stored.

Posts: /posts

Blog posts, each written by a user, with tags. You can filter on id, userId, title, body, published and createdAt.

const response = await fetch("https://schema.biz/fake/v1/posts?userId=1&_sort=createdAt&_order=desc");
const posts = await response.json();
console.log(response.headers.get("X-Total-Count"), posts);
curl https://schema.biz/fake/v1/posts/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/posts", {
  "userId": 29,
  "title": "Ullamco exercitation voluptate consequat mollit dolor",
  "body": "Veniam ullamco officia ad aute anim dolor ut laboris voluptate esse ullamco fugiat reprehenderit ex mollit elit culpa magna qui laborum in aliquip officia voluptate cupidatat labore reprehenderit consectetur nulla consectetur adipiscing dolore amet sint enim amet pariatur duis nostrud et ex velit non est fugiat tempor dolor officia elit duis pariatur duis fugiat sit laborum ex fugiat sint aliqua ea nisi labore id irure incididunt dolore esse id laborum cupidatat cupidatat esse duis esse lorem cupidatat qui sit lorem ex labore enim laborum",
  "tags": [
    "schema",
    "backend",
    "frontend"
  ],
  "published": false,
  "createdAt": "2026-07-04T04:53:22Z"
});
// status 201: the new post, with the next id. Nothing is stored.

Comments: /comments

Comments on posts, each by a user. You can filter on id, postId, userId, body and createdAt.

const response = await fetch("https://schema.biz/fake/v1/comments?postId=1");
const comments = await response.json();
console.log(response.headers.get("X-Total-Count"), comments);
curl https://schema.biz/fake/v1/comments/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/comments", {
  "postId": 23,
  "userId": 22,
  "body": "Nostrud excepteur dolor cillum id exercitation excepteur ad do amet consectetur et mollit sint",
  "createdAt": "2021-03-07T07:42:54Z"
});
// status 201: the new comment, with the next id. Nothing is stored.

Todos: /todos

To-do items, each belonging to a user, done or not. You can filter on id, userId, title, completed and dueDate.

const response = await fetch("https://schema.biz/fake/v1/todos?userId=1&completed=false");
const todos = await response.json();
console.log(response.headers.get("X-Total-Count"), todos);
curl https://schema.biz/fake/v1/todos/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/todos", {
  "userId": 14,
  "title": "Aliqua minim consectetur do dolor deserunt",
  "completed": false,
  "dueDate": "2024-05-19"
});
// status 201: the new todo, with the next id. Nothing is stored.

Products: /products

Products with a category, price, stock count, SKU and rating. You can filter on id, title, description, category, price, stock, sku and rating.

const response = await fetch("https://schema.biz/fake/v1/products?category=books&_sort=price");
const products = await response.json();
console.log(response.headers.get("X-Total-Count"), products);
curl https://schema.biz/fake/v1/products/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/products", {
  "title": "Esse esse sit veniam ut duis cillum",
  "category": "toys",
  "price": 388.06,
  "stock": 108,
  "sku": "FRZ-4267"
});
// status 201: the new product, with the next id. Nothing is stored.

Orders: /orders

Orders placed by users: line items, a status, a shipping address and a total. You can filter on id, userId, status, total and createdAt.

const response = await fetch("https://schema.biz/fake/v1/orders?status=shipped&_page=1&_limit=5");
const orders = await response.json();
console.log(response.headers.get("X-Total-Count"), orders);
curl https://schema.biz/fake/v1/orders/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/orders", {
  "userId": 11,
  "status": "delivered",
  "items": [
    {
      "productId": 10,
      "quantity": 5,
      "unitPrice": 151.47
    },
    {
      "productId": 30,
      "quantity": 4,
      "unitPrice": 215.26
    },
    {
      "productId": 24,
      "quantity": 2,
      "unitPrice": 468.76
    }
  ],
  "total": 2555.91,
  "shippingAddress": {
    "street": "Cedar Ln",
    "city": "Phoenix",
    "zipcode": "58036",
    "country": "US"
  },
  "createdAt": "2024-02-03T02:01:43Z"
});
// status 201: the new order, with the next id. Nothing is stored.

Carts: /carts

Shopping carts, one per user at most, with line items and a total. You can filter on id, userId, total and updatedAt.

const response = await fetch("https://schema.biz/fake/v1/carts?userId=3");
const carts = await response.json();
console.log(response.headers.get("X-Total-Count"), carts);
curl https://schema.biz/fake/v1/carts/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/carts", {
  "userId": 9,
  "items": [
    {
      "productId": 49,
      "quantity": 5,
      "unitPrice": 67.01
    },
    {
      "productId": 39,
      "quantity": 1,
      "unitPrice": 330.49
    },
    {
      "productId": 3,
      "quantity": 2,
      "unitPrice": 206.54
    }
  ],
  "total": 1078.62,
  "updatedAt": "2026-04-13T09:05:40Z"
});
// status 201: the new cart, with the next id. Nothing is stored.

Reviews: /reviews

Product reviews by users, rated 1 to 5. You can filter on id, productId, userId, rating, title, body and createdAt.

const response = await fetch("https://schema.biz/fake/v1/reviews?productId=1&_sort=rating&_order=desc");
const reviews = await response.json();
console.log(response.headers.get("X-Total-Count"), reviews);
curl https://schema.biz/fake/v1/reviews/1
import axios from "axios";

const { data, status } = await axios.post("https://schema.biz/fake/v1/reviews", {
  "productId": 20,
  "userId": 23,
  "rating": 2,
  "title": "Pariatur exercitation excepteur do",
  "body": "Consectetur sit nisi",
  "createdAt": "2024-10-18T18:13:13Z"
});
// status 201: the new review, with the next id. Nothing is stored.

Writes: checked, answered, never stored

POST to a list creates a record: the answer is a 201 with the record and the next id, and a Location header. PUT replaces a record and PATCH changes some of its fields, each answering 200 with the result; DELETE answers 200 with the record it would have deleted. A POST to a nested list, such as /users/4/todos, fills in the parent's id for you. Bodies must be JSON sent with Content-Type: application/json, up to 16 KB. The id is always the API's to choose, so an id in the body is ignored.

curl -i -X POST https://schema.biz/fake/v1/todos \
  -H "Content-Type: application/json" \
  -d '{"userId": 1, "title": "Write tests", "completed": false}'

HTTP/2 201
location: https://schema.biz/fake/v1/todos/151
x-fake-api: not-persisted

{ "id": 151, "userId": 1, "title": "Write tests", "completed": false }

Every body is checked against the resource's JSON Schema: required fields, types, allowed values such as a todo's completed being true or false, lengths, patterns such as a product's SKU, and references, such as a userId that must be between 1 and 30. A body that doesn't fit gets a 422 that lists every problem with a JSON pointer to it, which is what a form's error messages need.

Errors

Errors are problem details (RFC 9457) with the content type application/problem+json: a type linking here, a title, the status, a detail written for people, and kind, a short name for the error. A 422 adds errors.

curl -X POST https://schema.biz/fake/v1/todos -H "Content-Type: application/json" -d '{"userId":99,"title":"Write tests"}'

HTTP/2 422
content-type: application/problem+json; charset=utf-8

{
  "type": "https://schema.biz/api/fake-api/#errors",
  "title": "Unprocessable Content",
  "status": 422,
  "detail": "The body doesn't match the schema: The body needs the property \"completed\". (and 1 more)",
  "kind": "invalid",
  "errors": [
    {
      "pointer": "/completed",
      "message": "The body needs the property \"completed\"."
    },
    {
      "pointer": "/userId",
      "message": "userId must be at most 30."
    }
  ]
}
StatusWhen
400An unknown parameter or field, a value out of range, or a body that isn't valid JSON.
404No such resource, record or nested list.
405A method the address doesn't take, such as PUT on a list; the Allow header lists the ones it does.
413A body over 16 KB.
415A body that isn't sent as JSON.
422A JSON body that doesn't match the resource's schema.
429More than 60 requests in a minute from one address; Retry-After says how many seconds to wait.
Any 4xx or 5xxThe status you asked for with _status.

OpenAPI spec

The API describes itself in an OpenAPI 3.1 document at /fake/v1/openapi.json, built from the same schemas that check the writes. It passes the OpenAPI Validator with no errors or warnings, and our tests check the API's responses to each kind of request, errors included, against it. Open the spec in the OpenAPI Editor to browse its 64 operations, or point a client generator at its address.

Limits and uptime

  • Rate: 60 requests a minute from one IP address, counted by each server separately, so it's approximate. A 429 tells you to wait.
  • Size: request bodies up to 16 KB; lists of up to 200 records, about 60 KB at most.
  • Caching: GET responses may be cached for 5 minutes (Cache-Control: public, max-age=300); writes and errors aren't cached.
  • Uptime: best effort. It runs on Cloudflare's network with the rest of schema.biz, but there's no service-level agreement, and the data may change between versions of the site (the address stays /v1/ while the shapes stay compatible). Don't build anything that must not break on it.

Fake API vs JSONPlaceholder, DummyJSON and reqres

Several free fake REST APIs exist, and each suits something different. This comparison comes from each service's own documentation, checked on 7 November 2026; they change, so check before you depend on a detail.

Schema.bizJSONPlaceholderDummyJSONreqres
Resources8, from users to orders and reviews6: posts, comments, albums, photos, todos, usersProducts, carts, users, posts, comments, todos, quotes, recipesUsers and a sample resource on the free demo; your own collections with a free account
Key or accountNoneNoneNoneNone for the demo endpoints; a free account's key for your own data
WritesChecked against a schema (422 with each problem), not storedFaked, not storedSimulated, not storedDemo: not saved. Your own collections: stored
Filtering and searchAny field, full-text _qBy fieldSearch on products, users, posts and recipes; select to pick fieldsPaging on lists
Paging and sorting_page/_limit with Link and X-Total-Count; _sort/_orderNot in its guidelimit/skip; sortBy/orderpage/per_page
Delay and errors_delay up to 3 s; any status with _statusNodelay up to 5 s; a chosen status at /http/<code>delay
Login flowNoNoYes, JWT login and refreshSample login and register endpoints
OpenAPI specYes, 3.1NoNoNo

JSONPlaceholder is the classic: tutorials have used its posts and todos for years, so it's the one readers will recognize. DummyJSON has richer product and recipe data and a login flow to practice authentication against. reqres keeps a small keyless demo, and with a free account (250 requests a day) stores data you create, which none of the others do; paid plans raise the limits. This API is for code that should handle what a real API does: validation errors, paging headers, failures and slow responses, all described in a spec.

FAQ

Is anything I send to the fake API stored?

No. A POST, PUT, PATCH or DELETE is checked against the resource's schema and answered as if it worked, then thrown away: the next request sees the original data. Every response carries the header X-Fake-API: not-persisted. We don't log requests either; for one request in 100 we keep a usage record with the resource, method and status code only. See the privacy policy.

Do I need an API key or an account?

No. There's no key, no sign-up and no authentication, and CORS is open to every origin, so you can call it from a page on localhost, a CodePen or a test runner. The only limit is 60 requests a minute from one IP address.

How do I make a request fail on purpose?

Add _status with any code from 400 to 599, such as ?_status=503, and the API answers with that status as problem details instead of the real response (a 429 or 503 also gets Retry-After: 1). Add _delay=2000 to wait two seconds first, to see a loading state. Both work on every address and method.

Can I use it in automated tests?

For a tutorial, a demo or a quick check, yes. For tests that run on every commit, a mock that runs next to your tests is faster and never depends on the network. The OpenAPI mock server generator turns a spec, this API's included, into Mock Service Worker handlers, a json-server database or a Prism command, all made in your browser.

How is it different from JSONPlaceholder?

Both serve fixed related data and fake their writes. This API also checks write bodies against a schema and returns a 422 listing each problem, can simulate any error status and a delay, documents itself in an OpenAPI 3.1 file, and returns errors as RFC 9457 problem details. Its paging and sorting parameters are named like json-server 0.17's, so code written for JSONPlaceholder usually needs only the base address changed; full-text search is _q here.

Related tools