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. Powered by spider-browser .
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.
Extract data in minutes
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(); Start extracting youtube.com data in 3 steps
Get your API key
Sign up for free and get 1,000 credits instantly.
Configure your scrape
Set your target URL, output format, and stealth level.
Extract structured data
Get clean JSON back in seconds — ready for your pipeline.
Structured data endpoint
Extract structured JSON from youtube.com with a single POST request. AI-configured selectors, cached for fast repeat calls.
/fetch/youtube.com/ curl -X POST https://api.spider.cloud/fetch/youtube.com/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"return_format": "json"}' import requests
resp = requests.post(
"https://api.spider.cloud/fetch/youtube.com/",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={"return_format": "json"},
)
print(resp.json()) const resp = await fetch("https://api.spider.cloud/fetch/youtube.com/", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ return_format: "json" }),
});
const data = await resp.json();
console.log(data); What people 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.
Start extracting youtube.com data today
1,000 free credits — no credit card required
Data you can extract
Full SPA rendering
Complete rendering of YouTube's React interface — handles 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.
Why teams choose Spider for youtube.com
Free tier with 1,000 credits. No credit card required to get started.
Scale to millions of pages. Pay only for what you use.
Unlike competitors, unused credits roll over indefinitely.
Common questions about 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
Extract live stream data, channel info, viewer counts, and game categories from Twitch.
Extract playlist data, track listings, artist info, and album metadata from Spotify.
Extract movie ratings, cast info, box office data, and reviews from IMDb.
Join Zapier, Swiss Re, and 10,000+ developers
Start scraping youtube.com
Get your API key and start extracting data in minutes.