Prompt
Mock REST API for testing
Latest observation
Oct 6, 2026
OpenAI APIWeb search: off
Here are a few good options for a mock REST API for testing, depending on what you need:
Quick hosted mock APIs
- JSONPlaceholder — free fake REST endpoints for posts, comments, users, etc.
- ReqRes — good for auth/user flow testing.
- Mockoon Cloud / MockAPI — create custom mock endpoints.
Local mock server tools
- Mockoon — very easy GUI for creating local mock REST APIs.
- json-server — turns a JSON file into a REST API quickly.
npm install -g json-server json-server --watch db.json --port 3000 - WireMock — powerful for contract/integration testing.
- Prism — mock API from OpenAPI specs.
Example of a simple mock API using json-server
db.json
{
"users": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}
Run:
json-server --watch db.json --port 3000
Then test:
GET /usersGET /users/1POST /users
If you want, I can also give you:
- a local mock REST API setup
- a Docker-based mock API
- a mock API with auth/errors/pagination