Documentation
Browse guides and endpoints
YouTube Endpoints
Complete reference for YouTube API endpoints
5 endpoints available
Get Video Details
Get detailed information about a YouTube video
GET /api/youtube/video/detailsParameters
Query Parameters
video_idrequired
stringYouTube video ID
Example: PuQFESk0BrA
Code Examples
curl -X GET "https://apifast.dev/api/youtube/video/details?video_id=PuQFESk0BrA" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Example Response
{
"video_id": "PuQFESk0BrA",
"title": "Your Mom's House Podcast - Ep. 488 w/ Bert Kreischer",
"author": "YMH Studios",
"number_of_views": 1979639,
"video_length": "7456",
"description": "Woah Mommies, it's a very special week so pull those jeans up. This week we have the fattest working comedian currently alive today. When will he die? The Mommies discuss before Bart's arrival. Plus, did you know it's SHART WEEK!?",
"is_live_content": "False",
"published_time": "2019-02-27",
"channel_id": "UCYIgiXwJck_Pb5Nj-wIrsqg",
"category": "Comedy",
"type": "NORMAL",
"keywords": [
"ymh",
"your mom's house",
"your moms house",
"tom segura",
"christina pazsitzky",
"christina p",
"mommies",
"jeans",
"up",
"high and tight",
"what's with the jeans",
"denim on denim",
"podcast"
],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/PuQFESk0BrA/hqdefault.jpg",
"width": 168,
"height": 94
},
{
"url": "https://i.ytimg.com/vi/PuQFESk0BrA/hqdefault.jpg",
"width": 336,
"height": 188
},
{
"url": "https://i.ytimg.com/vi_webp/PuQFESk0BrA/maxresdefault.webp",
"width": 1920,
"height": 1080
}
]
}Get Video Comments
Get comments for a YouTube video
GET /api/youtube/video/commentsParameters
Query Parameters
video_idrequired
stringYouTube video ID
Example: ACdh-yzENXM
Code Examples
curl -X GET "https://apifast.dev/api/youtube/video/comments?video_id=ACdh-yzENXM" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Example Response
{
"video_id": "ACdh-yzENXM",
"total_number_of_comments": 11511,
"total_number_of_likes": 66540,
"number_of_comments": 20,
"continuation_token": "Eg0SC0FDZGgteXpFTlhNGAYygQMK1wJnZXRfcmFua2VkX3N0cmVhbXMtLUNxWUJDSUFFRlJlMzBUZ2Ftd0VLbGdFSTJGOFFnQVFZQnlLTEFUdmdRSEdrVFNEMFdVelAydmFlR1Q0UlJEMm5OdlJwTlpKLU96ODZkNnVSVE5tN3ZzNWVjdEFlbWV4T2loczZsTE9lRGpLTnQxQVUzaGRCZDZJejdCTzZsMVJ0NGlCQUJReWFjbGFiS1ZISXdBZkdHcXVlajdaZ1NadktUQ3hZTnc2Ym82TWZkZkdCWVc5Yk42d2lWbEtpTFpXTWY5UWxFZkZDa09QVFJWSUhUdEFoQkdIVnZyckR0Z0lRRkJJRkNJY2dHQUFTQndpRUlCQU9HQUVTQlFpR0lCZ0FFZ1VJaUNBWUFCSUZDSWtnR0FBU0J3aVhJQkFQR0FFU0J3aUZJQkFQR0FFWUFDSU9DZ3dJbDVMeWp3WVE2SmVxaGdJIhEiC0FDZGgteXpFTlhNMAB4ASgUQhBjb21tZW50cy1zZWN0aW9u",
"comments": [
{
"id": "UgxdIwVT0HRyF6A2cyh4AaABAg",
"author_name": "Reno Figaro",
"author_channel_id": "UCXOsM2FCxPn_RYlVqzNkBCA",
"like_count": "1.3K",
"published_time": "8 months ago",
"text": "Getting off benzos was the most difficult thing I've ever had to do. It was pure torture for close to a year.",
"number_of_replies": "203",
"thumbnails": [
{
"url": "https://yt3.ggpht.com/cTaoU7Xu1P4VccgQQptL7YCXElI0t31037_Sss-9zN3eNFexU5CWK0u4ndgGV950F2jNrsoFg-8=s48-c-k-c0x00ffffff-no-rj",
"width": 48,
"height": 48
},
{
"url": "https://yt3.ggpht.com/cTaoU7Xu1P4VccgQQptL7YCXElI0t31037_Sss-9zN3eNFexU5CWK0u4ndgGV950F2jNrsoFg-8=s88-c-k-c0x00ffffff-no-rj",
"width": 88,
"height": 88
},
{
"url": "https://yt3.ggpht.com/cTaoU7Xu1P4VccgQQptL7YCXElI0t31037_Sss-9zN3eNFexU5CWK0u4ndgGV950F2jNrsoFg-8=s176-c-k-c0x00ffffff-no-rj",
"width": 176,
"height": 176
}
]
},
{
"id": "UgzCp5YDaCRl3S5LyKd4AaABAg",
"author_name": "Jason Logue",
"author_channel_id": "UCWrIoCve2fwgas6s-7oA22Q",
"like_count": "533",
"published_time": "8 months ago",
"text": "I was on Xanax and Clonazepam for 14 years. I was also addicted to oxycodone for 10 years.",
"number_of_replies": "118",
"thumbnails": [
{
"url": "https://yt3.ggpht.com/ytc/AMLnZu8U5t3Q1gLuLzOV1JK_xNi5fWpxGmix6qQpmw=s48-c-k-c0x00ffffff-no-rj",
"width": 48,
"height": 48
},
{
"url": "https://yt3.ggpht.com/ytc/AMLnZu8U5t3Q1gLuLzOV1JK_xNi5fWpxGmix6qQpmw=s88-c-k-c0x00ffffff-no-rj",
"width": 88,
"height": 88
},
{
"url": "https://yt3.ggpht.com/ytc/AMLnZu8U5t3Q1gLuLzOV1JK_xNi5fWpxGmix6qQpmw=s176-c-k-c0x00ffffff-no-rj",
"width": 176,
"height": 176
}
]
}
]
}Get Video Subtitles
Get subtitles/captions for a YouTube video
GET /api/youtube/video/subtitlesParameters
Query Parameters
video_idrequired
stringYouTube video ID
Example: YUodyewHBP4
Code Examples
curl -X GET "https://apifast.dev/api/youtube/video/subtitles?video_id=YUodyewHBP4" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Example Response
{
"lang": "en",
"is_available": true,
"subtitles": [
{
"id": 1,
"start": 0.8,
"duration": 8,
"text": "Ory a little bit more consistent. The"
},
{
"id": 2,
"start": 5.359,
"duration": 7.441,
"text": "average drive"
},
{
"id": 3,
"start": 8.8,
"duration": 6.08,
"text": "power in their last matches were uh"
},
{
"id": 4,
"start": 12.8,
"duration": 6.85,
"text": "pretty consistent."
},
{
"id": 5,
"start": 14.88,
"duration": 5.76,
"text": "149 km perph average drives for Aabi to"
},
{
"id": 6,
"start": 19.65,
"duration": 3.869,
"text": "[applause]"
},
{
"id": 7,
"start": 20.64,
"duration": 4.799,
"text": "143 km/h for"
},
{
"id": 8,
"start": 23.519,
"duration": 3.76,
"text": ">> I mean"
},
{
"id": 9,
"start": 25.439,
"duration": 3.441,
"text": "a hard hitter in her own right but she's"
},
{
"id": 10,
"start": 27.279,
"duration": 3.681,
"text": "always possessed this extra bit of power"
}
]
}Youtube Search
Search for YouTube videos
GET /api/youtube/searchParameters
Query Parameters
queryrequired
stringSearch query
Example: bobby lee
langstringLanguage code (e.g., en)
Example: en
order_bystringSort order (last_hour, today, this_week, this_month, this_year)
Example: this_month
countrystringCountry code (e.g., us)
Example: us
Code Examples
curl -X GET "https://apifast.dev/api/youtube/search?query=bobby+lee&lang=en&order_by=this_month&country=us" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Example Response
{
"number_of_videos": "20",
"query": "bobby lee",
"country": "US",
"lang": "en",
"timezone": "America/New_York",
"continuation_token": "EpsFEglib2JieSBsZWUajANFZ1FJQkJBQlNCU0NBUXRmWjFCWVdrNDRabVZzYzRJQkMzTnhRM2huVjJwV2VraHZnZ0VMWTJoU2IwSkdabUpJY2tHQ0FRdHRkR1JqZVVKdlgwSkdSWUlCQzJWSWNYaG5RWEZHYVVNd2dnRUxXSGQxVDJKNVJGQkthMi1DQVFzemJVeG5VVGRZZG1ST1JZSUJDMkZJY3pKaWRHOUpTakJ6Z2dFTFNrZDFValZuY25GeWVXdUNBUXM1YlhwcFNtcGtUekYyTklJQkMyVXlSR3N3VUdnMFdtaE5nZ0VMV0hSdmNFRjRNbHBMY0hPQ0FRdHJja1EzTWtWdFZXVktjNElCQzBORWRVbFBhMTh4WmtORmdnRUxlSGRMVTBNNE4wdGtYemlDQVF0NGVsbzRkazlrU1UxNGM0SUJDMnczYUhKaFEyODNOWFpGZ2dFTFJHRkpaSGhZVkdGVFFsV0NBUXRvVEd3eFZXb3hiMnhJYTRJQkMwZElabUpIZEcxUVJFUTBzZ0VHQ2dRSUZCQUOSAv0BL3NlYXJjaD9vcT1ib2JieSBsZWUmZ3NfbD15b3V0dWJlLjMuLjBpNDMzaTEzMWsxajBpNTEyaTQzM2kxMzFrMWwyajBpNDMzaTEzMWsxajBpNTEyaTQzM2kxMzFrMWowaTQzM2kxMzFrMWwyajBpNTEyaTQzM2sxbDRqMGk1MTJrMWowaTUxMmk0MzNpMTMxazFsMi4xNTA2OC4xNTU5OC4wLjE2NDI5LjcuNy4wLjAuMC4wLjYyOC44NDUuMi0xajUtMS41LjAuLi4uMC4uLjFhYy4xLjY0LnlvdXR1YmUuLjIuMi44NDUuMC4uLjc2NS5TYkdUbGlSNkZOYxiB4OgYIgtzZWFyY2gtZmVlZA%3D%3D",
"videos": [
{
"video_id": "_gPXZN8fels",
"title": "Bobby's $10,000 Giveaway | TigerBelly 368 w/ Bobby Lee, Khalyla, & Chase Cokaliong",
"author": "TigerBelly",
"number_of_views": 144679,
"video_length": "1:02:06",
"description": "0:00 The Mr.Beast of The Philippines 11:15 Bobby Lee Brainstorms Giveaway Ideas 18:25 How Chase Cokaliong Made His ...",
"is_live_content": null,
"published_time": "2 days ago",
"channel_id": "UCIyIoM_Nd8HtY19fuR_ov2A",
"category": null,
"type": "NORMAL",
"keywords": [],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/_gPXZN8fels/hq720.jpg",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/_gPXZN8fels/hq720.jpg",
"width": 720,
"height": 404
}
]
},
{
"video_id": "sqCxgWjVzHo",
"title": "Tony Hinchcliffe questions Khalyla Kuhn in Brendan Schaub Drama!",
"author": "Comedy Enforcement ",
"number_of_views": 44889,
"video_length": "9:04",
"description": "Thank you all for watching! Don't forget to like and subscribe! It really helps out the channel! We are trying to reach 20000 subs!",
"is_live_content": null,
"published_time": "15 hours ago",
"channel_id": "UCTUYHL3XgAYmVChdlK_vnVQ",
"category": null,
"type": "NORMAL",
"keywords": [],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/sqCxgWjVzHo/hq720.jpg",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/sqCxgWjVzHo/hq720.jpg",
"width": 720,
"height": 404
}
]
}
]
}Trending Videos
Get trending YouTube videos
GET /api/youtube/trendingParameters
Query Parameters
langstringLanguage code (e.g., en)
Example: en
countrystringCountry code (e.g., us)
Example: us
sectionstringSection filter (Now, Music, Movies, Gaming)
Example: Now
Code Examples
curl -X GET "https://apifast.dev/api/youtube/trending?lang=en&country=us§ion=Now" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Example Response
{
"number_of_videos": "114",
"country": "US",
"lang": "en",
"timezone": "America/New_York",
"videos": [
{
"video_id": "9acxn7qAST4",
"title": "Overwatch 2 Animated Short | \"Kiriko\"",
"author": "PlayOverwatch",
"number_of_views": 2399454,
"video_length": "9:47",
"description": "The protector of Kanezaka strikes again. Discover the two sides of Kiriko, the loving daughter and the deadly protector.",
"is_live_content": null,
"published_time": "19 hours ago",
"channel_id": "UClOf1XXinvZsy4wKPAkro2A",
"category": null,
"type": "NORMAL",
"keywords": [],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/9acxn7qAST4/hqdefault.jpg",
"width": 210,
"height": 118
},
{
"url": "https://i.ytimg.com/vi/9acxn7qAST4/hqdefault.jpg",
"width": 246,
"height": 138
},
{
"url": "https://i.ytimg.com/vi/9acxn7qAST4/hqdefault.jpg",
"width": 336,
"height": 188
}
]
},
{
"video_id": "nMPCXuvL8EM",
"title": "The Super Mario Bros. Movie Direct",
"author": "Nintendo of America",
"number_of_views": 5346265,
"video_length": "8:02",
"description": "Watch this Nintendo Direct: The Super Mario Bros. Movie presentation introducing the world premiere trailer for the upcoming film.",
"is_live_content": null,
"published_time": "Streamed 1 day ago",
"channel_id": "UCGIY_O-8vW4rfX98KlMkvRg",
"category": null,
"type": "NORMAL",
"keywords": [],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/nMPCXuvL8EM/hqdefault.jpg",
"width": 210,
"height": 118
},
{
"url": "https://i.ytimg.com/vi/nMPCXuvL8EM/hqdefault.jpg",
"width": 246,
"height": 138
},
{
"url": "https://i.ytimg.com/vi/nMPCXuvL8EM/hqdefault.jpg",
"width": 336,
"height": 188
}
]
}
]
}