YouTube scraper API
- Data from YouTube
YouTube scraper API for transcripts, comments, videos and channels
Get a public video’s transcript as timed segments, its comments, its metadata and chapters, plus search results and channel pages. Structured JSON from one key, with no Google Cloud project and no Data API quota.
1,000 free credits a month · Failed requests are free · Free during the beta
Endpoints and prices checked against the API on
YouTube transcripts feed AI and RAG pipelines, summaries, search indexes and content research. Comments, counts and channel pages feed creator analytics and brand monitoring. Google’s official YouTube Data API needs a Google Cloud project, counts every call against a daily quota, and only downloads caption tracks for videos you have permission to edit, so it cannot return the transcript of someone else’s video. This API reads public YouTube pages instead.
Ask for a transcript and you get every caption language the video has, each marked as creator-made or auto-generated, and one track as timed segments plus the joined text. Creator captions are chosen over auto-generated ones when both exist. YouTube rounds most numbers it shows (“1.7M views”), so counts are integers only where YouTube printed them exactly, and the text is always kept. Search answers are split into videos, Shorts, channels and playlists, with YouTube’s own filters for type, upload date, length and features.
What you get
segments[]— the transcript as timed lines: start_s, duration_s and texttext— the whole transcript joined into one string, ready for search or an LLMavailable_languages[]— every caption track the video has: language, name, and manual or auto-generated (asr)views, likes, length_seconds— exact view and like counts and the video length (video endpoint)chapters[]— chapter titles and start times, and whether the creator or YouTube made themcomments[]— text, author, likes, reply count, and pinned and creator-heart flagsvideos[], shorts[], channels[], playlists[]— search results, split by kindsubscribers_text, video_count_text— a channel’s counts as YouTube prints them, with its latest videos
One call, structured JSON
POST /v1/youtube/transcript — 2 credits per successful call.
curl -X POST "https://api.scrapercompany.com/v1/youtube/transcript" \
-H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video_id": "8jPQjjsBbIc"
}'{
"search_parameters": {
"engine": "youtube_transcripts",
"video_id": "8jPQjjsBbIc",
"hl": "en",
"gl": "US"
},
"video": {
"video_id": "8jPQjjsBbIc",
"title": "How to stay calm when you know you'll be stressed | Daniel Levitin | TED",
"channel_id": "UCAuUUnT6oDeKwE6v1NGQxug",
"author": "TED",
"length_seconds": 740
},
"language": {
"code": "en",
"name": "English",
"kind": "manual",
"translatable": true,
"is_default": true
},
"available_languages": [
{
"code": "ar",
"name": "Arabic",
"kind": "manual",
"translatable": true,
"is_default": false
},
{
"code": "en",
"name": "English",
"kind": "manual",
"translatable": true,
"is_default": true
}
],
"segments": [
{
"start_s": 13.24,
"duration_s": 2.56,
"text": "A few years ago, I broke into my own house."
},
{
"start_s": 16.88,
"duration_s": 1.216,
"text": "I had just driven home,"
}
],
"text": "A few years ago, I broke into my own house. I had just driven home, it was around midnight in the dead of Montreal winter,",
"meta": {
"source": "youtube",
"client": "IOS",
"wire_bytes": 141794,
"elapsed_s": 0.44
}
}Endpoints and price per call
Credits per successful call, and what one call costs on the Starter, Growth, Scale plans. Failed requests cost nothing. See all plans.
| Endpoint | What it returns | Credits | Starter · Growth · Scale |
|---|---|---|---|
| Transcript POST /v1/youtube/transcript | One caption track as timed segments and full text, with every language the video has | 2 credits | $0.0020 · $0.0012 · $0.0008 |
| Search POST /v1/youtube/search | One page of results split into videos, Shorts, channels and playlists, with YouTube’s filters | 2 credits | $0.0020 · $0.0012 · $0.0008 |
| Video details POST /v1/youtube/video | Title, full description, exact views and likes, dates, keywords and chapters | 2 credits | $0.0020 · $0.0012 · $0.0008 |
| Comments POST /v1/youtube/comments | One page of about 20 comment threads, top or newest, and their replies | 2 credits | $0.0020 · $0.0012 · $0.0008 |
| Channel POST /v1/youtube/channel | A channel’s details and its latest videos, about 30 per page | 2 credits | $0.0020 · $0.0012 · $0.0008 |
Does YouTube have an official API?
Yes. The YouTube Data API v3 is Google’s official API. It needs a Google Cloud project, counts every request against a daily quota, and its caption download method only works for videos you have permission to edit, so it does not return transcripts of other channels’ videos. This API is independent of YouTube and Google: it reads public YouTube pages and uses no Data API quota.
Can this YouTube transcript API get any video’s transcript?
Any public video that has captions, whether the creator uploaded them or YouTube generated them automatically. Pass the video id or URL, and optionally a lang code; available_languages lists every track and whether it is manual or auto-generated (asr). A video without captions, or without a track in the language you ask for, returns a 404 and is not charged. Age-restricted videos have no transcript through this API.
Can the API translate a transcript?
No. It returns the caption tracks a video actually has, in their own languages, and does not request YouTube’s machine translations. Pick a track with lang from the codes in available_languages.
Why are some counts null?
YouTube rounds most counts on search results, channel grids and comments (“1.7M views”, “14K”). The API returns an integer only when YouTube printed the exact number, and always keeps the text in fields such as views_text and likes_text. The video endpoint returns exact views and likes.
How do I page through search results, comments and channel videos?
Each response includes next_page_token; send it back to get the next page. A comment’s replies_page_token returns its replies through the same comments endpoint. An empty page is not charged.
Do failed requests cost credits?
No. A failed or blocked call (any 4xx or 5xx response) costs 0 credits, and so does a search page that comes back empty. You pay only for successful results.
How do I get an API key?
Create an account on the sign-up page. Public sign-up is invite-only during the beta, so join the waitlist there and we will email you when your account is ready. The Free plan includes 1,000 credits a month, and the API is free while it is in beta. You create and rotate keys yourself in the dashboard.
More APIs on the same key
All APIsBooking.com API
Look a hotel up by name, then read what Booking.com shows a guest: a nightly price calendar, each room type with its rate plans, and the reviews with the property’s replies. Structured JSON, priced per call.
Expedia API
Look a hotel up by name, then read what Expedia shows a guest for one stay: every room type and rate plan with its total, nightly price and cancellation terms, and the guest reviews with the property’s replies.
Hotels.com API
Find a hotel’s Hotels.com id by name, then read what a guest on the Hotels.com site for their country sees: the headline price for a stay, every room type and rate plan, and the guest reviews.
Agoda API
Look a hotel up by name, then read every room type and rate plan Agoda shows a guest for one stay, with the stay total, discounts, meal plan and cancellation terms, in any of 23 currencies.
Start with 1,000 free credits a month
Join the waitlist and we will email you when your account is ready: your own API keys, 1,000 free credits a month, and the API is free during the beta.