sondahub

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
The first three comments
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

FieldTypeNotes
idread-onlyintAssigned by the server. Seed records keep their ids across restarts; records you create continue after the seed.
created_atread-onlydatetimeWhen the record was created (ISO 8601, UTC).
updated_atread-onlydatetimeWhen the record last changed.
post_idrequiredint → posts
author_idrequiredint → users
parent_idint → comments
bodyrequiredtext
likes_countread-onlyint
flaggedbool

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

POST bumps the post’s comments_count; DELETE lowers it.
GET/v1/social/commentsA page, with every filter, sort, search, field and expand option.
POST/v1/social/commentsCreate one: 201 with the record, its id, a Location header and the session token that keeps it; 422 names each field that is wrong.
GET/v1/social/comments/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/social/comments/{id}Change the fields you send.
PUT/v1/social/comments/{id}Replace the record; required fields must all be there.
DELETE/v1/social/comments/{id}Answers 200 with what was removed (a real server’s 204 lives at /v1/utils/status/204); gone for the session.
GET/v1/social/comments/{id}/postThe post this record points at.
GET/v1/social/comments/{id}/authorThe user this record points at.
GET/v1/social/comments/{id}/parentThe comment this record points at.
GET/v1/social/comments/{id}/repliesIts comments, as a page with all the list options.

Try it

List with a filter
curl "https://api.sondahub.com/v1/social/comments?expand=post&limit=3"
One record
curl https://api.sondahub.com/v1/social/comments/1?expand=post
Its replies
curl "https://api.sondahub.com/v1/social/comments/1/replies?limit=5"
Create
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"}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/social/comments?sort=-id&limit=3" \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Change one field
curl -X PATCH https://api.sondahub.com/v1/social/comments/1 \
  -H "Content-Type: application/json" \
  -d '{"body":"Changed body"}'
Delete the one you created
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.

WhatRequest
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 }
    }
  }
}
Run it
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.

tools/call
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.