Brand monitoring API

Find videos that mention your brand and read what people say under them.

The job

Search your brand name and campaign hashtag, then open the comments on the videos that matter. Keep the ids to avoid reading the same video twice.

Endpoints

EndpointReturnsCost
GET /v1/tiktok/search/hashtagTikTok videos by hashtag1 credit
GET /v1/tiktok/search/keywordTikTok video search1 credit
GET /v1/youtube/searchYouTube search1 credit
GET /v1/tiktok/video/commentsTikTok video comments1 credit
GET /v1/youtube/video/commentsYouTube video comments1 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. Search the brand and the hashtag.
  2. Open comments on the top videos.
  3. Store what you have seen by id.
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 videos by hashtag
tagged = get("/v1/tiktok/search/hashtag", hashtag="standingdesk")
# TikTok video comments
comments = get("/v1/tiktok/video/comments", url=tagged["items"][0]["url"])

for c in comments["items"]:
    print(c["stats"]["likes"], c["text"])
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 videos by hashtag
const tagged = await get("/v1/tiktok/search/hashtag", { hashtag: "standingdesk" });
// TikTok video comments
const comments = await get("/v1/tiktok/video/comments", { url: tagged.items[0].url });

for (const c of comments.items) console.log(c.stats.likes, c.text);

Good to know

TikTok hashtag search can return duplicates, so de-duplicate by id.

Build on social data early.

Developers and agent builders get the first keys.

Get early access