Seamless Integration
Easily integrate our YouTube Scraper API into your existing systems to enhance your media and content strategies.
Extract data at scale using YouTube Search API. Get data from YouTube search results, titles, links, channel names, and thumbnail URLs.
"video_results": [
{
"title": "OpenAI co-founder to take the stand in trial involving Elon Musk",
"link": "https://www.youtube.com/watch?v=59NQElP4pLs",
"channel": {
"name": "ABC News",
"link": "https://www.youtube.com/channel/@ABCNews",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_abc123...",
"verified": true
},
"published_date": "6 hours ago",
"views": "2,886 views",
"length": "4:10",
"description": "ABC News legal contributor James Sample breaks down the case ...",
"extensions": [
"New"
],
"thumbnail": {
"static": "https://i.ytimg.com/vi/59NQElP4pLs/hq720.jpg",
"rich": "https://i.ytimg.com/an_webp/59NQElP4pLs/mqdefault_6s.webp"
},
"position": 1
}
]"popular_today": [
{
"title": "I Survived 100 Days in Hardcore Minecraft",
"link": "https://www.youtube.com/watch?v=8edsg9D1234",
"channel": { "name": "PewDiePie", "verified": true },
"views": "12,401,233 views",
"position": 1
}
],
"channels_new_to_you": [
{
"name": "Veritasium",
"link": "https://www.youtube.com/@veritasium",
"subscribers": "16.2M subscribers",
"thumbnail": "https://yt3.ggpht.com/..."
}
],
"from_related_searches": [
{
"query": "elon musk interview 2025",
"link": "https://www.youtube.com/results?search_query=elon+musk+interview+2025"
}
]"pagination": {
"current": 1,
"next": 2,
"next_page_token": "EpEDEgllbG9uIG11c2sa..."
}import requests
api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/youtube/search"
params = {
"api_key": api_key,
"search_query": "elon musk",
"country": "us"
}
response = requests.get(url, params=params)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
try {
// Set the API key and request parameters
String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
String searchQuery = "elon musk";
String country = "us";
// Construct the API endpoint URL
String apiUrl = "https://api.scrapingdog.com/youtube/search?api_key=" + apiKey
+ "&search_query=" + searchQuery
+ "&country=" + country;
URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = reader.readLine()) != null) {
response.append(inputLine);
}
reader.close();
System.out.println(response.toString());
} else {
System.out.println("HTTP request failed with response code: " + responseCode);
}
connection.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}<?php
// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$search_query = 'elon musk';
$country = 'us';
// Set the API endpoint
$url = 'https://api.scrapingdog.com/youtube/search?api_key=' . $api_key . '&search_query=' . urlencode($search_query) . '&country=' . $country;
// Initialize cURL session
$ch = curl_init($url);
// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the cURL request
$response = curl_exec($ch);
// Check if the request was successful
if ($response === false) {
echo 'cURL error: ' . curl_error($ch);
} else {
echo $response;
}
// Close the cURL session
curl_close($ch);require 'net/http'
require 'uri'
# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
search_query = 'elon musk'
country = 'us'
# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/youtube/search?api_key=#{api_key}&search_query=#{search_query}&country=#{country}")
# Create an HTTP GET request
request = Net::HTTP::Get.new(url)
# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)
# Send the request and get the response
response = http.request(request)
# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
puts response.body
else
puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
endconst axios = require('axios');
const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/youtube/search';
const params = {
api_key: api_key,
search_query: 'elon musk',
country: 'us',
};
axios
.get(url, { params: params })
.then(function (response) {
if (response.status === 200) {
const data = response.data;
console.log(data);
} else {
console.log('Request failed with status code: ' + response.status);
}
})
.catch(function (error) {
console.error('Error making the request: ' + error.message);
});titlelinkdescriptionpublished_dateviewslengthchannel.namechannel.linkchannel.thumbnailchannel.verifiedthumbnail.staticthumbnail.richextensionspositionpopular_todaychannels_new_to_youfrom_related_searchesvideo_resultspagination.currentpagination.nextpagination.next_page_tokenYouTube has no public search endpoint, so by hand you reverse-engineer ytInitialData and chase continuation tokens.
Search loads in lazy batches behind opaque continuation tokens. You replay the internal browse API call by call to reach result 30.
There is no static HTML. Titles, views, and channels live inside the ytInitialData blob you must reconstruct.
YouTube reshuffles its videoRenderer JSON without notice, silently breaking custom parsers and dropping fields like views or length.
Region consent pages, interstitials, and aggressive bot checks throttle headless browsers before you collect data at scale.
With Scrapingdog, one API call handles proxies, CAPTCHA, parsing, and scaling, so you focus on your data.
Maximize your video content strategy by identifying popular videos and emerging trends on YouTube.
Gain deep insights into channel performance and growth trends, tracking competitors to optimize content.
Analyze viewer interactions and feedback to understand audience preferences for tailored video content.
Enhance YouTube SEO by understanding content appearance in search results through optimized titles and keywords.
Easily integrate our YouTube Scraper API into your existing systems to enhance your media and content strategies.
Use search_query, country, and language to pinpoint videos by title, channel, or topic.
Benefit from exceptionally fast response times with our YouTube Scraper API, ensuring you receive timely data.
We replay YouTubeβs internal browse calls and resolve continuation tokens, so one request returns a clean result set.
Region consent pages, interstitials, and bot detection are cleared automatically with rotating proxies.
Every call hits YouTube live, returning the freshest view counts, upload times, and badges instead of cached rankings.
Analyze the competitive landscape by extracting data on video rankings, views, and engagement metrics.
Gain a deeper understanding of viewer preferences by analyzing comments, likes, and engagement trends.
Identify potential partners by analyzing video popularity and engagement rates across channels.
Track emerging topics and viral videos using real-time data to adapt your content strategy.
Optimize your video content by analyzing top-ranking videos' keywords and tags.
Measure campaign impact by tracking view count and engagement rate changes over time.
Sign up and get free credits to start testing the YouTube Scraper API.
Access your unique API key from the dashboard and use it to scrape the data.
Pass a search_query like "elon musk" plus an optional country code.
Get a ranked video_results array with channel, views, and thumbnails as clean JSON.
Start your web scraping journey with 200 free credits. Test our service and upgrade to one of the plans below. Cancel anytime.

I got the free trial and in less than a minute I already integrated with their API to scrape Google.
United States
I love how you can use it to scrape data from Google.
Norway
Scrapingdog is an awesome service. I use it with my Local Leads Sniper system.
Mexico
Reliable, and simple to use! Itβs also inexpensive and has packaged solutions for every need (Google, LinkedIn). Highly recommend.
France
You can extract titles, links, channel names, thumbnail URLs and more structured YouTube data using a simple API call.
Scrapingdog provides Instagram, Facebook, X, YouTube Transcript, LinkedIn Profile, and LinkedIn Jobs scraper APIs.
This API focuses on extracting titles, likes, views, and upload details. You can extract transcripts using our YouTube Transcript API.
Each API request consumes a certain number of credits based on the dedicated API you're using. For example the Google Search API costs 5 credits per request. So, if you make one request to the Google Search API, it will deduct 5 credits from the available credits in your account.
Get 200 free credits to spin the API. No credit card required!