The job
Discovery is a funnel: search a niche, pull each creator's public numbers, then find where else they publish. Three calls per creator.
Endpoints
| Endpoint | Returns | Cost |
|---|---|---|
GET /v1/tiktok/search/users | TikTok user search | 1 credit |
GET /v1/tiktok/profile | TikTok profile | 1 credit |
GET /v1/creators/social-profiles | Find a creator's other social profiles | 1 credit |
GET /v1/instagram/profile | Instagram profile | 1 credit |
GET /v1/youtube/channel | YouTube channel details | 1 credit |
Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.
Recipe
- Search users for a niche term.
- Read each profile for followers, bio and verification.
- Follow the links in their bio to their other platforms.
Preview
The API is in early access. Calls use
api.socialscrape.io and return the shapes in the reference.Python
import os
import requests
API = "https://api.socialscrape.io"
HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}
def get(path, **params):
res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)
res.raise_for_status()
return res.json()["data"]
# TikTok user search
found = get("/v1/tiktok/search/users", query="home barista")
# TikTok profile
profile = get("/v1/tiktok/profile", handle=found["items"][0]["handle"])
# Find a creator's other social profiles
linked = get("/v1/creators/social-profiles", handle=found["items"][0]["handle"], platform="tiktok")
print(profile["handle"], profile["stats"]["followers"])
for p in linked["items"]:
print(p["platform"], p["url"])TypeScript
const API = "https://api.socialscrape.io";
const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };
async function get(path: string, params: Record<string, string | number | boolean>) {
const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
const res = await fetch(`${API}${path}?${query}`, { headers });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
return (await res.json()).data;
}
// TikTok user search
const found = await get("/v1/tiktok/search/users", { query: "home barista" });
// TikTok profile
const profile = await get("/v1/tiktok/profile", { handle: found.items[0].handle });
// Find a creator's other social profiles
const linked = await get("/v1/creators/social-profiles", { handle: found.items[0].handle, platform: "tiktok" });
console.log(profile.handle, profile.stats.followers);
for (const p of linked.items) console.log(p.platform, p.url);Good to know
Numbers are public counts at the time of the call. Engagement per video comes from the creator's own posts, not from the profile.