Content repurposing from transcripts

List a channel's videos, fetch each transcript, and write from the text.

The job

A video is a draft of a post. Pull the transcript with timestamps, and quote or summarize the parts worth reusing.

Endpoints

EndpointReturnsCost
GET /v1/youtube/channel/videosYouTube channel videos1 credit
GET /v1/youtube/video/transcriptYouTube video transcript1 credit
GET /v1/tiktok/video/transcriptTikTok video transcript1 credit
GET /v1/transcriptTranscript from any video URL1 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 the channel's latest videos.
  2. Fetch a transcript for each.
  3. Send the text to your editor or your model.
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 transcript
transcript = get("/v1/youtube/video/transcript", url=videos["items"][0]["url"])

print(transcript["source"], len(transcript["segments"]))
print(transcript["text"][:500])
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 transcript
const transcript = await get("/v1/youtube/video/transcript", { url: videos.items[0].url });

console.log(transcript.source, transcript.segments.length);
console.log(transcript.text.slice(0, 500));

Good to know

Captions cost 1 credit. Videos without captions can be transcribed from audio, billed by minute; check source in the response.

Questions

What does AI transcription cost?
1 credit up to 2 minutes of audio, then 1 per started minute. See AI transcription.

Build on social data early.

Developers and agent builders get the first keys.

Get early access