Trend research from public feeds

Read what is trending on each platform today and store the snapshot.

The job

Trends are a time series. Take the same snapshot daily and the list of what rose becomes a query on your own table.

Endpoints

EndpointReturnsCost
GET /v1/tiktok/videos/popularPopular TikTok videos1 credit
GET /v1/tiktok/search/hashtagTikTok videos by hashtag1 credit
GET /v1/tiktok/songTikTok song details1 credit
GET /v1/instagram/reels/trendingInstagram trending reels1 credit
GET /v1/youtube/shorts/trendingTrending YouTube Shorts1 credit
GET /v1/github/trending/repositoriesGitHub trending repositories1 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. Fetch each trending feed.
  2. Save it with the date.
  3. Diff against yesterday.
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"]

# Popular TikTok videos
popular = get("/v1/tiktok/videos/popular", period=7, sort="views")
# GitHub trending repositories
repos = get("/v1/github/trending/repositories", since="weekly", language="python")

for v in popular["items"][:10]:
    print(v["stats"]["views"], v["url"])
for r in repos["items"][:10]:
    print(r["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;
}

// Popular TikTok videos
const popular = await get("/v1/tiktok/videos/popular", { period: 7, sort: "views" });
// GitHub trending repositories
const repos = await get("/v1/github/trending/repositories", { since: "weekly", language: "python" });

for (const v of popular.items.slice(0, 10)) console.log(v.stats.views, v.url);
for (const r of repos.items.slice(0, 10)) console.log(r.url);

Good to know

The anonymous feeds (Instagram Reels, YouTube Shorts, TikTok For You) differ on every call. They sample a feed; they are not a chart.

Build on social data early.

Developers and agent builders get the first keys.

Get early access