YouTube Scraper
Search public YouTube, inspect channels, videos, Shorts, trending Shorts, live streams, playlists, community posts, sponsors, comments, and comment replies.
Workspace
Configure
Inputs stay here while results become exportable artifacts.
Start from an example
Results
Preview, inspect, copy, or export the complete output.
Your result will become an artifact
Run the tool to inspect structured rows, raw JSON, execution details, and downloadable JSON, CSV, and Markdown files.
Overview
YouTube Scraper gives agents a focused way to collect public YouTube data without using a private account. It renders public YouTube surfaces through Better Fetch, parses page and network data, deduplicates results, and returns normalized fields that are easy to save, compare, or pass into an LLM workflow.
Last validated: Aug 9, 2026
Input
mode"search" | "channel" | "channel_videos" | "channel_shorts" | "channel_lives" | "channel_playlists" | "channel_posts" | "hashtag_search" | "playlist" | "community_post" | "video_comments" | "comment_replies" | "video_sponsors" | "trending_shorts" | "video"Operation to run. If omitted, the tool infers it from query, channel_url, or video_url.
querystringYouTube search query. Use either query or channel_url.
hashtagstringHashtag with or without the leading #. Used by hashtag_search mode.
post_urlstringPublic youtube.com/post URL or community post id. Used by community_post mode.
video_urlstring (uri)Public YouTube watch, Shorts, youtu.be, or embed URL used by video, video_comments, comment_replies, and video_sponsors modes.
comment_idstringPublic parent YouTube comment id required by comment_replies mode. video_comments returns this as each comment's id.
channel_urlstring (uri)Public YouTube channel URL used by channel modes.
max_resultsintegerdefault: 10Maximum video cards to return
playlist_idstringPublic YouTube playlist id or playlist URL. Used by playlist mode.
content_type"all" | "shorts"default: "all"Return all visible hashtag content or only Shorts.
Output
countintegerrequiredNumber of primary records returned for the selected mode
postsobject[]Public channel community posts or one community post detail
sourcestringrequiredSearch query, channel URL, video URL, playlist id, hashtag, or post id used
videosobject[]requiredPublic YouTube video cards
channelobjectPublic channel metadata when channel mode is used
channel.urlstringchannel.titlestringchannel.avatarstringchannel.rss_urlstringchannel.channel_idstringchannel.handle_urlstringchannel.descriptionstringchannel.is_family_safebooleancommentsobject[]Logged-out public comments or replies returned by video_comments and comment_replies modes
playlistobjectPublic playlist metadata when playlist mode is used
playlist.urlstringplaylist.ownerstringplaylist.titlestringplaylist.updatedstringplaylist.owner_urlstringplaylist.thumbnailstringplaylist.views_textstringplaylist.descriptionstringplaylist.playlist_idstringplaylist.total_videosintegerplaylist.owner_channel_idstringplaylistsobject[]Public channel playlists when channel_playlists mode is used
source_urlstringrequiredFetched YouTube URL
total_countintegerTotal public comment count displayed by YouTube when video_comments mode is used
sponsor_videoobjectVideo and paid-promotion context for video_sponsors mode
sponsor_video.idstringsponsor_video.urlstringsponsor_video.titlestringsponsor_video.channelstringsponsor_video.channel_idstringsponsor_video.channel_urlstringsponsor_video.is_paid_promotionbooleansponsor_segmentsobject[]Public community sponsor/self-promotion timing segments from SponsorBlock
parent_comment_idstringParent comment id expanded by comment_replies mode
sponsor_detectionobjectDetection status, methods, and epistemic caveat
sponsor_detection.notestringsponsor_detection.statusstringsponsor_detection.methodsstringcontinuation_tokenstringPublic continuation token when YouTube exposes another page of channel posts
suspected_sponsorsobject[]Brands inferred from explicit public description evidence
comments_continuation_tokenstringEvidence token exposed by YouTube for another public comment or reply page; pagination is not yet executed by this tool
Examples
video-details
{
"mode": "video",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}search-openai
{
"mode": "search",
"query": "openai",
"max_results": 3
}channel-details
{
"mode": "channel",
"channel_url": "https://www.youtube.com/@OpenAI"
}channel-videos
{
"mode": "channel_videos",
"channel_url": "https://www.youtube.com/@OpenAI",
"max_results": 3
}channel-shorts
{
"mode": "channel_shorts",
"channel_url": "https://www.youtube.com/@OpenAI",
"max_results": 3
}channel-lives
{
"mode": "channel_lives",
"channel_url": "https://www.youtube.com/@OpenAI",
"max_results": 3
}channel-playlists
{
"mode": "channel_playlists",
"channel_url": "https://www.youtube.com/@OpenAI",
"max_results": 3
}hashtag-search
{
"mode": "hashtag_search",
"hashtag": "funny",
"max_results": 3,
"content_type": "all"
}playlist-details
{
"mode": "playlist",
"max_results": 3,
"playlist_id": "PLP32wGpgzmIlInfgKVFfCwVsxgGqZNIiS"
}video-sponsors
{
"mode": "video_sponsors",
"video_url": "https://www.youtube.com/watch?v=AVO0ifle-OU"
}video-comments
{
"mode": "video_comments",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"max_results": 10
}comment-replies
{
"mode": "comment_replies",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"comment_id": "Ugzge340dBgB75hWBm54AaABAg",
"max_results": 10
}trending-shorts
{
"mode": "trending_shorts",
"max_results": 10
}channel-posts
{
"mode": "channel_posts",
"channel_url": "https://www.youtube.com/@MrBeast",
"max_results": 3
}community-post
{
"mode": "community_post",
"post_url": "https://www.youtube.com/post/UgkxyRcQsbZeMdE9xN9WUohTnrQtxquVCbaE"
}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.
Does comment collection require a YouTube login?
No. video_comments and comment_replies use the public logged-out watch page and return only discussion data YouTube exposes to that browser session.
Use it anywhere
MCP (Claude, ChatGPT, Codex)
# After connecting https://betterfetch.co/api/mcp, ask your AI to:
1. Call search_tools for "YouTube Scraper"
2. Call run_tool with:
name: "youtube_scraper"
input: {"mode":"video","video_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}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": {"mode":"video","video_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}'Run locally
git clone https://github.com/better-fetch/tools/tree/main/tools/youtube-scraper && cd youtube-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"mode":"video","video_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'