Posts API
Blog posts written by users 101-110, with tags, likes and nested comments. Hardcoded in-memory data: writes last until the app restarts.
Free: these endpoints need no account or key.
- GET
https://api.testingapis.com/api/PostsList posts with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/PostsCreate a post. - GET
https://api.testingapis.com/api/Posts/{id}Get a post by ID. - PUT
https://api.testingapis.com/api/Posts/{id}Update a post. - DELETE
https://api.testingapis.com/api/Posts/{id}Delete a post. - GET
https://api.testingapis.com/api/Posts/{id}/commentsList the comments on a post. - GET
https://api.testingapis.com/api/Posts/user/{userId}List the posts written by a user.
Example request
List posts with filtering, sorting, search and pagination. Full reference and a Send button.
cURL
curl -X GET "https://api.testingapis.com/api/Posts?limit=2"Response · 200 OK
[
{
"id": 1,
"userId": 101,
"title": "Getting Started with REST APIs",
"body": "REST APIs are the backbone of modern web applications. In this post, we'll cover the basics of HTTP methods, status codes, and request/re…
"tags": ["api", "tutorial", "beginner"],
"publishedAt": "2025-07-01T14:00:00Z",
"likes": 42
},
{
"id: 2,
… (3 more lines)Filtering, sorting and pagination
The list endpoint accepts limit, page, offset, sort, order and q, and any field name as an exact filter. Totals come back in the X-Total-Count header. Writes are kept in memory until the server restarts, so tests can create, change and delete records freely. Query parameter reference.