1. Use cases
  2. Podcast and show research

Podcast and show research

List a show's episodes, then fetch the transcript of the video version.

The job

Many shows publish audio on Spotify and video on YouTube. List episodes from one, transcribe the other, and keep both urls.

Endpoints

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

EndpointReturnsCost
Spotify search1 credit
Spotify podcast1 credit
Spotify podcast episodes1 credit
YouTube playlist videos1 credit
YouTube video transcript1 credit

Recipe

  1. Search for the show.
  2. List its episodes.
  3. Fetch the transcript of the matching YouTube video.
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# Spotify search14found = get("/v1/spotify/search", query="Hard Fork", type="show")15# Spotify podcast episodes16episodes = get("/v1/spotify/podcast/episodes", url=found["items"][0]["url"])1718for e in episodes["items"][:5]:19    print(e["published_at"], e["url"])

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

Good to know

Spotify lists episodes 20 a page. Matching a Spotify episode to its YouTube video is a step you do by title and date.

Related