YouTube scraper

ExtractHub extractors are versioned web scrapers: each one is a saved scraper for one kind of page that returns structured JSON through an API. For YouTube (youtube.com) there are 3 public extractors: YouTube - video page, YouTube - channel videos and YouTube - video transcript. Together they return fields such as videoId, url, title, description, channelName, channelId, channelUrl, subscriberCount and 16 more fields. Call one with your API key and a pinned extractor_id, from the REST API, the Batch API or an AI agent over MCP.

YouTube scrapers on ExtractHub

  • youtube.com · @extracthub1/youtube-video@2 (v2.0.0)

    Metadata of a YouTube video watch page (www.youtube.com/watch?v=...): video id, URL, title, channel name / id / URL, subscriber count and view count (from the embedded ytInitialData), plus full description, duration, like count, publish date, category, keywords, thumbnail, live and family-safe flags (from ytInitialPlayerResponse). When YouTube shows its bot check (playabilityStatus LOGIN_REQUIRED) the player fields are null; retry for the full set. Fetched through the proxy, no JavaScript.

    Fields: videoId , url , title , description , channelName , channelId , channelUrl , subscriberCount , viewCount , durationSeconds and 8 more

    YouTube - video page scraper: fields, versions and examples →
  • youtube.com · @extracthub1/youtube-channel-videos@1 (v1.0.0)

    Latest videos of a YouTube channel (www.youtube.com/@handle/videos): channel name, id, handle, description, subscriber and video counts, plus the videos with id, URL, title, view count, relative publish date and duration, newest first, with their position. Renders the page in a browser and scrolls it to load more than the first 30 videos (JavaScript tier).

    Fields: channelName , channelId , channelUrl , handle , description , avatar , subscriberCount , videoCount , videos

    YouTube - channel videos scraper: fields, versions and examples →
  • youtube.com · @extracthub1/youtube-transcript@2 (v2.0.0)

    Transcript (captions) of a YouTube video (www.youtube.com/watch?v=...): timestamped segments with start time, duration and text. Plays the video in a browser with captions on and captures the caption file the YouTube player loads (JavaScript tier).

    Fields: captionsStatus , transcript

    YouTube - video transcript scraper: fields, versions and examples →

How to call the YouTube scraper API

Every call needs your API key (X-API-Key) and a pinned extractor_id. This example uses @extracthub1/youtube-video@2 (YouTube - video page); open an extractor's page for its batch, Python and Node examples.

REST: realtime extract
curl -X POST "https://api.extracthub.io/api/extractor/extract" \
  -H "X-API-Key: $EXTRACTHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "extractor_id": "@extracthub1/youtube-video@2",
    "target": { "url": "https://youtube.com/..." }
  }'
MCP: ask your agent (server https://api.extracthub.io/mcp), which calls the extract tool
Use ExtractHub to extract https://youtube.com/... with @extracthub1/youtube-video@2
{
  "tool": "extract",
  "arguments": {
    "extractor_id": "@extracthub1/youtube-video@2",
    "url": "https://youtube.com/..."
  }
}

See the web scraping API reference and the web scraping MCP server setup.

Need another YouTube page type?

Build your own YouTube scraper with an AI agent and the extractor builder skill, or in ExtractHub Studio. It stays private until you release it.

YouTube scraper: frequently asked questions

Is there a ready-made YouTube scraper?

Yes. ExtractHub lists 3 public extractors for youtube.com. An extractor is a versioned web scraper for one kind of page: its owner released it as an immutable version with an output schema, and you call that version with your own API key.

What data can I scrape from YouTube?

YouTube - video page returns videoId, url, title, description, channelName, channelId and 12 more. YouTube - channel videos returns channelName, channelId, channelUrl, handle, description, avatar and 3 more. YouTube - video transcript returns captionsStatus and transcript. Every field is listed on the extractor's page with a sample response.

How do I call the YouTube scraper API?

Send GET or POST https://api.extracthub.io/api/extractor/extract with your API key in the X-API-Key header, extractor_id=@extracthub1/youtube-video@2 and the URL of a youtube.com page as the target. For many URLs use POST https://api.extracthub.io/api/extractor/batch. AI agents call the same extractor through the extract tool of the ExtractHub MCP server at https://api.extracthub.io/mcp.

Can I build my own YouTube scraper?

Yes. Build an extractor for any YouTube page type in ExtractHub Studio, or let an AI agent such as Claude Code build, test and release it with the open-source extractor builder skill. New extractors are private until you release them.