Skip to main content
NEW AI Studio is now available Try it now
Social Verified

YouTube Social Scraper

Extract video metadata, channel statistics, comments, and playlist data from YouTube pages. Powered by spider-browser .

Get Started Documentation
youtube.com target
99.9% success rate
~4ms latency
Quick Start

Extract data in minutes

youtube-social-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://www.youtube.com/@NASA/videos");
await page.content(10000);

const data = await page.evaluate(`(() => {
  const videos = [];
  document.querySelectorAll("a[href*='/watch?v=']").forEach(a => {
    const title = a.getAttribute("title") || a.textContent?.trim()?.slice(0, 80);
    const link = a.getAttribute("href");
    if (title && title.length > 3 && link && !videos.find(v => v.link === link)) {
      videos.push({ title, link });
    }
  });
  return JSON.stringify({ total: videos.length, videos: videos.slice(0, 10) });
})()`);

console.log(JSON.parse(data));
await spider.close();
✓ ready to run | spider-browser | TypeScript
Fetch API

Structured data endpoint

Extract structured JSON from youtube.com with a single POST request. AI-configured selectors, cached for fast repeat calls.

POST /fetch/youtube.com/
Video titleChannelViewsLikesCommentsUpload date
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);
Extraction

Data you can extract

Video titleChannelViewsLikesCommentsUpload dateDurationDescription
Stealth

Platform bypass

Residential proxies and fingerprint rotation for youtube.com access.

Rendering

SPA rendering

Full JavaScript execution for React-based feeds and dynamic content.

Data

Profile & post data

Extract public profiles, posts, engagement metrics, and connections.

Related

More Social scrapers

Start scraping youtube.com

Get your API key and start extracting data in minutes.