Unified Social Media Data API: One Schema for 9 Networks
A unified social media data API returns public data from several social networks through one endpoint and one response schema, so your code reads followers the same way on every network instead of learning nine different formats. SocialLens does this for TikTok, Instagram, YouTube, Facebook, X, Reddit, LinkedIn, Threads and Pinterest. This page is the reference for that schema: the request shape, the three response shapes, exactly which fields are filled on each network, and tested code that normalizes all of them into one record.
What "unified" means here, and what it does not
Two different products are sold under the name "unified social media API", and it is worth separating them before going further.
A unified publishing API lets your app post, schedule and reply on many networks on behalf of users who connected their accounts. It is built on OAuth: each user logs in to each network and grants permission, and the API acts as that user.
A unified data API reads public information about any account: follower counts, profile details, posts and their counters. Nobody logs in. The target can be an account you have no relationship with, such as a competitor or a creator you are evaluating.
SocialLens is the second kind. It does not publish and it does not return private analytics. It reads what a profile or a post shows publicly and returns it in one schema.
The problem it solves: nine networks, nine vocabularies
Reading one network is not hard. The cost appears with the second one, because nothing lines up.
- Names. The same concept is called
followers_countin one API,follower_countin another,subscriberCountin a third, and nested underpublic_metricsin a fourth. - Types. Some sources return numbers, some return numbers as strings, some return display text such as "1.2M".
- Precision. Most networks expose the full follower number. YouTube publishes three significant figures to everyone.
- Units. On most networks the unit is an account. On Reddit it is a community. On LinkedIn it can be a person or a company. On Pinterest it can be a user, a board or a pin.
- Gaps. Instagram has no profile level like total. Threads has no following count on the profile. LinkedIn shows no post engagement publicly.
- Access. Every official API has its own registration, approval, token and quota model. They are compared network by network in Social Media APIs Compared.
A unified data API absorbs those differences once, in one place, and documents what is left. The part that is left matters: a schema that pretends every network has every field produces wrong data. A good one tells you which values are exact, which are missing and why.
One request shape
Four endpoints cover profiles, lists of posts, single posts and comments. All of them take platform and either username or url, and all use the same Bearer key.
curl "https://api.sociallens.dev/v1/profile?platform=threads&username=zuck" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
Coverage by network, verified with live calls on November 22, 2026:
| Network | /v1/profile |
/v1/profile-posts |
/v1/post by URL |
/v1/post-comments |
|---|---|---|---|---|
| TikTok | Yes | Yes | Yes | Yes |
| Yes | Yes | Yes | Yes | |
| YouTube | Yes | Yes | Yes | Yes |
| Yes | Yes | Yes | Yes | |
| X | Yes | Yes | Yes | No |
| Threads | Yes | Yes | Yes | No |
| Yes, as a subreddit | Yes | Yes | Yes | |
| Yes | Yes, pins of a board | Yes, a pin | No | |
| Yes, company or person | Yes, company posts without counters | No | No |
TikTok also has /v1/followers and /v1/following, which return the lists themselves. No other network exposes those lists publicly.
The creator profile shape
Seven networks answer /v1/profile with the same object. This is a real response for Threads:
{
"exists": true,
"username": "zuck",
"platform": "threads",
"nickname": "Mark Zuckerberg",
"verified": true,
"private": false,
"followers": 5782430,
"followers_rounded": 5782430,
"is_exact": true,
"following": null,
"likes": null,
"videos": 0,
"bio": "Mostly superintelligence and MMA takes",
"avatar": "https://scontent-lax3-2.cdninstagram.com/...",
"id": "63055343223",
"created_at": null,
"external_link": null,
"category": null,
"fetched_at": "2026-11-22T23:53:32Z",
"cached": false,
"source_cached": false
}
The keys are identical on every network. What changes is which ones carry a value:
| Network | followers |
following |
likes |
videos |
created_at |
|---|---|---|---|---|---|
| TikTok | Exact | Yes | Total likes received | Videos posted | ISO date |
| Exact | Yes | null |
Posts | null |
|
| YouTube | Rounded, is_exact: false |
null |
Total channel views | Uploads | Plain date |
| Exact | null |
null |
0, not published | Plain date | |
| X | Exact | Yes | null |
Total posts | ISO date |
| Threads | Exact | null |
null |
0, not published | null |
| Exact | null |
null |
Boards, also in boards_count |
null |
Two notes on reading this table. First, likes and videos are generic slots: likes is the profile level engagement total a network publishes, and videos is its publication count. The table says what each one holds. Second, on Facebook and Threads videos is 0 because those networks do not publish a post total on the profile, so do not interpret that zero as an empty account.
The community shape and the company shape
Two networks do not fit the creator profile, and the API does not force them into it.
Reddit answers with type: "subreddit". The audience number is active_users, the weekly active figure, next to weekly_contributions. There is no followers field. subscribers is present and null. Full detail in Reddit Subreddit Stats API.
LinkedIn companies answer with type: "company": name, handle, followers, employee_count, location, website, description. LinkedIn people answer with type: "person", which is close to the creator profile and adds location and experience. Full detail in LinkedIn Company Data API.
Creator profiles have no type key. So one check tells you what you are holding:
function audienceOf(p) {
if (!p.exists) return null;
if (p.type === "subreddit") return { value: p.active_users, label: "weekly active users", exact: true };
if (p.type === "company") return { value: p.followers, label: "followers", exact: true };
return { value: p.followers, label: "followers", exact: p.is_exact };
}
The rules behind the schema
These rules hold on every endpoint and are what makes the schema safe to build on.
- Counts are integers. Never strings, never "1.2M".
- Precision is declared.
is_exactsays whetherfollowersis the full number.followers_roundedholds the figure the public page shows. - Unknown is
null. When a network does not publish a value, the field isnull. It is not filled with an estimate. - "Not found" is an answer. A missing profile returns HTTP 200 with
exists: false. Errors are reserved for requests that could not be completed. - Every read is timestamped.
fetched_atis the UTC time of the read. Reads go to the network at request time. - Identity is stable.
idis the network's own identifier and survives a handle change. - One error format. Every failure is
{"error": "code", "message": "text"}with a matching HTTP status: 400, 401, 402, 409, 429, 501 or 503. - Only delivered data is charged. A successful read costs one credit. Every error status costs zero.
The schema as TypeScript types
If you work in TypeScript, these types describe /v1/profile for all nine networks.
type Meta = { fetched_at: string; cached: boolean; source_cached: boolean };
type NotFound = { exists: false; platform: string; username?: string } & Meta;
type CreatorProfile = {
exists: true;
platform: "tiktok" | "instagram" | "youtube" | "facebook" | "x" | "threads" | "pinterest";
username: string;
nickname: string | null;
verified: boolean;
private: boolean | null;
followers: number;
followers_rounded: number;
is_exact: boolean;
following: number | null;
likes: number | null;
videos: number;
bio: string | null;
avatar: string | null;
id: string | null;
created_at: string | null;
external_link: string | null;
category: string | null;
boards_count?: number; // Pinterest only
} & Meta;
type Subreddit = {
exists: true;
platform: "reddit";
type: "subreddit";
name: string;
title: string | null;
description: string | null;
subscribers: number | null;
active_users: number | null;
weekly_contributions: number | null;
created_at: string | null;
icon: string | null;
nsfw: boolean | null;
id: string | null;
} & Meta;
type Company = {
exists: true;
platform: "linkedin";
type: "company";
name: string;
handle: string;
followers: number | null;
employee_count: number | null;
industry: string | null;
founded: string | null;
description: string | null;
location: { city: string | null; state: string | null; country: string | null } | null;
website: string | null;
logo: string | null;
cover: string | null;
id: string | null;
} & Meta;
type Person = {
exists: true;
platform: "linkedin";
type: "person";
username: string;
name: string | null;
followers: number;
followers_rounded: number;
is_exact: boolean;
connections: number | null;
bio: string | null;
avatar: string | null;
location: string | null;
experience: { name: string | null; url: string | null; start_year: number | null }[];
} & Meta;
type ProfileResponse = NotFound | CreatorProfile | Subreddit | Company | Person;
Responses to authenticated calls also carry a credits object with what was charged and the balance left.
Normalizing every network into one record
This Python script reads five different kinds of target and reduces each to the same record. It is complete and was run as shown.
import os
import time
import requests
API = "https://api.sociallens.dev/v1/profile"
KEY = os.environ["SOCIALLENS_KEY"]
def read(platform, username, **extra):
for _ in range(3):
r = requests.get(
API,
params={"platform": platform, "username": username, **extra},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
if r.status_code in (409, 429, 503):
time.sleep(int(r.headers.get("Retry-After", 5)))
continue
break
r.raise_for_status()
return r.json()
def normalize(data):
"""Reduce any /v1/profile response to one comparable record."""
if not data["exists"]:
return None
kind = data.get("type", "creator")
if kind == "subreddit":
return {
"platform": data["platform"], "kind": kind, "name": data["name"],
"audience": data["active_users"], "audience_label": "weekly active users",
"exact": True, "id": data["id"],
}
if kind == "company":
return {
"platform": data["platform"], "kind": kind, "name": data["name"],
"audience": data["followers"], "audience_label": "followers",
"exact": True, "id": data["id"],
}
return {
"platform": data["platform"], "kind": kind,
"name": data.get("nickname") or data.get("name") or data["username"],
"audience": data["followers"],
"audience_label": "subscribers" if data["platform"] == "youtube" else "followers",
"exact": data["is_exact"], "id": data.get("id"),
}
targets = [
("youtube", "mrbeast", {}),
("reddit", "AskReddit", {}),
("linkedin", "microsoft", {}),
("linkedin", "williamhgates", {"type": "person"}),
("threads", "zuck", {}),
]
for platform, username, extra in targets:
rec = normalize(read(platform, username, **extra))
flag = "" if rec["exact"] else " (rounded)"
print(f"{rec['platform']:<9} {rec['kind']:<9} {rec['name']:<16} {rec['audience']:>13,} {rec['audience_label']}{flag}")
Output:
youtube creator MrBeast 528,000,000 subscribers (rounded)
reddit subreddit AskReddit 13,656,631 weekly active users
linkedin company Microsoft 29,570,522 followers
linkedin person Bill Gates 40,842,680 followers
threads creator Mark Zuckerberg 5,782,443 followers
Thirty lines of mapping cover a video channel, a community, a company, a person and a creator. The requests run one after another because reads for the same API account are processed in sequence.
Because every network answers in this one shape, the same call also works row by row outside a script. Enrich a Clay Table with Follower Counts via HTTP API runs it from a Clay column for a list of companies, and Social Media Followers Count API for SMM Panels repeats it over time to verify orders.
Posts use one schema too
/v1/profile-posts returns a list of posts and /v1/post returns one. Every post, on every network, has the same keys: id, url, caption, published_at, likes, views, comments, shares and likes_hidden.
| Network | likes |
views |
comments |
shares |
|---|---|---|---|---|
| TikTok | Exact | Exact | Exact | Exact |
| Exact, or hidden by the owner | Reels and videos only | Exact | null |
|
| YouTube | Exact | Exact | Rounded by YouTube | null |
| Sum of reactions | Videos and reels | Exact | Exact | |
| X | Exact | Exact | Replies | Reposts |
| Threads | Exact | null |
Replies | Reposts |
| Upvote score | null |
Exact | null |
|
| Reactions | null |
null |
Saves | |
null |
null |
null |
null |
The Pinterest row describes the pins list. A single pin read returns the pin's share count in shares, and both return the pin's total saves in an extra saves field. The details, with real responses and an engagement rate calculation, are in How to Get Likes, Views and Comments for Any Post by URL.
A single tool for AI agents
A unified schema is also what makes social data practical for an AI agent. One tool definition covers nine networks, and the model does not need to learn a separate tool per platform.
{
"name": "get_social_profile",
"description": "Read the public profile of an account on a social network. Returns follower count and profile details as JSON.",
"parameters": {
"type": "object",
"properties": {
"platform": {
"type": "string",
"enum": ["tiktok", "instagram", "youtube", "facebook", "x", "reddit", "linkedin", "threads", "pinterest"]
},
"username": {
"type": "string",
"description": "Handle of the account. For reddit, the subreddit name. For linkedin, the company slug or a full profile URL."
}
},
"required": ["platform", "username"]
}
}
The tool maps to one HTTP call, GET /v1/profile, and the response is small enough to pass back to the model as is. A plain text description of the whole API, written for language models, is published at /llms.txt.
Frequently asked questions
What is a unified social media data API?
It is an API that reads public data from several social networks through the same endpoints and returns it in the same schema, so one integration covers all of them.
Which networks does SocialLens cover?
TikTok, Instagram, YouTube, Facebook, X, Reddit, LinkedIn, Threads and Pinterest, through the same request shape and the same key.
Does unified mean every field exists on every network?
No. The keys are the same everywhere, but a network that does not publish a value returns null for it. The tables on this page list which fields are filled on each network.
Can it publish posts or read private analytics?
No. It reads public data only. Publishing and owner only analytics require each network's official API with the account owner's authorization.
How is it billed?
One credit per successful read, on any network and any endpoint. Error responses are not charged. A new account starts with 250 free reads and no card is required.
Where do I start?
With one number: Follower Count API walks through the profile request on each network with real responses.