1. Use cases
  2. Content repurposing from transcripts

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

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

EndpointReturnsCost
YouTube channel videos1 credit
YouTube video transcript1 credit
TikTok video transcript1 credit
Transcript from any video URL1 credit

Recipe

  1. List the channel's latest videos.
  2. Fetch a transcript for each.
  3. Send the text to your editor or your model.
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 videos14videos = get("/v1/youtube/channel/videos", handle="mkbhd", sort="latest")15# YouTube video transcript16transcript = get("/v1/youtube/video/transcript", url=videos["items"][0]["url"])1718print(transcript["source"], len(transcript["segments"]))19print(transcript["text"][:500])

Calls use api.socialscrape.dev and return the shapes in the reference.

Good to know

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

Related

Questions

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