Content
YouTube Search Scraper
youtube.com
YouTube search is served through a dedicated plugin endpoint rather than the generic page fetch. Give it a query and it returns the results already parsed: for each video the videoId and title, the channel name, id and URL, the view count as both text and a number, the duration as text and seconds, the publish age, the thumbnail URLs, a description snippet and badges like verified, live or CC. Filter by type (video, channel, playlist or all) and sort (relevance, date, views or rating), and collect as many results as you need across pages. It reads YouTube's own search data, so there is no InnerTube API to reverse-engineer yourself.
What you can extract
- Video id, title and a watch URL
- Channel name, id and channel URL
- View count as text and parsed number
- Duration as text and seconds
- Publish age and thumbnail URLs
- Description snippet and badges (verified / live / CC)
Dedicated endpoints
/content/youtube-search YouTube search results
Search results for a query: each video with videoId, title, channel (name/id/url), view count (text + number), duration (text + seconds), publish age, thumbnails, a description snippet and badges. Filter with type (video / channel / playlist / all) and sort (relevance / date / views / rating); collect up to max_results across pages.
How to scrape it
curl -X POST \
-H "X-ScrapeUnblocker-Key: $SU_API_KEY" \
"https://api.scrapeunblocker.com/content/youtube-search?query=python%20tutorial&max_results=40"import requests
resp = requests.post(
"https://api.scrapeunblocker.com/content/youtube-search",
headers={"X-ScrapeUnblocker-Key": SU_API_KEY},
params={"query": "python tutorial", "max_results": "40"},
)
print(resp.text)import { ScrapeUnblockerClient } from 'scrapeunblocker';
const su = new ScrapeUnblockerClient({ apiKey: process.env.SU_API_KEY });
const data = await su.youtubeSearch('python tutorial', { maxResults: 40, type: 'video', sort: 'views' });
console.log(results); Requests are POST and take their parameters in the query string. Browser rendering always happens - there is no flag to enable.
Related scrapers
Start scraping this site today
Free tier included. No credit card required to test it.