Documentation
Responses
The shape of every answer, the fields every platform shares, and the headers that come with it.
Every platform answers in the same shape, with the same field names.
Shape
An answer is one item, a list, or an error.
| Answer | Body |
|---|---|
| One item | { "data": … } |
| A list | { "data": [...], "pagination": … } |
| An error | { "error", "code", "param" } |
{
"data": [{ "id": "7711465226318728461" }, { "id": "7711414040114892045" }],
"pagination": { "nextCursor": "1792764276701", "hasMore": true }
}See Pagination and Errors.
Shared Types
A few types cover what the platforms return.
| Type | What it is |
|---|---|
Profile | An account |
Post | A post, reel, video or thread |
Comment | A comment or a reply |
Transcript | A video's captions |
Hashtag, Sound | A tag or a sound, and its posts |
Each type has the same fields on every platform, and what only one platform has sits under ext. Every field is typed in the API Reference.
{
"data": {
"id": "63055343223",
"username": "zuck",
"displayName": "Mark Zuckerberg",
"bio": "Mostly superintelligence and MMA takes",
"avatarUrl": "https://scontent-nrt6-1.cdninstagram.com/v/t51.82787-19/825322135_17989325280103224_1252773933700107438_n.jpg?stp=dst-jpg_s640x640_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-nrt6-1.cdninstagram.com&_nc_cat=100&_nc_oc=Q6cZ2gEbJAaY4VAfsA-SdUiOuyyefB_PaDbIjArtHdBA5E9_oz8s23mkKO8K36do2sY94fk&_nc_ohc=TcNBs21yW1gQ7kNvwHHOsMz&_nc_gid=3utomVOdhJVr5GxFQLdxgQ&edm=AAZTMJEBAAAA&ccb=7-5&_nc_ct=RQAsPBUCFQIAAAA&oh=00_AQQ7XHzV0_X-JdqIiVqvgiHTaON1Otu3q1X6WoaBBg9WbA&oe=6B0BE5EB&_nc_sid=49cb7f",
"url": "https://www.threads.com/@zuck",
"verified": true,
"private": false,
"followers": 5783862,
"following": null,
"likes": null,
"posts": null,
"externalUrl": null,
"createdAt": null,
"ext": {
"bioLinks": [],
"interests": [
"AI Threads",
"UFC Threads",
"AI"
]
}
}
}Profile
| Field | Contains |
|---|---|
id, url | The account's id and link |
username, displayName | Its handle and name |
bio, externalUrl | Its bio and website |
avatarUrl | Its picture |
verified, private | Its badge, and whether it is private |
followers, following | Its follower counts |
likes, posts | Likes received and posts made |
createdAt | When it was made |
Post
| Field | Contains |
|---|---|
id, url | The post's id and link |
text, createdAt | Its caption, and when it was posted |
author | Who posted it |
stats | Its counts and engagement rate |
media | Its videos and pictures |
hashtags, mentions | The tags and accounts in its text |
The engagement rate is likes, comments and shares over views, to four places.
Comment
| Field | Contains |
|---|---|
id, postId | The comment's id, and its post |
parentId | The comment it answers, for a reply |
text, createdAt | What it says, and when |
author | Who wrote it |
likes, replies | Its likes and reply count |
Transcript
| Field | Contains |
|---|---|
text | Every line, one after another |
cues | Each line with its start and end |
language | The captions' language |
source | Generated, or written by the author |
translated | Whether it is a translation |
Formats
Values are written the same way on every platform.
| Data | Format |
|---|---|
| Field names | camelCase |
| Ids | Strings |
| Times | RFC 3339 in UTC |
| Counts | Whole numbers |
| Rates | Fractions, such as 0.0181 |
| Media links | Expire within hours |
A count a platform does not have is null, never 0. Ids are strings because some do not fit a JavaScript number. Media links expire, so download the media you keep.
Headers
Every answer also carries these headers.
| Header | Contains |
|---|---|
X-Request-Id | The request's id |
X-Credits-Charged | What the call cost |
X-Credits-Remaining | The balance after it |
X-Cache | HIT or MISS |
X-Cache-Age | A cached answer's age, in seconds |
X-RateLimit-Remaining | Requests left this minute |
See Caching and Rate Limits for the rest.