YouTube Scraping API
Scrape YouTube search results, video metadata, and subtitles in real-time with structured JSON output.
ScrapingBee simplified our day-to-day marketing and engineering operations a lot. We no longer have to worry about managing our own fleet of headless browsers, and we no longer have to spend days sourcing the right proxy provider
Designed specifically for
The Problem
Scraping YouTube shouldn't feel like hacking.
Web scraping YouTube data is a pain:
You're blocked by anti-bot systems
Rotating proxies eat up time
Managing headless browsers slows your team
Video layouts and data structures keep changing
Extracting subtitles requires complex parsing
Metadata scattered across multiple page elements
Whether you're building a product, training AI models, or running video analysis at scale, you shouldn't need a DevOps team just to get reliable results.
Powerful YouTube API endpoints for complete platform data extraction
Code
import requests
def send_request():
response = requests.get(
url='https://app.scrapingbee.com/api/v1/youtube/search',
params={
'search': 'python tutorial',
'language': 'en'
},
headers={'Authorization': 'Bearer YOUR-API-KEY'},
)
print('Response HTTP Status Code: ', response.status_code)
print('Response HTTP Response Body: ', response.content)
send_request()
const axios = require('axios');
axios.get('https://app.scrapingbee.com/api/v1/youtube/search', {
params: {
"search": "python tutorial",
"language": "en"
},
headers: {'Authorization': 'Bearer YOUR-API-KEY'}
}).then(function (response) {
// handle success
console.log(response);
});
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.scrapingbee.com/api/v1/youtube/search?search=python%20tutorial&language=en');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer YOUR-API-KEY'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
echo 'HTTP Status Code: ' . curl_getinfo($ch, CURLINFO_HTTP_CODE) . PHP_EOL;
echo 'Response Body: ' . $response . PHP_EOL;
// close curl resource to free up system resources
curl_close($ch);
?>
require 'net/http'
require 'net/https'
# Classic (GET )
def send_request
uri = URI('https://app.scrapingbee.com/api/v1/youtube/search?search=python%20tutorial&language=en')
# Create client
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
# Create Request
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer YOUR-API-KEY'
# Fetch Request
res = http.request(req)
puts "Response HTTP Status Code: #{ res.code }"
puts "Response HTTP Response Body: #{ res.body }"
rescue StandardError => e
puts "HTTP Request failed (#{ e.message })"
end
send_request()
import java.io.IOException;
import org.apache.http.client.fluent.*;
public class SendRequest
{
public static void main(String[] args) {
sendRequest();
}
private static void sendRequest() {
// Classic (GET )
try {
// Create request
Content content = Request.Get("https://app.scrapingbee.com/api/v1/youtube/search?search=python%20tutorial&language=en")
.addHeader("Authorization", "Bearer YOUR-API-KEY")
// Fetch request and return content
.execute().returnContent();
// Print content
System.out.println(content);
}
catch (IOException e) { System.out.println(e); }
}
}
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func sendClassic() {
// Create client
client := &http.Client{}
// Create request
req, err := http.NewRequest("GET", "https://app.scrapingbee.com/api/v1/youtube/search?search=python%20tutorial&language=en", nil)
req.Header.Set("Authorization", "Bearer YOUR-API-KEY")
parseFormErr := req.ParseForm()
if parseFormErr != nil {
fmt.Println(parseFormErr)
}
// Fetch Request
resp, err := client.Do(req)
if err != nil {
fmt.Println("Failure : ", err)
}
// Read Response Body
respBody, _ := ioutil.ReadAll(resp.Body)
// Display Results
fmt.Println("response Status : ", resp.Status)
fmt.Println("response Headers : ", resp.Header)
fmt.Println("response Body : ", string(respBody))
}
func main() {
sendClassic()
}
Response
{
"results": [
{
"avatar": {
"decoratedAvatarViewModel": {
"a11yLabel": "Go to channel",
"avatar": {
"avatarViewModel": {
"avatarImageSize": "AVATAR_SIZE_M",
"image": {
"sources": [
{
"height": 68,
"url": "https://yt3.ggpht.com/HCv0fXFEEcD0HRyF0_qR1K7b7qO3KCzmIoyH1DEJYB94CIUFhIE5i2t2IDIPX97W1-DK4hegww=s68-c-k-c0x00ffffff-no-rj",
"width": 68
}
]
}
}
},
"rendererContext": {
"commandContext": {
"onTap": {
"innertubeCommand": {
"browseEndpoint": {
"browseId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"canonicalBaseUrl": "/@programmingwithmosh"
},
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse",
"rootVe": 3611,
"url": "/@programmingwithmosh",
"webPageType": "WEB_PAGE_TYPE_CHANNEL"
}
}
}
}
}
}
}
},
"channelThumbnailSupportedRenderers": {
"channelThumbnailWithLinkRenderer": {
"accessibility": {
"accessibilityData": {
"label": "Go to channel"
}
},
"navigationEndpoint": {
"browseEndpoint": {
"browseId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"canonicalBaseUrl": "/@programmingwithmosh"
},
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse",
"rootVe": 3611,
"url": "/@programmingwithmosh",
"webPageType": "WEB_PAGE_TYPE_CHANNEL"
}
}
},
"thumbnail": {
"thumbnails": [
{
"height": 68,
"url": "https://yt3.ggpht.com/HCv0fXFEEcD0HRyF0_qR1K7b7qO3KCzmIoyH1DEJYB94CIUFhIE5i2t2IDIPX97W1-DK4hegww=s68-c-k-c0x00ffffff-no-rj",
"width": 68
}
]
}
}
},
"detailedMetadataSnippets": [
{
"maxOneLine": true,
"snippetHoverText": {
"runs": [
{
"text": "From the video description"
}
]
},
"snippetText": {
"runs": [
{
"text": "Master "
},
{
"bold": true,
"text": "Python"
},
{
"text": " from scratch No fluffβjust clear, practical coding skills to kickstart your journey! β€οΈ Join this channel to get ..."
}
]
}
}
],
"expandableMetadata": {
"expandableMetadataRenderer": {
"collapseButton": {
"buttonRenderer": {
"accessibilityData": {
"accessibilityData": {
"label": "Less"
}
},
"icon": {
"iconType": "EXPAND_LESS"
},
"isDisabled": false,
"size": "SIZE_DEFAULT",
"style": "STYLE_DEFAULT",
"trackingParams": "CLgFEPBbIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"colorData": {
"darkColorPalette": {
"iconActivatedColor": 4293977599,
"iconDisabledColor": 4065544544,
"iconInactiveColor": 4287200411,
"primaryTitleColor": 4293977599,
"secondaryTitleColor": 4290028492,
"section1Color": 4280883519,
"section2Color": 4280357939,
"section3Color": 4279832358,
"section4Color": 4279241241
},
"lightColorPalette": {
"iconActivatedColor": 4282000217,
"iconDisabledColor": 4072058561,
"iconInactiveColor": 4286937238,
"primaryTitleColor": 4279504921,
"secondaryTitleColor": 4285093508,
"section1Color": 4294769663,
"section2Color": 4294242808,
"section3Color": 4293650418,
"section4Color": 4293123563
},
"saturatedColorPalettes": {
"darkThemePalette": {
"additiveBackground": 729761225,
"baseBackground": 4279042588,
"cardOutline": 176113097,
"collectionStack": 4283447918,
"dropShadow": 427771337,
"invertedBackground": 4289297635,
"keyLight": 4282263645,
"outline": 1071368946,
"overlayBackground": 3424455222,
"overlayTextPrimary": 4294373631,
"raisedBackground": 4280093238,
"textDisabled": 2145110770,
"textPrimary": 4293648634,
"textPrimaryInverse": 4279042588,
"textSecondary": 4290882781
},
"lightThemePalette": {
"additiveBackground": 561989065,
"baseBackground": 4294373631,
"cardOutline": 176113097,
"collectionStack": 4288842688,
"dropShadow": 427771337,
"invertedBackground": 4283111823,
"keyLight": 4290882781,
"outline": 858527307,
"overlayBackground": 3424455222,
"overlayTextPrimary": 4294373631,
"raisedBackground": 4294373631,
"textDisabled": 2133595723,
"textPrimary": 4280093238,
"textPrimaryInverse": 4294373631,
"textSecondary": 4283447918
}
},
"vibrantColorPalette": {
"iconActivatedColor": 4293977599,
"iconDisabledColor": 4064228684,
"iconInactiveColor": 4286475161,
"primaryTitleColor": 4293977599,
"secondaryTitleColor": 4291540965,
"section1Color": 4283642751,
"section2Color": 4283116914,
"section3Color": 4282525798,
"section4Color": 4282000217
}
},
"expandButton": {
"buttonRenderer": {
"accessibilityData": {
"accessibilityData": {
"label": "More"
}
},
"icon": {
"iconType": "EXPAND_MORE"
},
"isDisabled": false,
"size": "SIZE_DEFAULT",
"style": "STYLE_DEFAULT",
"trackingParams": "CLkFEPBbIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"expandedContent": {
"horizontalCardListRenderer": {
"cards": [
{
"macroMarkersListItemRenderer": {
"isHighlighted": false,
"layout": "MACRO_MARKERS_LIST_ITEM_RENDERER_LAYOUT_VERTICAL",
"onTap": {
"clickTrackingParams": "COgFENDQBhgAIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"rootVe": 3832,
"url": "/watch?v=K5KVEU3aaeQ",
"webPageType": "WEB_PAGE_TYPE_WATCH"
}
},
"watchEndpoint": {
"videoId": "K5KVEU3aaeQ",
"watchEndpointSupportedOnesieConfig": {
"html5PlaybackOnesieConfig": {
"commonConfig": {
"url": "https://rr4---sn-p5qddn7r.googlevideo.com/initplayback?source=youtube&oeis=1&c=WEB&oad=3200&ovd=3200&oaad=11000&oavd=11000&ocs=700&oewis=1&oputc=1&ofpcc=1&msp=1&odepv=1&id=2b9295114dda69e4&ip=86.106.13.54&mt=1761196615&oweuc="
}
}
}
}
},
"thumbnail": {
"thumbnails": [
{
"height": 188,
"url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hqdefault_26866.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA4-8JL41at5KzmN7PV73femAg7MA",
"width": 336
}
]
},
"timeDescription": {
"runs": [
{
"text": "0:00"
}
]
},
"title": {
"runs": [
{
"text": "Introduction"
}
]
},
"trackingParams": "COgFENDQBhgAIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
],
"nextButton": {
"buttonRenderer": {
"icon": {
"iconType": "CHEVRON_RIGHT"
},
"isDisabled": false,
"size": "SIZE_DEFAULT",
"style": "STYLE_DEFAULT",
"trackingParams": "CLsFEPBbIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"previousButton": {
"buttonRenderer": {
"icon": {
"iconType": "CHEVRON_LEFT"
},
"isDisabled": false,
"size": "SIZE_DEFAULT",
"style": "STYLE_DEFAULT",
"trackingParams": "CLwFEPBbIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"style": {
"type": "HORIZONTAL_CARD_LIST_STYLE_TYPE_ENGAGEMENT_PANEL_SECTION"
},
"trackingParams": "CLoFEJFaIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"header": {
"collapsedLabel": {
"runs": [
{
"text": "Matching chapter"
}
]
},
"collapsedThumbnail": {
"thumbnails": [
{
"height": 188,
"url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hqdefault_57900.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBHvhpwPGcLWWeSYZwVntOAcJLL7Q",
"width": 336
}
]
},
"collapsedTitle": {
"runs": [
{
"text": "0:56 What is Python?"
}
]
},
"expandedTitle": {
"runs": [
{
"text": "Matching chapter"
}
]
},
"showLeadingCollapsedLabel": true
},
"loggingDirectives": {
"trackingParams": "CLcFEO_DByITCNL7n5_KuZADFcBMngYddR4DiQ==",
"visibility": {
"types": "12"
}
},
"trackingParams": "CLcFEO_DByITCNL7n5_KuZADFcBMngYddR4DiQ==",
"useCustomColors": true
}
},
"inlinePlaybackEndpoint": {
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4kyBnNlYXJjaFIQUHl0aG9uIHR1dG9yaWFsc5oBAxD0JMoBBBgpmo0=",
"commandMetadata": {
"webCommandMetadata": {
"rootVe": 3832,
"url": "/watch?v=K5KVEU3aaeQ&t=56s&pp=YAHIAQGiBhUB9JltFJnoDqTAmxc8_PTmQFcIHko%3D",
"webPageType": "WEB_PAGE_TYPE_WATCH"
}
},
"watchEndpoint": {
"params": "qgMQUHl0aG9uIHR1dG9yaWFsc7oDCwiCxqaxyu6T5bcBugMLCLzrvunSisf9rQG6AwoI9ZHmgKrt3advugMLCNfMkaf05Iry_gG6AwoIqtzq77bdreNmugMLCO2rkYPaiNePiwG6AwoInOL2vf_289V7ugMKCImavvWxwKSkEroDCgiFy625gLfCsB-6AwsIr-if09380NWSAboDCgj3nt-j4Y67tH26AwsIpJq8_daAwY6YAboDCgjo8Jft06v3wmG6AwoIzuWe3PXNmo8bugMLCKL6paXRsMnJlwG6AwsI49v38_WlgYCrAboDCwipzP2-0LPqt6sBugMKCLqHgKyji6LqPLoDCgiH2M6p2fCXsnnyAwUNpWUFPw%3D%3D",
"playerExtraUrlParams": [
{
"key": "inline",
"value": "1"
}
],
"playerParams": "YAHIAQGiBhUB9JltFJnoDqTAmxc8_PTmQFcIHko%3D",
"startTimeSeconds": 56,
"videoId": "K5KVEU3aaeQ",
"watchEndpointSupportedOnesieConfig": {
"html5PlaybackOnesieConfig": {
"commonConfig": {
"url": "https://rr4---sn-p5qddn7r.googlevideo.com/initplayback?source=youtube&oeis=1&c=WEB&oad=3200&ovd=3200&oaad=11000&oavd=11000&ocs=700&oewis=1&oputc=1&ofpcc=1&msp=1&odepv=1&id=2b9295114dda69e4&ip=86.106.13.54&osts=56&mt=1761196615&oweuc="
}
}
}
}
},
"lengthText": {
"accessibility": {
"accessibilityData": {
"label": "2 hours, 2 minutes, 21 seconds"
}
},
"simpleText": "2:02:21"
},
"longBylineText": {
"runs": [
{
"navigationEndpoint": {
"browseEndpoint": {
"browseId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"canonicalBaseUrl": "/@programmingwithmosh"
},
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse",
"rootVe": 3611,
"url": "/@programmingwithmosh",
"webPageType": "WEB_PAGE_TYPE_CHANNEL"
}
}
},
"text": "Programming with Mosh"
}
]
},
"menu": {
"menuRenderer": {
"accessibility": {
"accessibilityData": {
"label": "Action menu"
}
},
"items": [
{
"menuServiceItemRenderer": {
"icon": {
"iconType": "ADD_TO_QUEUE_TAIL"
},
"serviceEndpoint": {
"clickTrackingParams": "CO4FEP6YBBgRIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"sendPost": true
}
},
"signalServiceEndpoint": {
"actions": [
{
"addToPlaylistCommand": {
"listType": "PLAYLIST_EDIT_LIST_TYPE_QUEUE",
"onCreateListCommand": {
"clickTrackingParams": "CO4FEP6YBBgRIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/playlist/create",
"sendPost": true
}
},
"createPlaylistServiceEndpoint": {
"params": "CAQ%3D",
"videoIds": [
"K5KVEU3aaeQ"
]
}
},
"openMiniplayer": true,
"videoCommand": {
"clickTrackingParams": "CO4FEP6YBBgRIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"rootVe": 3832,
"url": "/watch?v=K5KVEU3aaeQ",
"webPageType": "WEB_PAGE_TYPE_WATCH"
}
},
"watchEndpoint": {
"videoId": "K5KVEU3aaeQ",
"watchEndpointSupportedOnesieConfig": {
"html5PlaybackOnesieConfig": {
"commonConfig": {
"url": "https://rr4---sn-p5qddn7r.googlevideo.com/initplayback?source=youtube&oeis=1&c=WEB&oad=3200&ovd=3200&oaad=11000&oavd=11000&ocs=700&oewis=1&oputc=1&ofpcc=1&msp=1&odepv=1&id=2b9295114dda69e4&ip=86.106.13.54&mt=1761196615&oweuc="
}
}
}
}
},
"videoId": "K5KVEU3aaeQ",
"videoIds": [
"K5KVEU3aaeQ"
]
},
"clickTrackingParams": "CO4FEP6YBBgRIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ=="
}
],
"signal": "CLIENT_SIGNAL"
}
},
"text": {
"runs": [
{
"text": "Add to queue"
}
]
},
"trackingParams": "CO4FEP6YBBgRIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
{
"menuNavigationItemRenderer": {
"icon": {
"iconType": "BOOKMARK_BORDER"
},
"navigationEndpoint": {
"clickTrackingParams": "CO0FEJSsCRgSIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"rootVe": 83769,
"url": "https://accounts.google.com/ServiceLogin?service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den&hl=en",
"webPageType": "WEB_PAGE_TYPE_UNKNOWN"
}
},
"signInEndpoint": {
"nextEndpoint": {
"clickTrackingParams": "CO0FEJSsCRgSIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"showSheetCommand": {
"panelLoadingStrategy": {
"requestTemplate": {
"panelId": "PAadd_to_playlist",
"params": "-gYNCgtLNUtWRVUzYWFlUQ%3D%3D"
}
}
}
}
}
},
"text": {
"runs": [
{
"text": "Save to playlist"
}
]
},
"trackingParams": "CO0FEJSsCRgSIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
{
"menuServiceItemDownloadRenderer": {
"serviceEndpoint": {
"clickTrackingParams": "COwFENGqBRgTIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"offlineVideoEndpoint": {
"onAddCommand": {
"clickTrackingParams": "COwFENGqBRgTIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"getDownloadActionCommand": {
"isCrossDeviceDownload": false,
"params": "CAIQAA%3D%3D",
"videoId": "K5KVEU3aaeQ"
}
},
"videoId": "K5KVEU3aaeQ"
}
},
"trackingParams": "COwFENGqBRgTIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
{
"menuServiceItemRenderer": {
"hasSeparator": true,
"icon": {
"iconType": "SHARE"
},
"serviceEndpoint": {
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/share/get_share_panel",
"sendPost": true
}
},
"shareEntityServiceEndpoint": {
"commands": [
{
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"openPopupAction": {
"beReused": true,
"popup": {
"unifiedSharePanelRenderer": {
"showLoadingSpinner": true,
"trackingParams": "COsFEI5iIhMI0vufn8q5kAMVwEyeBh11HgOJ"
}
},
"popupType": "DIALOG"
}
}
],
"serializedShareEntity": "CgtLNUtWRVUzYWFlUQ%3D%3D"
}
},
"text": {
"runs": [
{
"text": "Share"
}
]
},
"trackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4k="
}
}
],
"trackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4k="
}
},
"navigationEndpoint": {
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4kyBnNlYXJjaFIQUHl0aG9uIHR1dG9yaWFsc5oBAxD0JMoBBBgpmo0=",
"commandMetadata": {
"webCommandMetadata": {
"rootVe": 3832,
"url": "/watch?v=K5KVEU3aaeQ&t=56s&pp=ygUQUHl0aG9uIHR1dG9yaWFscw%3D%3D",
"webPageType": "WEB_PAGE_TYPE_WATCH"
}
},
"watchEndpoint": {
"params": "uAI4qgMQUHl0aG9uIHR1dG9yaWFsc7oDCwiCxqaxyu6T5bcBugMLCLzrvunSisf9rQG6AwoI9ZHmgKrt3advugMLCNfMkaf05Iry_gG6AwoIqtzq77bdreNmugMLCO2rkYPaiNePiwG6AwoInOL2vf_289V7ugMKCImavvWxwKSkEroDCgiFy625gLfCsB-6AwsIr-if09380NWSAboDCgj3nt-j4Y67tH26AwsIpJq8_daAwY6YAboDCgjo8Jft06v3wmG6AwoIzuWe3PXNmo8bugMLCKL6paXRsMnJlwG6AwsI49v38_WlgYCrAboDCwipzP2-0LPqt6sBugMKCLqHgKyji6LqPLoDCgiH2M6p2fCXsnnyAwUNpWUFPw%3D%3D",
"playerParams": "ygUQUHl0aG9uIHR1dG9yaWFscw%3D%3D",
"startTimeSeconds": 56,
"videoId": "K5KVEU3aaeQ",
"watchEndpointSupportedOnesieConfig": {
"html5PlaybackOnesieConfig": {
"commonConfig": {
"url": "https://rr4---sn-p5qddn7r.googlevideo.com/initplayback?source=youtube&oeis=1&c=WEB&oad=3200&ovd=3200&oaad=11000&oavd=11000&ocs=700&oewis=1&oputc=1&ofpcc=1&msp=1&odepv=1&id=2b9295114dda69e4&ip=86.106.13.54&osts=56&mt=1761196615&oweuc="
}
}
}
}
},
"ownerBadges": [
{
"metadataBadgeRenderer": {
"accessibilityData": {
"label": "Verified"
},
"icon": {
"iconType": "CHECK_CIRCLE_THICK"
},
"style": "BADGE_STYLE_TYPE_VERIFIED",
"tooltip": "Verified",
"trackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4k="
}
}
],
"ownerText": {
"runs": [
{
"navigationEndpoint": {
"browseEndpoint": {
"browseId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"canonicalBaseUrl": "/@programmingwithmosh"
},
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse",
"rootVe": 3611,
"url": "/@programmingwithmosh",
"webPageType": "WEB_PAGE_TYPE_CHANNEL"
}
}
},
"text": "Programming with Mosh"
}
]
},
"publishedTimeText": {
"simpleText": "8 months ago"
},
"richThumbnail": {
"movingThumbnailRenderer": {
"enableHoveredLogging": true,
"enableOverlay": true,
"movingThumbnailDetails": {
"logAsMovingThumbnail": true,
"thumbnails": [
{
"height": 180,
"url": "https://i.ytimg.com/an_webp/K5KVEU3aaeQ/mqdefault_6s.webp?du=3000&sqp=CNjA5scG&rs=AOn4CLCMGoX6lzMPFdk1n32HOyQ4fdOyvw",
"width": 320
}
]
}
}
},
"searchVideoResultEntityKey": "EgtLNUtWRVUzYWFlUSDnAigB",
"shortBylineText": {
"runs": [
{
"navigationEndpoint": {
"browseEndpoint": {
"browseId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"canonicalBaseUrl": "/@programmingwithmosh"
},
"clickTrackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4nKAQQYKZqN",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse",
"rootVe": 3611,
"url": "/@programmingwithmosh",
"webPageType": "WEB_PAGE_TYPE_CHANNEL"
}
}
},
"text": "Programming with Mosh"
}
]
},
"shortViewCountText": {
"accessibility": {
"accessibilityData": {
"label": "3.8 million views"
}
},
"simpleText": "3.8M views"
},
"showActionMenu": false,
"thumbnail": {
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAXbPvWkQhvRSOYWD6mp9EVbfWSYg",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAbeaIhlZJzT49VmWFTFrL3rCq--Q",
"width": 720
}
]
},
"thumbnailOverlays": [
{
"thumbnailOverlayTimeStatusRenderer": {
"style": "DEFAULT",
"text": {
"accessibility": {
"accessibilityData": {
"label": "2 hours, 2 minutes, 21 seconds"
}
},
"simpleText": "2:02:21"
}
}
},
{
"thumbnailOverlayToggleButtonRenderer": {
"isToggled": false,
"toggledAccessibility": {
"accessibilityData": {
"label": "Added"
}
},
"toggledIcon": {
"iconType": "CHECK"
},
"toggledServiceEndpoint": {
"clickTrackingParams": "COoFEPnnAxgCIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse/edit_playlist",
"sendPost": true
}
},
"playlistEditEndpoint": {
"actions": [
{
"action": "ACTION_REMOVE_VIDEO_BY_VIDEO_ID",
"removedVideoId": "K5KVEU3aaeQ"
}
],
"playlistId": "WL"
}
},
"toggledTooltip": "Added",
"trackingParams": "COoFEPnnAxgCIhMI0vufn8q5kAMVwEyeBh11HgOJ",
"untoggledAccessibility": {
"accessibilityData": {
"label": "Watch later"
}
},
"untoggledIcon": {
"iconType": "WATCH_LATER"
},
"untoggledServiceEndpoint": {
"clickTrackingParams": "COoFEPnnAxgCIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/browse/edit_playlist",
"sendPost": true
}
},
"playlistEditEndpoint": {
"actions": [
{
"action": "ACTION_ADD_VIDEO",
"addedVideoId": "K5KVEU3aaeQ"
}
],
"playlistId": "WL"
}
},
"untoggledTooltip": "Watch later"
}
},
{
"thumbnailOverlayToggleButtonRenderer": {
"toggledAccessibility": {
"accessibilityData": {
"label": "Added"
}
},
"toggledIcon": {
"iconType": "PLAYLIST_ADD_CHECK"
},
"toggledTooltip": "Added",
"trackingParams": "COkFEMfsBBgDIhMI0vufn8q5kAMVwEyeBh11HgOJ",
"untoggledAccessibility": {
"accessibilityData": {
"label": "Add to queue"
}
},
"untoggledIcon": {
"iconType": "ADD_TO_QUEUE_TAIL"
},
"untoggledServiceEndpoint": {
"clickTrackingParams": "COkFEMfsBBgDIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"sendPost": true
}
},
"signalServiceEndpoint": {
"actions": [
{
"addToPlaylistCommand": {
"listType": "PLAYLIST_EDIT_LIST_TYPE_QUEUE",
"onCreateListCommand": {
"clickTrackingParams": "COkFEMfsBBgDIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ==",
"commandMetadata": {
"webCommandMetadata": {
"apiUrl": "/youtubei/v1/playlist/create",
"sendPost": true
}
},
"createPlaylistServiceEndpoint": {
"params": "CAQ%3D",
"videoIds": [
"K5KVEU3aaeQ"
]
}
},
"openMiniplayer": true,
"videoId": "K5KVEU3aaeQ",
"videoIds": [
"K5KVEU3aaeQ"
]
},
"clickTrackingParams": "COkFEMfsBBgDIhMI0vufn8q5kAMVwEyeBh11HgOJygEEGCmajQ=="
}
],
"signal": "CLIENT_SIGNAL"
}
},
"untoggledTooltip": "Add to queue"
}
},
{
"thumbnailOverlayNowPlayingRenderer": {
"text": {
"runs": [
{
"text": "Now playing"
}
]
}
}
},
{
"thumbnailOverlayLoadingPreviewRenderer": {
"text": {
"runs": [
{
"text": "Keep hovering to play"
}
]
}
}
},
{
"thumbnailBottomOverlayViewModel": {
"badge": {
"thumbnailBadgeViewModel": {
"text": "2:02:21"
}
},
"enableGradientBackground": true,
"progressBar": {
"thumbnailOverlayProgressBarViewModel": {
"enableSegmentView": true,
"segmentDurationPercent": 2,
"segmentLabel": "0:56",
"startPercent": 0
}
}
}
}
],
"title": {
"accessibility": {
"accessibilityData": {
"label": "Python Full Course for Beginners [2026] 2 hours, 2 minutes"
}
},
"runs": [
{
"text": "Python Full Course for Beginners [2026]"
}
]
},
"trackingParams": "CLYFENwwGAAiEwjS-5-fyrmQAxXATJ4GHXUeA4lA5NPp7pSipckr",
"videoId": "K5KVEU3aaeQ",
"viewCountText": {
"simpleText": "3,804,720 views"
}
},
],
"search": "Python tutorials"
}
Input Parameters
search
Search Query
The text you'd type into the YouTube search bar.
search_type
Search Type
The type of search: videos, channels, or playlists
sort_by
Sort by
Sort by relevance, upload date, view count or rating
4k
4K
Get only 4k outputs
And more ...
Check our full documentation for all available parameters.
Code
import requests
def send_request():
response = requests.get(
url='https://app.scrapingbee.com/api/v1/youtube/metadata',
params={
'video_id': 'kqtD5dpn9C8'
},
headers={'Authorization': 'Bearer YOUR-API-KEY'},
)
print('Response HTTP Status Code: ', response.status_code)
print('Response HTTP Response Body: ', response.content)
send_request()
const axios = require('axios');
axios.get('https://app.scrapingbee.com/api/v1/youtube/metadata', {
params: {
"video_id": "kqtD5dpn9C8"
},
headers: {'Authorization': 'Bearer YOUR-API-KEY'}
}).then(function (response) {
// handle success
console.log(response);
});
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.scrapingbee.com/api/v1/youtube/metadata?video_id=kqtD5dpn9C8');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer YOUR-API-KEY'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
echo 'HTTP Status Code: ' . curl_getinfo($ch, CURLINFO_HTTP_CODE) . PHP_EOL;
echo 'Response Body: ' . $response . PHP_EOL;
// close curl resource to free up system resources
curl_close($ch);
?>
require 'net/http'
require 'net/https'
# Classic (GET )
def send_request
uri = URI('https://app.scrapingbee.com/api/v1/youtube/metadata?video_id=kqtD5dpn9C8')
# Create client
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
# Create Request
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer YOUR-API-KEY'
# Fetch Request
res = http.request(req)
puts "Response HTTP Status Code: #{ res.code }"
puts "Response HTTP Response Body: #{ res.body }"
rescue StandardError => e
puts "HTTP Request failed (#{ e.message })"
end
send_request()
import java.io.IOException;
import org.apache.http.client.fluent.*;
public class SendRequest
{
public static void main(String[] args) {
sendRequest();
}
private static void sendRequest() {
// Classic (GET )
try {
// Create request
Content content = Request.Get("https://app.scrapingbee.com/api/v1/youtube/metadata?video_id=kqtD5dpn9C8")
.addHeader("Authorization", "Bearer YOUR-API-KEY")
// Fetch request and return content
.execute().returnContent();
// Print content
System.out.println(content);
}
catch (IOException e) { System.out.println(e); }
}
}
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func sendClassic() {
// Create client
client := &http.Client{}
// Create request
req, err := http.NewRequest("GET", "https://app.scrapingbee.com/api/v1/youtube/metadata?video_id=kqtD5dpn9C8", nil)
req.Header.Set("Authorization", "Bearer YOUR-API-KEY")
parseFormErr := req.ParseForm()
if parseFormErr != nil {
fmt.Println(parseFormErr)
}
// Fetch Request
resp, err := client.Do(req)
if err != nil {
fmt.Println("Failure : ", err)
}
// Read Response Body
respBody, _ := ioutil.ReadAll(resp.Body)
// Display Results
fmt.Println("response Status : ", resp.Status)
fmt.Println("response Headers : ", resp.Header)
fmt.Println("response Body : ", string(respBody))
}
func main() {
sendClassic()
}
Response
{
"age_limit": 0,
"categories": [
"Education"
],
"channel_id": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"channel_url": "https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA",
"comment_count": 26000,
"description": "Learn Python basics in just 1 hour! Perfect for beginners interested in AI and coding. β‘ Plus, get 6 months of PyCharm FREE with the coupon in the description!\n\nβ€οΈ Join this channel to get access to perks:\nhttps://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA/join\n\nπ Want to dive deeper? Check out my Complete Python Mastery course: \n- Full course: https://mosh.link/python-course\n- Subscribe for more Python tutorials like this: https://goo.gl/6PYaGF\n\nπ Get the FREE goodies:\n- Python cheat sheet: https://mosh.link/python-cheatsheet\n- Get 6 months of PyCharm for free with this coupon code: MOSH_YOUTUBE - Redeem it at: https://jb.gg/redeem\n\nβ Stay connected:\n- Twitter: https://twitter.com/moshhamedani\n- Facebook: https://www.facebook.com/programmingwithmosh/\n- Instagram: https://www.instagram.com/codewithmosh.official/\n- LinkedIn: https://www.linkedin.com/school/codewithmosh/\n\nβ Related tutorials\nhttps://youtu.be/yVl_G-F7m8c?si=11emtFyDccTKCGn7\n\nπ TABLE OF CONTENT\n0:00:00 Introduction \n0:00:30 What You Can Do With Python \n0:01:15 Your First Python Program \n0:05:30 Variables\n0:09:08 Receiving Input\n0:10:48 Type Conversion\n0:18:49 Strings\n0:23:41 Arithmetic Operators \n0:25:59 Operator Precedence \n0:27:11 Comparison Operators \n0:28:52 Logical Operators\n0:31:06 If Statements\n0:36:16 Exercise\n0:41:42 While Loops\n0:45:11 Lists\n0:48:47 List Methods\n0:52:16 For Loops\n0:54:54 The range() Function \n0:57:43 Tuples\n\n#Python #AI #MachineLearning #WebDevelopment",
"duration": 3605,
"formats": [
{
"acodec": "mp4a.40.2",
"ext": "mp4",
"format_id": "18",
"format_note": "360p",
"fps": 30,
"resolution": "640x360",
"url": "https://rr4---sn-woc7knel.googlevideo.com/videoplayback?expire=1761220181&ei=9cH5aMDpKfmtvdIPpf3coAc&ip=160.242.39.18&id=o-ABJJihCcFmY05DcUZZU_t8A17taP5pTkixQgIeSEXhYF&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1761198581%2C&mh=ui&mm=31%2C26&mn=sn-woc7knel%2Csn-hc57en7d&ms=au%2Conr&mv=m&mvi=4&pl=22&rms=au%2Cau&initcwndbps=512500&bui=AdEuB5So6Oy2O_NyQemCTqWOM1fU6R_-mk4KKVLSJcShGUd5JYA_hLpib5Ko6cHGVfaRWa__t9NE8p81&spc=6b0G_HY_A0AEU4Bdi3jpd4JAK_ILwQpMgY7R_UuykXxWIzXpK0wwBfpABO5uSLsFaRT2t_ZP10BStg&vprv=1&svpuc=1&mime=video%2Fmp4&ns=Y4cnSxq1OuON-czOpiroTY4Q&rqh=1&gir=yes&clen=71923246&ratebypass=yes&dur=3605.640&lmt=1756284595277193&mt=1761198293&fvip=1&fexp=51355912%2C51552689%2C51565115%2C51565682%2C51580968&c=WEB&sefc=1&txp=5438534&n=-DgWoO84ndUYekNlf&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRQIgbNEydYacEJ89s89ISCKgdGxUHYc9aQuQHdF7ulG-WkkCIQDheWlzxz33j5p1EVIni2EuwkRdP-vLzRFabDbv-nQfgw%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=APaTxxMwRAIgH7I2oSzGyMtKElvCKlgMDNCbjZhNtFpmdFSvF2uIh_kCIAaHbyRk4ti6VLyncJtAShzwDIOVsjFoJCZVH9EM6lv_",
"vcodec": "avc1.42001E"
},
{
"acodec": null,
"ext": "mp4",
"format_id": "137",
"format_note": "1080p, MISSING POT",
"fps": 30,
"resolution": "1920x1080",
"url": null,
"vcodec": "avc1.640028"
},
...
],
"is_live": false,
"like_count": 527577,
"tags": [
"code with mosh",
"introduction to python",
"learn python",
"learn python programming",
"mosh hamedani",
"programming",
"programming with mosh",
"python",
"python 2020",
"python 3",
"python basics",
"python course",
"python crash course",
"python for beginners",
"python from scratch",
"python programming",
"python tutorial",
"python tutorial for beginners",
"web development"
],
"thumbnails": [
{
"height": 94,
"url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLAlw90fLox2Cpl4sR4_lYGbkEBOlA",
"width": 168
},
{
"height": 110,
"url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hqdefault.jpg?sqp=-oaymwEmCMQBEG5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLAgC9wqGU1HpYZsO6mtkRsaE-tzuQ",
"width": 196
},
{
"height": 138,
"url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hqdefault.jpg?sqp=-oaymwEnCPYBEIoBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLBRBdwWceylwJf5KZ3QTAmVyxHm8Q",
"width": 246
},
{
"height": 188,
"url": "https://i.ytimg.com/vi/kqtD5dpn9C8/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLBmg3x02WsuMlRV-5IBl9xeXFumyA",
"width": 336
},
{
"height": 1080,
"url": "https://i.ytimg.com/vi_webp/kqtD5dpn9C8/maxresdefault.webp",
"width": 1920
},
{
"height": 720,
"url": "https://i.ytimg.com/vi/kqtD5dpn9C8/maxresdefault.jpg",
"width": 1280
}
],
"title": "Python for Beginners - Learn Coding with Python in 1 Hour",
"upload_date": "20200916",
"uploader": "Programming with Mosh",
"uploader_id": "@programmingwithmosh",
"uploader_url": "https://www.youtube.com/@programmingwithmosh",
"video_id": "kqtD5dpn9C8",
"view_count": 22952109
}
Input Parameters
video_id
Video ID
The unique YouTube video identifier from the URL.
And more ...
Check our full documentation for all available parameters.
Code
import requests
def send_request():
response = requests.get(
url='https://app.scrapingbee.com/api/v1/youtube/subtitles',
params={
'video_id': 'kqtD5dpn9C8',
'language': 'en',
'subtitle_origin': 'auto_generated'
},
headers={'Authorization': 'Bearer YOUR-API-KEY'},
)
print('Response HTTP Status Code: ', response.status_code)
print('Response HTTP Response Body: ', response.content)
send_request()
const axios = require('axios');
axios.get('https://app.scrapingbee.com/api/v1/youtube/subtitles', {
params: {
"video_id": "kqtD5dpn9C8",
"language": "en",
"subtitle_origin": "auto_generated"
},
headers: {'Authorization': 'Bearer YOUR-API-KEY'}
}).then(function (response) {
// handle success
console.log(response);
});
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.scrapingbee.com/api/v1/youtube/subtitles?video_id=kqtD5dpn9C8&language=en&subtitle_origin=auto_generated');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer YOUR-API-KEY'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if (!$response) {
die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
}
echo 'HTTP Status Code: ' . curl_getinfo($ch, CURLINFO_HTTP_CODE) . PHP_EOL;
echo 'Response Body: ' . $response . PHP_EOL;
// close curl resource to free up system resources
curl_close($ch);
?>
require 'net/http'
require 'net/https'
# Classic (GET )
def send_request
uri = URI('https://app.scrapingbee.com/api/v1/youtube/subtitles?video_id=kqtD5dpn9C8&language=en&subtitle_origin=auto_generated')
# Create client
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
# Create Request
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer YOUR-API-KEY'
# Fetch Request
res = http.request(req)
puts "Response HTTP Status Code: #{ res.code }"
puts "Response HTTP Response Body: #{ res.body }"
rescue StandardError => e
puts "HTTP Request failed (#{ e.message })"
end
send_request()
import java.io.IOException;
import org.apache.http.client.fluent.*;
public class SendRequest
{
public static void main(String[] args) {
sendRequest();
}
private static void sendRequest() {
// Classic (GET )
try {
// Create request
Content content = Request.Get("https://app.scrapingbee.com/api/v1/youtube/subtitles?video_id=kqtD5dpn9C8&language=en&subtitle_origin=auto_generated")
.addHeader("Authorization", "Bearer YOUR-API-KEY")
// Fetch request and return content
.execute().returnContent();
// Print content
System.out.println(content);
}
catch (IOException e) { System.out.println(e); }
}
}
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func sendClassic() {
// Create client
client := &http.Client{}
// Create request
req, err := http.NewRequest("GET", "https://app.scrapingbee.com/api/v1/youtube/subtitles?video_id=kqtD5dpn9C8&language=en&subtitle_origin=auto_generated", nil)
req.Header.Set("Authorization", "Bearer YOUR-API-KEY")
parseFormErr := req.ParseForm()
if parseFormErr != nil {
fmt.Println(parseFormErr)
}
// Fetch Request
resp, err := client.Do(req)
if err != nil {
fmt.Println("Failure : ", err)
}
// Read Response Body
respBody, _ := ioutil.ReadAll(resp.Body)
// Display Results
fmt.Println("response Status : ", resp.Status)
fmt.Println("response Headers : ", resp.Header)
fmt.Println("response Body : ", string(respBody))
}
func main() {
sendClassic()
}
Response
{
"subtitles": {
"auto_generated": {
"en": [
{
"start_ms": "920",
"d_duration_ms": "1520",
"snippet": {
"runs": [
{
"text": "hello and welcome"
}
]
}
}
],
"fr": [
{
"start_ms": "920",
"d_duration_ms": "1520",
"snippet": {
"runs": [
{
"text": "bonjour et bienvenue"
}
]
}
}
]
}
}
}
Input Parameters
video_id
Video ID
The unique YouTube video identifier from the URL.
language
Language
Specify which language subtitles to retrieve (e.g., "en", "es", "fr").
subtitle_origin
Subtitle origin
Choose between auto-generated or uploader-provided subtitles.
And more ...
Check our full documentation for all available parameters.
Ready to get started?
Start scraping YouTube with 1,000 free API credits, no credit card required!
How YouTube Scraper API works
With our YouTube API you control what, where, and how you scrape with just a few parameters:
Create an account and login to the dashboard commitment-free.
Quickly add our official Python library to your project. This makes it easy to send scraping requests without worrying about proxies or browsers.
Use your API key to fetch any web page. We do all the heavy lifting in the background, returning clean, ready-to-use HTML for you to parse and analyze.
Use our advanced features to tackle even the most complex sites. Our flexible options give you complete control over your scraping projects.
Our Solution
One simple API call.
Thousands of exciting YouTube insights.
Our YouTube data scraper saves you hours of setup, blocked requests, and broken code, from the first call to full-scale automation.
Built-in Geo Control
Forget VPNs or IP rotations. Scrape results as if you're searching from any location, in any language. Perfect for local video analysis.
See Documentation99.9% Success Rate at Any Scale
Our YouTube scraper infrastructure absorbs rate limits, quota drops, and regional throttling. Whether you're making 10 calls or 10 million, your pipeline stays stable, fast, and fully monitored.
See DocumentationDev-Ready Integration
No framework needed. Use Python, JS, PHP, curl, and more. Scrape YouTube in minutes with clear docs and prebuilt code snippets.
See DocumentationDev-friendly Control
Configure your request in seconds
With our YouTube API you control what, where, and how you scrape with just a few parameters:
Search Query
Find videos, channels, or playlists with simple search queries
Video ID
Extract metadata or subtitles by video ID
Language
Get results or subtitles in any language
Subtitle Origin
Choose between auto-generated or uploader-provided captions
Workflow
With Vs. Without ScrapingBee
Here's what your workflow looks like with or without ScrapingBee
Without ScrapingBee
Proxy pool, browser infra, retry logic
Raw HTML, constant cleaning
Manual troubleshooting
Manual proxies & VPNs
Hours or days
With ScrapingBee
One simple API call
Structured JSON
Automatic
Built-in
Minutes only
Our YouTube Scraper Features
Scraping YouTube has never been more simple with our powerful features. Built for speed and precision, it extracts accurate data at scale.
Use AI prompts to scrape YouTube pages effortlessly. Our scraper adapts to layout changes and outputs clean, structured JSON.
AI Web Scraping
Use AI prompts to scrape YouTube pages effortlessly. No coding or selectors needed.
Data Extraction
Capture high-quality screenshots of YouTube pages in seconds. Generate full-page or section-specific images.
Screenshot API
Automate scrolling, clicks, and other interactions to look more human. Our API handles JavaScript-rendered content to collect complete and accurate video data.
JavaScript Scraping
Connect our YouTube scraper API to Make to automate video monitoring and data delivery. Send results to Sheets, Slack, or APIs. No coding needed.
Make No-Code Scraping
Integrate our scraper with n8n to schedule video searches, extract metadata, or export reports automaticallyβcompletely code-free.
No-Code Scraping with n8n
Developer Experience
Top-rated support &
documentation
Our team is here to guide you when you need the extra assistance. And we're constantly working on new features to make your life easier.
Code samples
Whatever the programming language you enjoy, we have written code samples ready.
Knowledge base
Our extensive knowledge base covers the most frequent YouTube scraper use cases with code samples.
Why ScrapingBee for YouTube Data?
Get instant access to video metadata, subtitles, search results, and channel data directly from YouTube.
- Content analysis
- Subtitle extraction
- Video research
- ....and much more.
GDPR and CCPA compliant
ScrapingBee does not collect or store personal data from scraped sites unless their user explicitly requests it.
CAPTCHA bypass capacity
We handle proxy rotation to avoid IP-based blocking. With headless browser rendering, we mimic real user browsing behaviour and reduce the blocking risk.
Scalable
The platform scales smoothly with thousands of headless browsers and rotating proxies, ensuring fast, reliable performance even during traffic spikes.
Speed and accuracy
We deliver fast, reliable results in 1β5 seconds with high accuracy across most sites, even JavaScript-heavy ones.
Simple, transparent pricing.
Cancel anytime, no questions asked!
Need more monthly credits or higher concurrency?
Talk to Product ExpertNot sure which plan you need?
ScrapingBee in numbers
Trusted by developers
4,000+ customers all around the globe use ScrapingBee to solve their web scraping needs.
Trusted by 4,000+ developers and data teams
Scraping is 50% dealing with ever-changing HTML files and 50% massaging data into a useable format. ScrapingBeeβs incredible AI feature can do both much better than I ever could. Now I can spend 100% of my time on what matters most; my business.
ScrapingBee helps us to retrieve information from sites that use very sophisticated mechanism to block unwanted traffic, we were struggling with those sites for some time now and I'm very glad that we found ScrapingBee.
ScrapingBee clear documentation, easy-to-use API, and great success rate made it a no-brainer.
I'm a PhD candidate with absolutely no web scraping experience and needed to scrape some data for a dissertation project. ScrapingBee helped me get the job done quickly and easily. Excellent customer support too. Couldn't be happier!
Sam,
PhD candidate
So easy to set-up, straightforward and performance. They are reachable and kind, they introduced us properly their tool and offered the best solution for our need.
Great SaaS tool for legitimate scraping and data extraction. ScrapingBee makes it easy to automatically pull down data from the sites that publish periodic data in a human-readable format.
Good experience. I found this proxy service more effective compared to previous ones that were being used. It is fast and efficient.
Aayushi,
Senior analyst
Fantastic service: works flawlessly, best support I've experienced. It just works: and its parsing meta-language is wonderfully powerful. Most importantly, the support I've received has been superlative.
Excellent service, glad we made the switch! We could always dedicate resources and build our own systems for everything... or we could simply call the scrapingBee API and focus on the data. It makes our work so much easier.
Daniel L,
Lead dev
YouTube Scraper Tutorials
Learn how to use our YouTube Scraper API for various use cases
More markets. More opportunities.
Expand your data collection beyond YouTube Scraper API.
Frequently Asked Questions
Scraping YouTube may be legally complex, as it could violate their terms of service. Always review legal guidelines and use ScrapingBee's custom settings responsibly.
Yes, YouTube actively blocks web scrapers using sophisticated anti-bot systems including CAPTCHAs, IP rate limiting, and browser fingerprinting. ScrapingBee handles these challenges automatically with rotating proxies, headless browsers, and CAPTCHA solving, so you can scrape YouTube data reliably without getting blocked.
You can scrape YouTube video subtitles using ScrapingBee's YouTube API. Provide the video URL or ID and optional subtitle settings, and the API returns structured subtitle JSON grouped by subtitle origin and language.
Yes, ScrapingBee's YouTube API can extract search results including videos, channels, and playlists. Always ensure your use case complies with YouTube's terms of service and applicable laws.
