Sponsorship and brand deal tracking

Find videos that disclose paid promotion and read the sponsor segments.

The job

A sponsor read is in the transcript. Check the disclosure flag, then search the timestamped text for the brand.

Endpoints

EndpointReturnsCost
GET /v1/youtube/video/sponsorsYouTube video sponsors1 credit
GET /v1/youtube/video/transcriptYouTube video transcript1 credit
GET /v1/youtube/channel/videosYouTube channel videos1 credit
GET /v1/tiktok/videoTikTok video details1 credit
GET /v1/instagram/profile/postsInstagram profile posts1 credit

Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.

Recipe

  1. List a channel's videos.
  2. Check each for a paid-promotion disclosure.
  3. Find the brand's name in the transcript.
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"]

# YouTube channel videos
videos = get("/v1/youtube/channel/videos", handle="mkbhd", sort="latest")
# YouTube video sponsors
sponsors = get("/v1/youtube/video/sponsors", url=videos["items"][0]["url"])
# YouTube video transcript
transcript = get("/v1/youtube/video/transcript", url=videos["items"][0]["url"])

brand = "squarespace"
hits = [s for s in transcript["segments"] if brand in s["text"].lower()]
print(sponsors["extra"], len(hits))
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;
}

// YouTube channel videos
const videos = await get("/v1/youtube/channel/videos", { handle: "mkbhd", sort: "latest" });
// YouTube video sponsors
const sponsors = await get("/v1/youtube/video/sponsors", { url: videos.items[0].url });
// YouTube video transcript
const transcript = await get("/v1/youtube/video/transcript", { url: videos.items[0].url });

const brand = "squarespace";
const hits = transcript.segments.filter((s: any) => s.text.toLowerCase().includes(brand));
console.log(sponsors.extra, hits.length);

Good to know

Sponsor inference is experimental and returns a confidence. Treat it as a lead to check, not a verdict.

Build on social data early.

Developers and agent builders get the first keys.

Get early access