YouTube API
Fetch transcripts in every available language, video metadata and chapters, comments, channel details and video lists, and keyword search, as clean JSON.
Overview and use cases on the YouTube API page; response format, pagination and errors are the same for every API (conventions).
- Get a transcript /v1/youtube/transcripts/{video_id}
- List transcript languages /v1/youtube/transcripts/{video_id}/languages
- Get video metadata /v1/youtube/videos/{video_id}
- Get video chapters /v1/youtube/videos/{video_id}/chapters
- List video comments /v1/youtube/videos/{video_id}/comments
- Get a channel /v1/youtube/channels/{channel_id}
- List channel videos /v1/youtube/channels/{channel_id}/videos
- Search videos /v1/youtube/search
Get a transcript
/v1/youtube/transcripts/{video_id}1 credit / callThe transcript of a video as timed segments and plain text. Without `lang` you get the video's default caption track.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id* | path | string | — | 11-character video ID |
| lang | query | string | — | Language code (e.g. en, it, pt-BR); auto-translated when the video doesn't have it |
| format | query | json | text | srt | json | json (segments + text), text or srt |
curl "https://api.scrapecrate.com/v1/youtube/transcripts/dQw4w9WgXcQ" \
-H "X-API-Key: YOUR_API_KEY"{
"data": {
"video_id": "dQw4w9WgXcQ",
"language": "en",
"is_generated": false,
"text": "We're no strangers to love. You know the rules and so do I.",
"segments": [
{
"text": "We're no strangers to love",
"start": 18.6,
"duration": 3.2
},
{
"text": "You know the rules and so do I",
"start": 22.4,
"duration": 4.1
}
]
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}List transcript languages
/v1/youtube/transcripts/{video_id}/languages1 credit / callThe caption tracks available for a video, manual and auto-generated.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id* | path | string | — | 11-character video ID |
curl "https://api.scrapecrate.com/v1/youtube/transcripts/dQw4w9WgXcQ/languages" \
-H "X-API-Key: YOUR_API_KEY"{
"data": {
"video_id": "dQw4w9WgXcQ",
"languages": [
{
"language_code": "en",
"language": "English",
"is_generated": false,
"is_translatable": true
},
{
"language_code": "it",
"language": "Italian",
"is_generated": true,
"is_translatable": true
}
]
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}Get video metadata
/v1/youtube/videos/{video_id}1 credit / callTitle, description, channel, duration, views, likes, comment count, tags and categories.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id* | path | string | — | 11-character video ID |
curl "https://api.scrapecrate.com/v1/youtube/videos/dQw4w9WgXcQ" \
-H "X-API-Key: YOUR_API_KEY"{
"data": {
"video_id": "dQw4w9WgXcQ",
"title": "Never Gonna Give You Up",
"description": "The official video.",
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"channel_name": "Rick Astley",
"duration": 213,
"view_count": 1600000000,
"like_count": 18000000,
"comment_count": 2400000,
"upload_date": "2009-10-25",
"thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"tags": [
"rick astley",
"never gonna give you up"
],
"categories": [
"Music"
]
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}Get video chapters
/v1/youtube/videos/{video_id}/chapters1 credit / callThe chapters of a video with start and end times in seconds.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id* | path | string | — | 11-character video ID |
curl "https://api.scrapecrate.com/v1/youtube/videos/dQw4w9WgXcQ/chapters" \
-H "X-API-Key: YOUR_API_KEY"{
"data": {
"video_id": "dQw4w9WgXcQ",
"has_chapters": true,
"chapters": [
{
"title": "Intro",
"start_time": 0,
"end_time": 18
},
{
"title": "Verse 1",
"start_time": 18,
"end_time": 43
}
]
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}List video comments
/v1/youtube/videos/{video_id}/comments1 credit / 100 itemsTop-level comments of a video with author, likes, replies count, date and pinned flag.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id* | path | string | — | 11-character video ID |
| sort | query | top | new | top | Top comments or newest first |
| limit | query | integer (1–100) | 50 | Comments per page (max 100) |
| cursor | query | string | — | pagination.next_cursor of the previous page |
curl "https://api.scrapecrate.com/v1/youtube/videos/dQw4w9WgXcQ/comments" \
-H "X-API-Key: YOUR_API_KEY"{
"data": [
{
"comment_id": "UgzX1a2b3c4d5e6f7g8h",
"text": "Still a classic.",
"author": "@musicfan",
"like_count": 1520,
"reply_count": 12,
"published_at": "2024-03-01T10:00:00Z",
"is_pinned": false
}
],
"pagination": {
"next_cursor": "eyJwIjoyfQ",
"has_more": true
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}Get a channel
/v1/youtube/channels/{channel_id}1 credit / callChannel details by channel ID (`UC...`) or @handle.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| channel_id* | path | string | — | Channel ID (UC...) or @handle |
curl "https://api.scrapecrate.com/v1/youtube/channels/%40RickAstleyYT" \
-H "X-API-Key: YOUR_API_KEY"{
"data": {
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"name": "Rick Astley",
"description": "The official channel.",
"subscriber_count": 4100000,
"video_count": 320,
"thumbnail_url": "https://yt3.ggpht.com/example.jpg",
"channel_url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}List channel videos
/v1/youtube/channels/{channel_id}/videos1 credit / callThe videos of a channel, newest first, page by page.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| channel_id* | path | string | — | Channel ID (UC...) or @handle |
| include_shorts | query | boolean | false | Include Shorts |
| limit | query | integer (1–100) | 30 | Videos per page (max 100) |
| cursor | query | string | — | pagination.next_cursor of the previous page |
curl "https://api.scrapecrate.com/v1/youtube/channels/%40RickAstleyYT/videos" \
-H "X-API-Key: YOUR_API_KEY"{
"data": [
{
"video_id": "dQw4w9WgXcQ",
"title": "Never Gonna Give You Up",
"duration": 213,
"view_count": 1600000000,
"published_at": "2009-10-25",
"thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg"
}
],
"pagination": {
"next_cursor": "eyJwIjoyfQ",
"has_more": true
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}Search videos
/v1/youtube/search1 credit / callSearch by keyword and get videos with channel, duration, views and upload date.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| q* | query | string | — | Search query |
| limit | query | integer (1–50) | 20 | Results (max 50) |
curl "https://api.scrapecrate.com/v1/youtube/search?q=lofi%20hip%20hop" \
-H "X-API-Key: YOUR_API_KEY"{
"data": [
{
"video_id": "jfKfPfyJRdk",
"title": "lofi hip hop radio",
"channel_name": "Lofi Girl",
"channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
"duration": 0,
"view_count": 900000000,
"upload_date": "2022-07-12",
"thumbnail_url": "https://i.ytimg.com/vi/jfKfPfyJRdk/hqdefault.jpg"
}
],
"pagination": {
"next_cursor": "eyJwIjoyfQ",
"has_more": true
},
"meta": {
"request_id": "req_8f2c1a9b0d3e4f5a6b7c",
"credits_used": 1,
"credits_remaining": 9999
}
}