sondahub

sondahub / Social API / Likes

Fake likes API

8,000 likes from the Social API, a fake social media API. A user liking a post. POST one to like; DELETE it to unlike.

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

Sample records

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

[
  {
    "id": 1,
    "created_at": "2026-01-03T14:20:21Z",
    "updated_at": "2026-01-03T14:20:21Z",
    "user_id": 476,
    "post_id": 2427
  },
  {
    "id": 2,
    "created_at": "2026-01-30T10:20:45Z",
    "updated_at": "2026-01-30T10:20:45Z",
    "user_id": 35,
    "post_id": 2532
  },
  {
    "id": 3,
    "created_at": "2026-08-21T17:10:57Z",
    "updated_at": "2026-08-21T17:10:57Z",
    "user_id": 302,
    "post_id": 1484
  }
]

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.
user_idrequiredint → users
post_idrequiredint → posts

Relations: user → one user through user_id; post → one post through post_id. Use ?expand=user,post to embed them, or the nested routes.

Endpoints

POST refuses a second like of the same post by the same user (409 already_liked) and bumps the post’s likes_count; DELETE lowers it.
GET/v1/social/likesA page, with every filter, sort, search, field and expand option.
POST/v1/social/likesCreate 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/likes/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/social/likes/{id}Change the fields you send.
PUT/v1/social/likes/{id}Replace the record; required fields must all be there.
DELETE/v1/social/likes/{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/likes/{id}/userThe user this record points at.
GET/v1/social/likes/{id}/postThe post this record points at.

Try it

List with a filter
curl "https://api.sondahub.com/v1/social/likes?expand=user&limit=3"
One record
curl https://api.sondahub.com/v1/social/likes/1?expand=user
Create
curl -i -X POST https://api.sondahub.com/v1/social/likes \
  -H "Content-Type: application/json" \
  -d '{"user_id":1,"post_id":1}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/social/likes?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/likes/1 \
  -H "Content-Type: application/json" \
  -d '{}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/social/likes/8001 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

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

WhatRequest
Page 2, 50 at a time (of 8,000)/v1/social/likes?page=2&limit=50
Newest first by created at/v1/social/likes?sort=-created_at&limit=5
Only some fields/v1/social/likes?fields=id,user_id&limit=5
Embed the user/v1/social/likes/1?expand=user
Just the count/v1/social/likes?limit=1&fields=id

GraphQL

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

{
  likes(limit: 3, sort: "-id") {
    total
    data {
      id user_id post_id
      user { username }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/social/graphql -H "Content-Type: application/json" -d '{"query": "{ likes(limit: 3, sort: \"-id\") { total data { id user_id post_id user { username } } } }"}'

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/likes.

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":"likes","limit":3}}}'

More in the Social API

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