Fake Posts API

100 dummy blog posts with tags and nested comments — a JSONPlaceholder-compatible endpoint for prototypes and tutorials. Part of the MockServer Fake REST API.

Base URL
https://mockserver.in/fake-api/v1/posts
Endpoints
GET
/fake-api/v1/posts
List all Posts (100 records)
GET
/fake-api/v1/posts?_page=2&_limit=10
Paginated — returns X-Total-Count header
GET
/fake-api/v1/posts?userId=56
Filter by userId
GET
/fake-api/v1/posts/1
Get a single record by id
GET
/fake-api/v1/posts/1/comments
Nested — comments belonging to this record
POST
/fake-api/v1/posts
Create (simulated) — echoes body + new id, 201
PUT
/fake-api/v1/posts/1
Replace (simulated) — echoes body
PATCH
/fake-api/v1/posts/1
Update (simulated) — echoes body
DELETE
/fake-api/v1/posts/1
Delete (simulated) — returns {}
Code Examples

    

Need custom responses, status codes or latency?

Build your own mock API in 10 seconds — your JSON, your status codes, failure simulation, request logs. No signup needed.

Create a Mock API Create free account

What is the fake posts API?

This is a free hosted REST API that returns 100 realistic dummy posts records as JSON. It works like JSONPlaceholder: read endpoints return consistent sample data, and write endpoints (POST, PUT, PATCH, DELETE) respond realistically without persisting anything. Use it in tutorials, prototypes, UI development, interview exercises, and automated tests — anywhere you need an API that always works and never needs a backend.

Pagination and filtering

Collections support JSONPlaceholder-style pagination via ?_page= and ?_limit= (max 100 per page). Every paginated response includes an X-Total-Count header. You can also filter with simple equality parameters: ?userId= .

Sample record

Every post record has this shape:

{
    "id": 1,
    "userId": 56,
    "title": "How to Learn a New Language Without Losing Your Mind",
    "body": "I kept a simple log of what worked and what did not, and rereading it later changed my whole approach. I asked a dozen people who had done it before, and the overlap in their answers was remarkably small. When I first started, I assumed it would take a weekend at most, and I was wrong in every way that matters.",
    "tags": [
        "work"
    ]
}

Frequently asked questions

Yes. Every endpoint on this page is free, requires no signup and no API key. Requests are rate-limited to 120 per minute per IP to keep the service fast for everyone.

No — writes are simulated, exactly like JSONPlaceholder. The API responds with a realistic success payload (your body echoed back with an id) but the underlying dataset never changes, so every developer always sees the same 100 records.

Yes. All endpoints send Access-Control-Allow-Origin: * and handle OPTIONS preflight requests, so you can fetch() them directly from any web app, CodePen or local file.

Use ?_page= and ?_limit= query parameters (JSONPlaceholder-compatible). The response includes an X-Total-Count header with the total number of records so you can render pagers.

That is exactly what MockServer does — create a custom mock API with your own JSON, status codes, latency and failure simulation in about 10 seconds, no signup required for Quick Mocks.