YouTube API

Transcripts and video details from YouTube videos, Shorts, channels, playlists and searches.

A transcript row and a video row for the same video share these columns.
Sample rows from the YouTube family
platformtitlechannelNamedurationSecondsviewCount
YouTubeRick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)Rick Astley2131,829,055,386
YouTubeRick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)Rick Astley2131,829,080,503

Channel names and URLs are the publisher labels YouTube shows publicly on every video.

2 scrapers in YouTube

One price per 1,000 rows each. Pick one to see its sample, input and fields.

Scrapers in this family and their prices
ScraperPrice per 1,000One row isStart fee per run
YouTube Transcripts$1.50a transcript$0.001
YouTube Videos$1.25a video$0.001

Shared fields

22 fields with the same names in transcripts and video rows, so the two join on videoId.

The video 18 fields

The video
FieldTypeWhat it holds
platformstringAlways 'youtube'.
videoIdstringYouTube video id, 11 characters, e.g. dQw4w9WgXcQ.
urlstringWatch page link of the video (Shorts included).
titlestringVideo title.
channelNamestringName of the channel that published the video (the publisher, not a viewer).
channelIdstringChannel id, starts with UC, e.g. UCuAXFkgsw1L7xaCfnd5JJOw.
channelHandlestringChannel handle with the @, e.g. @RickAstleyYT. Null if YouTube did not return it.
channelUrlstringLink to the channel page built from channelId.
durationSecondsnumberVideo length in seconds.
publishDatestringPublish date and time as YouTube gives it, ISO 8601 with offset, e.g. 2009-10-24T23:57:33-07:00.
viewCountnumberViews at the time of the run.
likeCountnumberLikes at the time of the run; null when hidden.
categorystringYouTube category, e.g. Music, Education, News & Politics.
isLiveContentbooleanTrue for live streams and recorded live streams.
keywordsarrayTags the creator set on the video (may be empty).
descriptionstringVideo description, short (about 300 characters) or full per input; emails and phone numbers are removed.
sourceThe channel or playlist URL this video came from; null for videos given directly.
scrapedAtstringWhen the row was read, ISO 8601.
Error rows, free 3 fields
Error rows, free
FieldTypeWhat it holds
inputError rows: the URL or id as given.
codeError rows: not_found (private, removed, unknown channel), no_match (no captions, or none of the requested type), unavailable (age-restricted, members-only, upcoming, temporary error), blocked (rate limited, retry later), invalid_input.
messageError rows: what happened, in plain English.

Call any of them the same way

Only the scraper name and its input change between scrapers in YouTube. The API opens at launch.

Terminal
curl -X POST https://scrapers-api.arcadiumdata.io/v1/scrapers/youtube-transcripts/runs \
  -H "Authorization: Bearer $ARCADIUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
      ],
      "captionType": "any",
      "maxVideosPerSource": 10,
      "subtitleFormat": "none"
    }
  }'

Questions people ask before they top up

What if a video has no captions?

That video returns an error row with the code no_match. Error rows are free.

Can I give a channel instead of single videos?

Yes. Both scrapers take channel, playlist and video links. YouTube Videos also takes search terms and hashtags.

What am I charged for when a run fails or finds nothing?

Nothing. You pay for rows we deliver, at the price on the scraper's page, plus a small start fee on runs that deliver rows. A run that returns rows costs at least $0.005. Failed runs, empty runs and duplicate rows cost $0.