Skip to main content gottem  — one API for every scraper.
Media
Verified

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. Built on 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.

Get started Docs
target
youtube.com
capability
Full SPA rendering
data types
Videos & channels
Quick start

Extract data in minutes.

youtube-scraper.ts
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 to run · spider-browser · TypeScript
How it works

Start extracting youtube.com data in three steps.

01

Get an API key

Sign up free and a balance is credited to your account.

02

Configure the call

Set the target URL, output format, and rendering mode.

03

Get structured data

Clean JSON back in seconds, ready for your pipeline.

Fetch API

One endpoint for youtube.com.

Structured JSON from youtube.com with a single POST. AI-resolved selectors, cached on the first call.

POST /fetch/youtube.com/
Video titleChannel nameView countLike countUpload dateDescription
cURL
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"}'
Python
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())
Node.js
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);
Use cases

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.

Extraction

Fields you can pull.

Video titleChannel nameView countLike countUpload dateDescriptionDurationComments
Rendering

Full SPA rendering

Complete rendering of YouTube's React interface — handles lazy-loaded comments, recommendations, and infinite scroll.

Scale

Channel-level scraping

Process entire channels, playlists, and search results with automatic pagination and scroll.

Data

Rich video metadata

Structured JSON with video stats, channel info, comments, transcripts, and engagement metrics.

Why Spider

Why teams pick Spider for youtube.com.

Pricing
$0 to start

Free balance on sign-up. No credit card required to test.

Scale
Pay per page

About $0.08 per 1,000 pages on a datacenter-proxy workload. No monthly minimum.

Balance
Never expires

Top up once, use it whenever. Unused balance carries over forever.

Common questions

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.

Related

More Media scrapers.

Start

Start scraping youtube.com.

Grab an API key and call the endpoint above. The first request resolves the config; every request after hits cache.