- Use cases
- Creator vetting before a deal
Creator vetting before a deal
Read a creator's profile, latest videos and comments before you pay them.
The job
Before a deal, look at what the audience does, not only the follower count. Pull recent videos, compare views to followers, and read the comments.
Endpoints
Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.
| Endpoint | Returns | Cost |
|---|---|---|
| YouTube channel details | 1 credit | |
| YouTube channel videos | 1 credit | |
| YouTube video comments | 1 credit | |
| YouTube video sponsors | 1 credit | |
| TikTok profile | 1 credit |
Recipe
- Read the channel for subscribers and verification.
- Pull the latest videos with their view, like and comment counts.
- Read comments on the most recent one.
1import os2import requests34API = "https://api.socialscrape.dev"5HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}678def get(path, **params):9 res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)10 res.raise_for_status()11 return res.json()["data"]1213# YouTube channel details14profile = get("/v1/youtube/channel", handle="mkbhd")15# YouTube channel videos16videos = get("/v1/youtube/channel/videos", handle="mkbhd", sort="latest")17# YouTube video comments18comments = get("/v1/youtube/video/comments", url=videos["items"][0]["url"])1920followers = profile["stats"]["followers"]21for v in videos["items"]:22 print(v["stats"]["views"] / followers, v["url"])1const API = "https://api.socialscrape.dev";2const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };34async function get(path: string, params: Record<string, string | number | boolean>) {5 const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));6 const res = await fetch(`${API}${path}?${query}`, { headers });7 if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);8 return (await res.json()).data;9}1011// YouTube channel details12const profile = await get("/v1/youtube/channel", { handle: "mkbhd" });13// YouTube channel videos14const videos = await get("/v1/youtube/channel/videos", { handle: "mkbhd", sort: "latest" });15// YouTube video comments16const comments = await get("/v1/youtube/video/comments", { url: videos.items[0].url });1718const followers = profile.stats.followers;19for (const v of videos.items) console.log(v.stats.views / followers, v.url);Calls use api.socialscrape.dev and return the shapes in the reference.
Good to know
Views divided by followers is a ratio you compute; it is not a quality score. YouTube sponsor detection is marked experimental in the reference.