sondahub

sondahub / Social API / Posts

Fake posts API

4,000 posts from the Social API, a fake social media API. What people write. hashtags is an array; filter with ?hashtags_like=coffee.

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/posts
One record
https://api.sondahub.com/v1/social/posts/{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/posts.json
MCP
https://api.sondahub.com/mcp · list_records
The first three posts
curl "https://api.sondahub.com/v1/social/posts?limit=3"

Sample records

Records 1 to 3 of 4,000, exactly as GET /v1/social/posts/{id} answers them. The data file holds all of them.

[
  {
    "id": 1,
    "created_at": "2026-03-05T10:07:56Z",
    "updated_at": "2026-03-05T10:07:56Z",
    "author_id": 537,
    "body": "Can we talk about building a bookshelf. Would do it again.",
    "hashtags": [],
    "media": [],
    "visibility": "followers",
    "reply_to_id": null,
    "likes_count": 1,
    "comments_count": 4,
    "reposts_count": 0,
    "language": "en",
    "published_at": "2026-03-05T10:07:56Z",
    "edited_at": null
  },
  {
    "id": 2,
    "created_at": "2026-02-20T05:03:08Z",
    "updated_at": "2026-02-20T05:03:08Z",
    "author_id": 416,
    "body": "Quick thought on the book club pick. Worth every minute. #diy",
    "hashtags": [
      "diy"
    ],
    "media": [
      {
        "kind": "image",
        "url": "/v1/social/posts/2/media/1.svg",
        "alt": "homemade pasta"
      }
    ],
    "visibility": "public",
    "reply_to_id": null,
    "likes_count": 2,
    "comments_count": 0,
    "reposts_count": 0,
    "language": "en",
    "published_at": "2026-02-20T05:03:08Z",
    "edited_at": null
  },
  {
    "id": 3,
    "created_at": "2026-03-01T20:50:54Z",
    "updated_at": "2026-03-01T20:50:54Z",
    "author_id": 205,
    "body": "Can we talk about restoring a bicycle. Never again. #diy",
    "hashtags": [
      "diy"
    ],
    "media": [
      {
        "kind": "image",
        "url": "/v1/social/posts/3/media/1.svg",
        "alt": "street photography"
      }
    ],
    "visibility": "followers",
    "reply_to_id": null,
    "likes_count": 1,
    "comments_count": 7,
    "reposts_count": 2,
    "language": "en",
    "published_at": "2026-03-01T20:50:54Z",
    "edited_at": null
  }
]

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.
author_idrequiredint → users
bodyrequiredtext
hashtagsjson string[]
mediajson { kind, url, alt? }[]
visibilityenumpublic followers private
reply_to_idint → postsSet when the post is a reply.
likes_countread-onlyint
comments_countread-onlyint
reposts_countread-onlyint
languagestring
published_atdatetime
edited_atdatetime

Relations: author → one user through author_id; reply_to → one post through reply_to_id; comments → the comments whose post_id is this post; likes → the likes whose post_id is this post. Use ?expand=author,comments,likes,reply_to to embed them, or the nested routes.

Endpoints

POST fills defaults (public, empty hashtags, now) and bumps the author’s posts_count.
GET/v1/social/postsA page, with every filter, sort, search, field and expand option.
POST/v1/social/postsCreate 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/posts/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/social/posts/{id}Change the fields you send.
PUT/v1/social/posts/{id}Replace the record; required fields must all be there.
DELETE/v1/social/posts/{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/posts/{id}/authorThe user this record points at.
GET/v1/social/posts/{id}/commentsIts comments, as a page with all the list options.
GET/v1/social/posts/{id}/likesIts likes, as a page with all the list options.
GET/v1/social/posts/{id}/reply_toThe post this record points at.

Try it

List with a filter
curl "https://api.sondahub.com/v1/social/posts?visibility=followers&expand=author&limit=3"
One record
curl https://api.sondahub.com/v1/social/posts/1?expand=author
Its comments
curl "https://api.sondahub.com/v1/social/posts/1/comments?limit=5"
Create
curl -i -X POST https://api.sondahub.com/v1/social/posts \
  -H "Content-Type: application/json" \
  -d '{"author_id":1,"body":"A body","visibility":"public","language":"en"}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/social/posts?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/posts/1 \
  -H "Content-Type: application/json" \
  -d '{"visibility":"followers"}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/social/posts/4001 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

Every list option works on posts; these are ready to paste. All the options.

WhatRequest
Page 2, 50 at a time (of 4,000)/v1/social/posts?page=2&limit=50
Only visibility = public/v1/social/posts?visibility=public
Newest first by created at/v1/social/posts?sort=-created_at&limit=5
Language contains “en”/v1/social/posts?language_like=en
Full-text search/v1/social/posts?q=en
Only some fields/v1/social/posts?fields=id,language&limit=5
Embed the author/v1/social/posts/1?expand=author
Its comments (nested route)/v1/social/posts/1/comments?limit=5
Just the count/v1/social/posts?limit=1&fields=id

GraphQL

The same posts as the posts query on https://api.sondahub.com/v1/social/graphql, and one post as post(id: 1). Introspection is on. More on the GraphQL API.

{
  posts(limit: 3, sort: "-id", filter: { visibility: public }) {
    total
    data {
      id author_id body visibility
      author { username }
      comments(limit: 2) { id }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/social/graphql -H "Content-Type: application/json" -d '{"query": "{ posts(limit: 3, sort: \"-id\", filter: { visibility: public }) { total data { id author_id body visibility author { username } comments(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/posts.

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":"posts","filters":{"visibility":"public"},"limit":3}}}'

More in the Social API

users (800) · comments (8,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.