How to Scrape YouTube Data in 2026: Channels, Videos, Transcripts
Get public YouTube channels, videos, Shorts, comments, playlists, community posts and transcripts as clean JSON with one REST API: no quota units, no Cloud project.
The simplest way to get public YouTube data in 2026 is a hosted scraping API: one HTTPS call returns a channel, its videos or Shorts, the comments on a video, a playlist or a video transcript as JSON. With crawlfeed, every YouTube call costs 1 credit, needs only an API key rather than a Google Cloud project, and returns the same shape as TikTok, Instagram and X data.
YouTube is the largest video library on the web and, for many topics, the best primary source there is: product reviews, lectures, interviews, earnings calls. For research and AI work, the transcripts are often worth more than the videos. This guide shows how to pull public YouTube data (channels, videos, Shorts, comments, playlists, community posts and transcripts) with plain HTTPS calls, with working code in cURL, JavaScript and Python.
Why is YouTube data harder to get than it looks?
YouTube does have an official API, which makes it easier than most platforms. The friction shows up once you build on it:
- Quota, not just keys. The YouTube Data API needs a Google Cloud project and meters usage in daily quota units. Some calls, search in particular, cost far more units than others, so a search-heavy product hits the ceiling quickly.
- Transcripts are not really on offer. The captions endpoints are built for videos you manage. Getting the spoken text of someone else’s video is not a simple API call.
- Some surfaces are missing or awkward. Shorts, community posts and live streams are either absent from the official API or mixed in with everything else.
Scraping YouTube yourself is possible, but the page data is a large, deeply nested blob that changes regularly, and at volume you will run into consent pages and bot checks.
| Approach | Channels and videos | Transcripts of any public video | Shorts and community posts |
|---|---|---|---|
| YouTube Data API | Yes, within daily quota | No | Partly |
| Your own scraper | Yes | Yes, with extra work | Yes, with extra work |
| Scraping API (crawlfeed) | Yes | Yes | Yes |
What YouTube data can you get?
Every call below is live on crawlfeed today. The table is generated from the API’s own catalogue, so the endpoints and prices are exactly what you will be charged:
| Operation | Endpoint | Needs | Credits |
|---|---|---|---|
| Profile | /v1/youtube/profile | handle | 1 |
| Posts | /v1/youtube/posts | handle | 1 |
| Post | /v1/youtube/post | id | 1 |
| Comments | /v1/youtube/comments | post_id | 1 |
| Search | /v1/youtube/search | q | 1 |
| Linked profiles | /v1/youtube/linked-profiles | handle | 10 |
| Reels and shorts | /v1/youtube/reels | handle | 1 |
| Live videos | /v1/youtube/live/videos | handle | 1 |
| Hashtag | /v1/youtube/hashtag | tag | 1 |
| Trending | /v1/youtube/trending | — | 1 |
| Transcript | /v1/youtube/transcript | id | 1 |
| Summary | /v1/youtube/summary | id | 4 |
| Search posts | /v1/youtube/search/posts | q | 1 |
| Search suggestions | /v1/youtube/search/suggestions | q | 1 |
| Collections | /v1/youtube/collections | handle | 1 |
| Collection | /v1/youtube/collection | id | 1 |
| Collection posts | /v1/youtube/collection/posts | id | 1 |
| Community posts | /v1/youtube/community/posts | id | 1 |
| Community post | /v1/youtube/community/post | id | 1 |
Everything comes back in crawlfeed’s unified types (Profile, Post, Comment and friends), which are the same across all 26 platforms. A channel is a Profile, and a video, a Short or a community post is a Post.
Get a YouTube channel
You need an API key (new accounts get 100 free credits) and the channel handle, without the @:
curl -G https://api.crawlfeed.dev/v1/youtube/profile \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "handle=MrBeast"The response is a Profile wrapped in the standard envelope. followers is the subscriber count and posts_count the number of videos. Trimmed, and with illustrative numbers, it looks like this:
{
"data": {
"platform": "youtube",
"handle": "MrBeast",
"display_name": "MrBeast",
"verified": true,
"followers": 1234567,
"posts_count": 1234,
"bio": "…",
"country": "…",
"links": ["…"]
},
"meta": { "credits_used": 1, "credits_remaining": 99, "cache": "MISS", "data_age_s": 0 }
}A channel costs 1 credit. A field YouTube does not expose, such as following, comes back as null rather than disappearing.
List a channel’s videos
/v1/youtube/posts returns a channel’s uploads, newest first, one page per call:
curl -G https://api.crawlfeed.dev/v1/youtube/posts \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "handle=MrBeast"Each item is a Post with the title and description in text, created_at, media (the video url, thumbnail_url and duration_s), engagement (views, likes, comments), hashtags and mentions.
To get the next page, pass meta.next_cursor back as cursor. When next_cursor is missing, you have reached the end of the channel. Every page is billed, so stop when you have enough:
import os, requests
videos, cursor = [], None
while True:
params = {"handle": "MrBeast", **({"cursor": cursor} if cursor else {})}
res = requests.get(
"https://api.crawlfeed.dev/v1/youtube/posts",
params=params,
headers={"Authorization": f"Bearer {os.environ['CRAWLFEED_KEY']}"},
)
body = res.json()
videos.extend(body["data"])
cursor = body["meta"].get("next_cursor")
if not cursor or len(videos) >= 150:
breakFor one video you already know, pass its id (the v= value in the URL) to /v1/youtube/post.
Get comments on a video
Pass the video id as post_id:
curl -G https://api.crawlfeed.dev/v1/youtube/comments \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "post_id=<post_id>"Each Comment has the text, the author, likes, created_at and reply_to_id. Comments page with cursor, like videos. For audience research, comment threads are usually where the useful signal is.
Get a YouTube transcript
This is the call most people come for. Pass a video id or URL:
curl -G https://api.crawlfeed.dev/v1/youtube/transcript \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "id=<id>"A transcript costs 1 credit and includes timings when they are available, so you can link a quote back to the exact moment in the video. It is the natural input for summaries, search indexes and retrieval pipelines that feed an LLM.
Shorts, live streams, playlists and community posts
A YouTube channel is more than its uploads list, and each surface has its own call:
- Shorts:
/v1/youtube/reels?handle=…lists a channel’s Shorts on their own. - Live streams:
/v1/youtube/live/videos?handle=…lists a channel’s live and past live streams. - Playlists:
/v1/youtube/collections?handle=…lists a channel’s playlists,/v1/youtube/collection?id=…describes one, and/v1/youtube/collection/posts?id=…returns the videos in it. - Community posts:
/v1/youtube/community/posts?id=…takes a channel handle and returns its community tab;/v1/youtube/community/post?id=…fetches one post by URL.
curl -G https://api.crawlfeed.dev/v1/youtube/collection/posts \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "id=<id>"Search, hashtags and trending
To discover videos rather than read a known channel:
- Search:
/v1/youtube/search?q=…runs YouTube’s own search, and/v1/youtube/search/posts?q=…returns matching videos as posts. - Hashtags:
/v1/youtube/hashtag?tag=…returns videos using a hashtag, without the#. - Trending:
/v1/youtube/trendingreturns what is trending now, with an optionalcountry.
curl -G https://api.crawlfeed.dev/v1/youtube/search/posts \
-H "Authorization: Bearer $CRAWLFEED_KEY" \
--data-urlencode "q=coffee"None of these touch a Google Cloud quota: a search costs the same 1 credit as any other call.
Handle errors and rate limits
Errors are RFC 9457 problem details with a stable code, so branch on the code, not the message:
| Code | What it means | What to do |
|---|---|---|
not_found | The channel, video or playlist does not exist, or is private | Check the id; do not retry |
invalid_request | A required parameter is missing or malformed | Fix the request |
rate_limited | You sent requests faster than your limit | Wait retry_after seconds |
insufficient_credits | Your balance is lower than the call’s price | Top up; nothing was charged |
platform_unavailable | YouTube or the upstream failed | Retry later; the call was refunded |
A call that fails is refunded automatically, so retrying never charges you twice.
Add Arabic sentiment and dialect
If your audience comments in Arabic, add enrich=arabic to a channel, video or comments call. Each item gains an enrichment field with the dialect, sentiment, entities and topics, for 3 extra credits per call.
Use YouTube data from Claude or Cursor
If you would rather ask than code, connect the crawlfeed MCP server and your assistant gets the same calls as tools:
claude mcp add --transport http crawlfeed https://mcp.crawlfeed.dev/mcp \
--header "Authorization: Bearer $CRAWLFEED_KEY"Then ask something like “summarise the transcript of MrBeast’s latest video and list the main themes in its comments”. The setup for every client is in our guide to MCP.
Wrapping up
The YouTube Data API is fine within its quota, but a scraping API gives you transcripts, Shorts, playlists and community posts without a Cloud project or quota planning. With crawlfeed, every YouTube call costs one credit, and the same code works for TikTok, Instagram, X and LinkedIn. The full reference is at /docs/platforms/youtube.
Questions
Is it legal to scrape YouTube data?
Collecting publicly available data is generally lawful in many jurisdictions, but it depends on where you are, what you collect and what you do with it. crawlfeed only returns public data and never logs in to accounts. If you store personal data, you are responsible for having a lawful basis under laws such as the GDPR, and for honouring deletion requests.
Should I use the official YouTube Data API instead?
The YouTube Data API is a good fit if its daily quota covers your volume and you are happy to run a Google Cloud project. Teams usually reach for a scraping API when they need transcripts of other people’s videos, when search-heavy workloads use up the quota, or when they want YouTube in the same format as other platforms.
How much does it cost to get YouTube data with crawlfeed?
Every YouTube call costs 1 credit: a channel, a page of videos or Shorts, a page of comments, a playlist, a search or a transcript. New accounts get free credits, and failed calls are refunded.
How fresh is the data?
Responses are cached briefly to keep repeat calls fast and cheap. meta.cache and meta.data_age_s tell you how old a response is; add fresh=true to fetch it live for double the price.
Can I get the transcript of any YouTube video?
You can request the transcript of any public video with /v1/youtube/transcript. It works when the video has captions, either uploaded by the creator or generated automatically; a video with no captions at all has no transcript to return, and that failed call is refunded.
Try it on your own data
Every example above runs as written. New accounts get 100 free credits, no card needed.
Get an API key