sondahub / Social API / Comments
Fake comments API
8,000 comments from the Social API, a fake social media API. Comments on posts; a comment can answer another comment through parent_id.
Reads with filters, sorting, search and relations; writes that answer like a real server and stay in your session token. Same ids on every build. Free, no key, CORS open.
Connect
- List
- https://api.sondahub.com/v1/social/comments
- One record
- https://api.sondahub.com/v1/social/comments/{id}
- OpenAPI 3
- https://api.sondahub.com/v1/social/openapi.json
- GraphQL
- https://api.sondahub.com/v1/social/graphql
- JSON file
- https://api.sondahub.com/data/social/comments.json
- MCP
- https://api.sondahub.com/mcp · list_records
curl "https://api.sondahub.com/v1/social/comments?limit=3"
Sample records
Records 1 to 3 of 8,000, exactly as GET /v1/social/comments/{id} answers them. The data file holds all of them.
[
{
"id": 1,
"created_at": "2025-10-25T07:36:56Z",
"updated_at": "2025-10-25T07:36:56Z",
"post_id": 3480,
"author_id": 84,
"parent_id": null,
"body": "I disagree, but I see your point.",
"likes_count": 0,
"flagged": false
},
{
"id": 2,
"created_at": "2026-06-20T03:01:32Z",
"updated_at": "2026-06-20T03:01:32Z",
"post_id": 2642,
"author_id": 133,
"parent_id": null,
"body": "You convinced me.",
"likes_count": 30,
"flagged": false
},
{
"id": 3,
"created_at": "2025-09-23T05:12:09Z",
"updated_at": "2025-09-23T05:12:09Z",
"post_id": 2841,
"author_id": 148,
"parent_id": null,
"body": "This is great, thanks for sharing.",
"likes_count": 0,
"flagged": false
}
]
Fields
| Field | Type | Notes |
|---|---|---|
idread-only | int | Assigned by the server. Seed records keep their ids across restarts; records you create continue after the seed. |
created_atread-only | datetime | When the record was created (ISO 8601, UTC). |
updated_atread-only | datetime | When the record last changed. |
post_idrequired | int → posts | |
author_idrequired | int → users | |
parent_id | int → comments | |
bodyrequired | text | |
likes_countread-only | int | |
flagged | bool |
Relations: post → one post through post_id; author → one user through author_id; parent → one comment through parent_id; replies → the comments whose parent_id is this comment. Use ?expand=post,author,parent,replies to embed them, or the nested routes.
Endpoints
comments_count; DELETE lowers it.Try it
curl "https://api.sondahub.com/v1/social/comments?expand=post&limit=3"
curl https://api.sondahub.com/v1/social/comments/1?expand=post
curl "https://api.sondahub.com/v1/social/comments/1/replies?limit=5"
curl -i -X POST https://api.sondahub.com/v1/social/comments \
-H "Content-Type: application/json" \
-d '{"post_id":1,"author_id":1,"body":"A body"}'
curl "https://api.sondahub.com/v1/social/comments?sort=-id&limit=3" \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
curl -X PATCH https://api.sondahub.com/v1/social/comments/1 \
-H "Content-Type: application/json" \
-d '{"body":"Changed body"}'
curl -X DELETE https://api.sondahub.com/v1/social/comments/8001 \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Query recipes
Every list option works on comments; these are ready to paste. All the options.
| What | Request |
|---|---|
| Page 2, 50 at a time (of 8,000) | /v1/social/comments?page=2&limit=50 |
| Newest first by created at | /v1/social/comments?sort=-created_at&limit=5 |
| Only some fields | /v1/social/comments?fields=id,post_id&limit=5 |
| Embed the post | /v1/social/comments/1?expand=post |
| Its replies (nested route) | /v1/social/comments/1/replies?limit=5 |
| Just the count | /v1/social/comments?limit=1&fields=id |
GraphQL
The same comments as the comments query on https://api.sondahub.com/v1/social/graphql, and one comment as comment(id: 1). Introspection is on. More on the GraphQL API.
{
comments(limit: 3, sort: "-id") {
total
data {
id post_id author_id parent_id
post { language }
replies(limit: 2) { id }
}
}
}
curl https://api.sondahub.com/v1/social/graphql -H "Content-Type: application/json" -d '{"query": "{ comments(limit: 3, sort: \"-id\") { total data { id post_id author_id parent_id post { language } replies(limit: 2) { id } } } }"}'
From an AI agent (MCP)
The MCP server reaches the same rows with list_records, get_record, create_record, update_record and delete_record, and as the resource sondahub://social/comments.
curl https://api.sondahub.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_records","arguments":{"api":"social","collection":"comments","limit":3}}}'
More in the Social API
users (800) · posts (4,000) · likes (8,000) · follows (5,000)
The live streams, and the whole API on one page: Social API. Other worlds: fake e-commerce API, fake IoT API, fake banking API, fake helpdesk API, fake flight booking API, fake user directory API.