YouTube Scraper
Search public YouTube results or inspect a public channel videos tab and return normalized video metadata: title, URL, channel, duration, views, published time, thumbnail, and description snippets.
Overview
YouTube Scraper gives agents a focused way to collect public YouTube video metadata without using a private account. It renders search results or a channel videos tab through Better Fetch, parses YouTube's public page data, deduplicates video cards, and returns normalized fields that are easy to save, compare, or pass into an LLM workflow.
Last validated: Jul 3, 2026
Playground
Input
querystringYouTube search query. Use either query or channel_url.
channel_urlstring (uri)Public YouTube channel URL. The tool reads its videos tab.
max_resultsintegerdefault: 10Maximum video cards to return
Output
countintegerrequiredNumber of videos returned
sourcestringrequiredSearch query or channel URL used
videosobject[]requiredPublic YouTube video cards
source_urlstringrequiredFetched YouTube URL
Examples
search-openai
{
"query": "openai",
"max_results": 3
}Use cases
FAQ
Does YouTube Scraper download video files?
No. It returns public metadata from YouTube pages and does not download video media, captions, private analytics, or account-only data.
Can it scrape private or age-gated videos?
No. The tool is designed for public YouTube pages visible to the Better Fetch browser session without user-specific authentication.
Why are view counts returned as text and numbers?
YouTube often renders compact labels such as 1.2M views. The tool preserves the visible text and also returns a best-effort integer when it can parse one.
Use it anywhere
MCP (Claude, Cursor, any client)
# Add the Better Fetch MCP connector (or paste the URL into # Claude → Settings → Connectors → Add custom connector): claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \ --header "Authorization: Bearer bf_your_key_here" # Then ask for the tool by name: youtube_scraper
REST
curl -sS -X POST "https://betterfetch.co/api/tools/youtube_scraper/run" \
-H "Authorization: Bearer bf_your_key_here" \
-H "Content-Type: application/json" \
-d '{"input": {"query":"openai","max_results":3}}'Run locally
git clone https://github.com/better-fetch/youtube-scraper && cd youtube-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"query":"openai","max_results":3}'