Documentation
Introduction
What SocialAPI is, how its requests and answers are shaped, and where to start.
SocialAPI reads public data from the major platforms with one API key and one schema.
Where to Find What
Start from what you want to do.
| You want to | Read |
|---|---|
| Make your first call | Quickstart |
| See what each platform offers | Platforms |
| Look up an endpoint's parameters and answer | API Reference |
| Understand answers, ids, paging, errors and costs | Core Concepts |
| Call the API from TypeScript or Python | SDKs |
| Let Claude, Cursor or another agent read social data | MCP Server |
How It Works
A few words come up on every page.
| Concept | What it is | Example |
|---|---|---|
| Workspace | Your team, with its credits, API keys and logs | Set by your API key |
| API key | What your requests authenticate with | sapi_… |
| Credit | What calls are paid with | See Credits |
| Platform | Where the data comes from, the first segment of the path | tiktok, youtube, reddit… |
| Profile | An account on a platform | @nike |
| Post | A post, reel, video or thread | Its link, or its id |
| Cursor | Where the next page of a list starts | pagination.nextCursor |
The Request Shape
Every endpoint is a GET with the platform and the thing to read in its path, and what to read as query parameters. This reads a TikTok profile:
import { SocialAPI } from "@socialapihq/sdk";
const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });
const { data } = await client.tiktok.profile({ handle: "nike" });{
"data": {
"id": "208464585232822272",
"username": "nike",
"displayName": "Nike",
"bio": "Just Do It.",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e0b0ac7b6ad6447a8e923fd1eb162f2c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=c73b1f8a&x-expires=1795730400&x-signature=WFCAToitWtbkgo5qXRwrQmcX%2FZY%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",
"url": "https://www.tiktok.com/@nike",
"verified": true,
"private": false,
"followers": 9440793,
"following": 94,
"likes": 51312842,
"posts": 1131,
"externalUrl": "http://empli.fi/niketiktok",
"createdAt": null,
"ext": {
"secUid": "MS4wLjABAAAA_3ndMt8d_tECTdpKgCxcx238tOnQZX-20wqN01aMui5zQ7hsqSdff-jC5qYC-Cl_",
"friends": 47,
"liked": 0,
"category": "Sports, Fitness & Outdoors",
"seller": false,
"likesPublic": false,
"roomId": null
}
}
}Every platform answers with the same fields. An account on any platform is a Profile, and what only one platform has sits under ext. One item comes as { "data": … }, a list as { "data": [...], "pagination": … }. See Responses.
Every request goes to https://api.socialapi.sh with your API key. A call that fails costs nothing.
What to Read Next
QuickstartYour API key, a free first call and a page of posts.AuthenticationCreate an API key and send it with your requests.Compare PlatformsWhat each platform offers and where its lists end.API ReferenceEvery endpoint, with a real request and answer.SDKsTyped clients for TypeScript and Python.MCP ServerRead social data from Claude, Cursor and more.