Skip to Content

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 toRead
Make your first callQuickstart
See what each platform offersPlatforms
Look up an endpoint's parameters and answerAPI Reference
Understand answers, ids, paging, errors and costsCore Concepts
Call the API from TypeScript or PythonSDKs
Let Claude, Cursor or another agent read social dataMCP Server

How It Works

A few words come up on every page.

ConceptWhat it isExample
WorkspaceYour team, with its credits, API keys and logsSet by your API key
API keyWhat your requests authenticate withsapi_…
CreditWhat calls are paid withSee Credits
PlatformWhere the data comes from, the first segment of the pathtiktok, youtube, reddit…
ProfileAn account on a platform@nike
PostA post, reel, video or threadIts link, or its id
CursorWhere the next page of a list startspagination.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" });
Response
{
  "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.