What is YouTube Scraper API?
YouTube Scraper API collects public video data from YouTube and returns one record per video. Point it at a channel such as @NASA, a playlist, a single video or a search like “lunar rover explained”, say how many videos you want and in which order, and you get a table with the numbers and the channel profile in every row.
It covers what a viewer can see on YouTube: titles, descriptions, dates, lengths, views, likes and channel totals. Private analytics such as watch time stay in the channel owner's YouTube Studio.
You ask
Get the 10 newest videos from NASA's YouTube channel with publish date, length, views and likes.
It runs
From your AI assistant over MCP or from your code over REST
You get
- Video
- Engagement
- Channel
- Access flags
- Captions on request
- Benchmark competitor channelsSee what a rival posted this month, how long the videos run and how many views each one got.
- Vet creators before a dealCheck subscribers, recent views and posting rhythm before you sponsor or partner with a channel.
- Research a topic before you filmSearch a subject and see which titles and lengths pull views right now.
- Feed a video catalogFill a database, a newsletter or a learning hub with titles, thumbnails and links from chosen channels.
- Hand the table to your agentLet Claude or ChatGPT collect the videos, then rank, chart or summarize them in the same chat.
What data does the YouTube scraper API extract?
Every video comes back as one record with the channel's profile attached. These are the fields our test run returned, filled where YouTube shows them.
Video
- Video ID and URL
- Title
- Description text
- Links in the description
- Hashtags
- Publish date and time
- Length
- Thumbnail image
- Video type
- Location tag
Engagement
- View count
- Like count
- Comment count
- Comments turned off
Channel
- Channel name and handle
- Channel ID and URL
- Subscriber count
- Videos on the channel
- Total channel views
- Join date
- Verified badge
- Channel description and links
- Avatar and banner images
Access flags
- Members-only
- Paid promotion
- Age-restricted
- Collaborators
Captions on request
- Subtitles in SRT, VTT, XML or plain text
- Subtitle language
Numbers reflect the moment of the run. Shorts and live streams are collected separately from regular videos, each with its own limit. For the spoken words of a video use YouTube Transcript API, and for what viewers wrote use YouTube Comments API.
Sample output from NASA's channel
The table at the top of this page is a real run from 16 November 2026: the 10 newest regular videos on youtube.com/@NASA, with Shorts and live streams set to zero. The videos span 3 September to 9 November 2026, and every record also carried the channel profile shown here.
One result in full
Channel details in every record
- Channel
- NASA (@NASA), verified
- Subscribers
- 15,100,000
- Videos on the channel
- 6,202
- Total channel views
- 1,136,068,495
- Joined
- 3 Jun 2008
- Links in channel description
- nasa.gov, X, Facebook, Flickr, Instagram, commenting policy
What this sample tells you
The two longest videos, 9:17 and 20:15, have the most views: 1,065,337 and 700,377. The other eight all run under four minutes.
Views are exact and likes are rounded the way YouTube displays them, such as 1,300 or 12,000. Across the ten videos, likes add up to about 1.7% of views.
Comment count reads 0 on all ten, and a comments run on two of these videos found none. Check that comments are open before you plan comment research on a channel.
9of 10
9 of 10 descriptions carry links, 1 lists chapter timestamps and none uses hashtags.
How to scrape YouTube with your AI assistant
Connect AI/ML API
Click Try it now, pick your client and add the MCP server. You sign in with your AI/ML API account once.
Point it at a source
Paste a channel, playlist, video or search link, or type the words you would put into YouTube's search bar.
Say how many and in what order
Ask for the newest, the most popular or the oldest videos and give a number, such as the latest 20.
Work with the table
Ask your assistant to sort by views, chart uploads per week, export a CSV or pull transcripts for the top three.
Prompts to start with
Use the AI/ML API MCP YouTube Scraper API tool. Get the 10 newest videos from youtube.com/@NASA with publish date, length, views and likes in a table.
Use the AI/ML API MCP YouTube Scraper API tool. Search YouTube for “home battery installation” and return the 20 most viewed videos under 20 minutes, with channel names.
Use the AI/ML API MCP YouTube Scraper API tool. List the 15 most popular videos on youtube.com/@TED and add a column with average views per day since publishing.
Use the AI/ML API MCP YouTube Scraper API tool. Compare the last 10 uploads of [channel A] and [channel B]: average views, average length and how many run longer than 10 minutes.
Settings that shape a YouTube scrape
You describe the request in words and your assistant sets these for you. In code you pass them yourself.
| Setting | What it controls | Tip |
|---|---|---|
| Links | Video, channel, playlist or YouTube search page URLs | When you give links, search words are ignored |
| Search words | Terms as you would type them into YouTube | Run different phrasings as separate searches and merge |
| Number of videos | Regular videos per search or per channel | Start with 10 to check the source, then scale up |
| Shorts and streams | Separate limits for Shorts and live streams | Set both to 0 when you only want regular uploads |
| Channel order | Newest, most popular or oldest uploads | Popular shows a channel's hits; newest shows its rhythm |
| Search sort and filters | Relevance, rating, date or views; upload date; length under 4, 4 to 20 or over 20 minutes; HD, 4K, subtitles, Creative Commons, live | Filters cut noise before you pay for results |
| Published after | A date, or a number of days back | Use 30 days for a monthly report |
| Subtitles | Download captions with each video, in SRT, VTT, XML or plain text | English is the default; pick another language if needed |
Large channels hold thousands of videos. NASA's lists 6,202, so pull the newest or most popular slice that answers your question and widen it only if you need to.
What teams do with YouTube video data
Competitor channel tracking
Pull a rival's latest uploads every week and watch which topics, lengths and titles earn views.
Publish dateViewsLength
Creator and influencer vetting
Check subscriber counts, recent view levels and likes before you sign a sponsorship.
SubscribersViewsLikes
Topic research before filming
Search a subject and study the titles, lengths and view counts of what already ranks.
TitleViewsLength
Posting rhythm benchmarks
Count uploads per week and the mix of long videos and Shorts for channels in your niche.
Publish dateVideo typeLength
Video catalogs and newsletters
Fill a learning hub, a directory or a weekly email with titles, thumbnails and links from chosen channels.
Video IDThumbnailTitle
Research with an agent
Ask your assistant to collect videos, add transcripts for the best ones and write a short brief in one conversation.
Any field
YouTube scraper API for your code
In your code
REST · your AI/ML API key, JSON records back
The same tool runs over REST with your AI/ML API key. Your backend sends links or search words with the limits and filters above and gets JSON records with video and channel fields, ready for a dashboard, a spreadsheet or a database. A weekly job that pulls the newest uploads of ten channels is a few lines of code.
Use MCP when a person explores in a chat and REST when the work runs on a schedule. Both use one AI/ML API account and one balance, with no Google Cloud project or API quota to manage. Start with the Toolbox REST quickstart.
Other ways to collect YouTube video data
The same public numbers can come from several places. The right choice depends on whether you own the channel, how often you need the data and where you work with it.
| Copy from YouTube by hand | YouTube Data API | Your own scraper | ||
|---|---|---|---|---|
| Setup | Connect once with your AI/ML API account | None | Google Cloud project, API key, daily quota and your own code | Headless browser, proxies and parsing to maintain |
| Inside an AI chat | Yes. Over MCP | No. No | Only if you build it | Only if you build it |
| Best for | Channel and search research from chat or code | A few videos, once | Apps built on Google's official API and managing your own channel | Teams with engineers to keep it running |
Pricing
Pay as you goBilled per run from your AI/ML API balance
- No subscription
- No seat fee
- One balance for every tool
Runs are billed from your AI/ML API balance by the number of videos returned, with no subscription or seat fee. Our 10-video channel run cost less than two cents. Bigger pulls cost more, so start with a small number and check the current price in your dashboard.
FAQ
Is it legal to scrape YouTube?
Collecting public video data such as titles, views and channel totals is common for research and marketing. YouTube's terms apply to the service, and privacy laws apply if you store personal data. Ask a lawyer about your specific use.
How many videos can I get from one channel?
Set the number you need. Regular videos, Shorts and live streams each have their own limit, and you can sort a channel by newest, most popular or oldest. Start small: NASA's channel lists 6,202 videos.
Can I scrape YouTube search results?
Yes. Give the search words and, if you like, filters for upload date, length, sort order and features such as HD, subtitles or Creative Commons. Each result is a video record like the ones in the sample above.
Does it return watch time, revenue or traffic sources?
No. It reads what a public page shows: views, likes, lengths, dates and channel totals. Watch time, revenue and traffic sources are visible only to the channel owner in YouTube Studio.
How is this different from the YouTube Data API?
The Data API is Google's official product. It needs a Google Cloud project, an API key and a daily quota, and it is the right choice when you manage your own channel. YouTube Scraper API needs only your AI/ML API account, returns channel stats alongside the videos and works inside AI assistants over MCP.
Can it get transcripts and comments too?
It can attach subtitles to each video in SRT, VTT, XML or plain text. For line-by-line timestamps use YouTube Transcript API, and for what viewers wrote use YouTube Comments API.
Why are like counts round numbers?
YouTube displays likes in rounded form, such as 12K, and the result keeps that precision. View counts in our test were exact to the single view.
Can I use it from Claude, ChatGPT or Cursor?
Yes. Add the AI/ML API MCP server once and ask in plain English. Hermes, OpenClaw and other MCP clients work the same way.
How fresh is the data?
Each run reads YouTube at that moment, so views, likes and subscriber counts are current as of the run. Run it again to track change over time.
Scrape your first YouTube channel
Connect once, then ask for videos and stats in plain English.