YouTube Scraper API
Extract video metadata, channel statistics, view counts, comments, playlist data, and trending content from YouTube. Full rendering for dynamic content and infinite scroll.
YouTube is the world's second-largest search engine and the primary platform for video content intelligence. Spider renders YouTube's complex React interface and extracts structured data from videos, channels, playlists, and search results.
* Deliver and maintain Google services* Track outages and protect against spam, fraud, and abuse* Measure audience engagement and site statistics to understand how our services are used and enhance the quality of those servicesIf you choose to “Accept all,” we will also use cookies and data, including IP addresses, to* Develop and improve new services* Deliver and measure the effectiveness of ads* Show personalized content, depending on your settings* Show personalized ads, depending on your settingsIf you choose to “Reject all,” we will not use cookies or IP addresses for these additional purposes.Non-personalized content and ads are influenced by things like the content you’re currently viewing and your location (ad serving is based on general location). Personalized content and ads can also include things like video recommendations, a customized YouTube homepage, and tailored ads based on past activity, like the videos you watch and the things you search for on YouTube. We also use cookies and data to tailor the experience to be age-appropriate, if relevant.Select “More options” to see additional information, including details about managing your privacy settings. You can also visit g.co/privacytools at any time.AfrikaansazərbaycanbosanskicatalàČeštinaCymraegDanskDeutscheestiEnglish(United Kingdom)English(United States)Español(España)Español(Latinoamérica)euskaraFilipinoFrançais(Canada)Français(France)GaeilgegalegoHrvatskiIndonesiaisiZuluíslenskaItalianoKiswahililatviešulietuviųmagyarMelayuNederlandsnorsko‘zbekpolskiPortuguês(Brasil)Português(Portugal)românăshqipSlovenčinaslovenščinasrpski (latinica)SuomiSvenskaTiếng ViệtTürkçeΕλληνικάбеларускаябългарскикыргызчақазақ тілімакедонскимонголРусскийсрпскиУкраїнськаქართულიհայերենעבריתاردوالعربيةفارسیአማርኛनेपालीमराठीहिन्दीঅসমীয়াবাংলাਪੰਜਾਬੀગુજરાતીଓଡ଼ିଆதமிழ்తెలుగుಕನ್ನಡമലയാളംසිංහලไทยລາວမြန်မာខ្មែរ한국어日本語简体中文繁體中文繁體中文(香港) The same call, in code.
The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on youtube.com.
import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.youtube.com/watch?v=XqZsoesa55w");
// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();
console.log(data);
await spider.close(); import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.youtube.com/watch?v=XqZsoesa55w");
await page.content(10000);
const data = await page.evaluate(`(() => {
const ld = [...document.querySelectorAll('script[type="application/ld+json"]')]
.map(s => { try { return JSON.parse(s.textContent); } catch { return null; } })
.flat()
.find(o => o && o["@type"] === "VideoObject");
const title = ld?.name
|| document.querySelector('meta[name="title"]')?.content
|| document.title.replace(/ - YouTube$/, "");
const authorRaw = ld?.author;
const channel = (typeof authorRaw === "string" ? authorRaw : authorRaw?.name)
|| document.querySelector('[itemprop="author"] [itemprop="name"]')?.textContent?.trim()
|| document.querySelector('link[itemprop="name"]')?.getAttribute("content")
|| document.querySelector('a[href*="/channel/"], a[href*="/@"]')?.textContent?.trim();
const description = ld?.description
|| document.querySelector('meta[name="description"]')?.content;
const uploadDate = ld?.uploadDate
|| document.querySelector('[itemprop="uploadDate"]')?.getAttribute("content")
|| document.querySelector('meta[name="datePublished"]')?.content;
const views = ld?.interactionStatistic?.userInteractionCount
|| document.querySelector('[itemprop="interactionCount"]')?.getAttribute("content");
const url = document.querySelector('link[rel="canonical"]')?.href;
return JSON.stringify({ title, channel, description, uploadDate, views, url });
})()`);
console.log(JSON.parse(data));
await spider.close(); Ready for volume? Get an API key →
What teams build with youtube.com data.
Content Research
Analyze top-performing video titles, descriptions, and tags to optimize your own YouTube content strategy.
Influencer Analytics
Track channel growth, upload frequency, view-to-subscriber ratios, and engagement trends for creator partnerships.
Competitor Monitoring
Monitor competitor channels for new uploads, view velocity, and audience engagement patterns.
Trend Detection
Track trending videos, rising channels, and popular topics across categories and regions.
Fields you can pull.
Spider names these from the page. The capture above came back as markdown; the same
call with return_format: "json" returns them as keys.
Full SPA rendering
Renders YouTube's React interface in full, including lazy-loaded comments, recommendations, and infinite scroll.
Channel-level scraping
Process entire channels, playlists, and search results with automatic pagination and scroll.
Rich video metadata
Structured JSON with video stats, channel info, comments, transcripts, and engagement metrics.
What youtube.com costs to scrape.
The capture above cost $0.000069 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.
- Free balance on signup
- No card required to test
- Balance never expires
Run it keyless, no account
Scraping youtube.com.
Can I scrape YouTube comments?
Yes. Spider renders the full video page and scrolls the comment section to extract comment text, authors, likes, timestamps, and reply threads.
Does Spider extract YouTube video transcripts?
Spider can access auto-generated and manually uploaded captions/transcripts when available on public videos.
What YouTube data can I extract?
Video titles, descriptions, view counts, likes, upload dates, durations, channel names, subscriber counts, comments, and playlist data.
Can I scrape YouTube search results?
Yes. Spider renders YouTube search pages and extracts video results, channels, and playlists for any search query.
How does Spider handle YouTube infinite scroll?
Spider programmatically scrolls the page in a real Chrome browser, waiting for new content to load before extracting results.
More Media scrapers.
Twitch Scraper
Extract live stream data, channel info, viewer counts, and game categories from Twitch.
Spotify Scraper
Extract playlist data, track listings, artist info, and album metadata from Spotify.
IMDb Scraper
Extract movie ratings, cast info, box office data, and reviews from IMDb.
Start scraping youtube.com.
You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.