API documentation / Threads

Threads API

Read any public Threads profile as JSON: follower count, plus the posts of a profile.

The SocialLens API is one generic API: you call an endpoint by data type and pass platform=threads. The response schema is the same across every network. Authenticate with a Bearer key from /keys; start with 250 free reads, no card. Full reference, credits, rate limits and errors are on the main docs.

Threads gives the follower count through profile. There is no follower list and no comments endpoint.

Public profile

GET/v1/profile

Reads the public Threads profile and returns normalized counters and identity (including the follower count).

bash
curl "https://api.sociallens.dev/v1/profile?username=zuck&platform=threads" \
  -H "Authorization: Bearer sk_live_your_key"
python · requests
import requests
res = requests.get(
    "https://api.sociallens.dev/v1/profile",
    params={ "username": "zuck", "platform": "threads" },
    headers={"Authorization": "Bearer sk_live_your_key"},
)
data = res.json()
node · fetch
const res = await fetch("https://api.sociallens.dev/v1/profile?username=zuck&platform=threads", {
  headers: { Authorization: "Bearer sk_live_your_key" },
});
const data = await res.json();
php
$ch = curl_init("https://api.sociallens.dev/v1/profile?username=zuck&platform=threads");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_your_key"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);

Post metrics

GET/v1/post

Public metrics of a single Threads post: likes, views, comments, shares and author.

bash
curl "https://api.sociallens.dev/v1/post?url=https://www.threads.net/@zuck/post/DfihFPxkaZ1&platform=threads" \
  -H "Authorization: Bearer sk_live_your_key"
python · requests
import requests
res = requests.get(
    "https://api.sociallens.dev/v1/post",
    params={ "url": "https://www.threads.net/@zuck/post/DfihFPxkaZ1", "platform": "threads" },
    headers={"Authorization": "Bearer sk_live_your_key"},
)
data = res.json()
node · fetch
const res = await fetch("https://api.sociallens.dev/v1/post?url=https://www.threads.net/@zuck/post/DfihFPxkaZ1&platform=threads", {
  headers: { Authorization: "Bearer sk_live_your_key" },
});
const data = await res.json();
php
$ch = curl_init("https://api.sociallens.dev/v1/post?url=https://www.threads.net/@zuck/post/DfihFPxkaZ1&platform=threads");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_your_key"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);

Profile posts

GET/v1/profile-posts

Recent posts of a Threads profile, one page per credit.

bash
curl "https://api.sociallens.dev/v1/profile-posts?username=zuck&platform=threads" \
  -H "Authorization: Bearer sk_live_your_key"
python · requests
import requests
res = requests.get(
    "https://api.sociallens.dev/v1/profile-posts",
    params={ "username": "zuck", "platform": "threads" },
    headers={"Authorization": "Bearer sk_live_your_key"},
)
data = res.json()
node · fetch
const res = await fetch("https://api.sociallens.dev/v1/profile-posts?username=zuck&platform=threads", {
  headers: { Authorization: "Bearer sk_live_your_key" },
});
const data = await res.json();
php
$ch = curl_init("https://api.sociallens.dev/v1/profile-posts?username=zuck&platform=threads");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_your_key"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);

See also, guides on the blog: Follower Count API: One Request for Every Major Social Network, Social Media Data for Academic Research After CrowdTangle, Data365 and EnsembleData Alternatives, and all guides.

Back to the full API documentation