YouTube API
Transcripts and video details from YouTube videos, Shorts, channels, playlists and searches.
| platform | title | channelName | durationSeconds | viewCount |
|---|---|---|---|---|
| Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) | Rick Astley | 213 | 1,829,055,386 | |
| Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) | Rick Astley | 213 | 1,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.
| Scraper | Price per 1,000 | One row is | Start fee per run |
|---|---|---|---|
| $1.50 | a transcript | $0.001 | |
| $1.25 | a 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
| Field | Type | What it holds |
|---|---|---|
| platform | string | Always 'youtube'. |
| videoId | string | YouTube video id, 11 characters, e.g. dQw4w9WgXcQ. |
| url | string | Watch page link of the video (Shorts included). |
| title | string | Video title. |
| channelName | string | Name of the channel that published the video (the publisher, not a viewer). |
| channelId | string | Channel id, starts with UC, e.g. UCuAXFkgsw1L7xaCfnd5JJOw. |
| channelHandle | string | Channel handle with the @, e.g. @RickAstleyYT. Null if YouTube did not return it. |
| channelUrl | string | Link to the channel page built from channelId. |
| durationSeconds | number | Video length in seconds. |
| publishDate | string | Publish date and time as YouTube gives it, ISO 8601 with offset, e.g. 2009-10-24T23:57:33-07:00. |
| viewCount | number | Views at the time of the run. |
| likeCount | number | Likes at the time of the run; null when hidden. |
| category | string | YouTube category, e.g. Music, Education, News & Politics. |
| isLiveContent | boolean | True for live streams and recorded live streams. |
| keywords | array | Tags the creator set on the video (may be empty). |
| description | string | Video description, short (about 300 characters) or full per input; emails and phone numbers are removed. |
| source | The channel or playlist URL this video came from; null for videos given directly. | |
| scrapedAt | string | When the row was read, ISO 8601. |
Error rows, free 3 fields
| Field | Type | What it holds |
|---|---|---|
| input | Error rows: the URL or id as given. | |
| code | Error 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. | |
| message | Error 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.
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.