YouTube Scraper API
for transcripts, video, and channel data
Pull YouTube transcripts, video metadata, channel stats, and search results as clean JSON. One request returns a timestamped transcript for any video, ready to feed a model, with proxies handled for you.
of requests succeed
median response
95% finish faster
per 1k scrapes at volume
YouTube keeps moving its data client-side. Your parser shouldn't care.
- Transcripts behind rotating player tokens
- Metadata rendered by client-side JS
- View and like counts in mixed shapes
- Proxy rotation and retries per request
- Re-parse the player after each change
One GET Request. That's the whole integration.
Start with just a query. Add more parameters when your use case needs them.
curl -G 'https://api.hasdata.com/scrape/youtube/transcript' \
--data-urlencode 'v=dQw4w9WgXcQ' \
--data-urlencode 'languageCode=en' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'v * Video IDlanguageCode Language Codetype Transcript Typecurl -G 'https://api.hasdata.com/scrape/youtube/video' \
--data-urlencode 'v=dQw4w9WgXcQ' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'v * Video IDgl Countryhl LanguagedeviceType Devicecurl -G 'https://api.hasdata.com/scrape/youtube/channel' \
--data-urlencode 'channelId=@PewDiePie' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'channelId * Channel IDtab Tabgl Countryhl LanguagedeviceType DevicepaginationToken Pagination Tokencurl -G 'https://api.hasdata.com/scrape/youtube/search' \
--data-urlencode 'q=BMW' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'q * Search Querygl Countryhl LanguagedeviceType Devicesp Search ParameterssortBy Sort Bydate Upload DatevideoType Typelength Durationfilters[] FeaturespaginationToken Pagination TokenTimestamped transcript, one predictable schema
Each caption line comes back with start and end times, plus the list of languages you can request. Map the fields once and forget about it.
[
{
"startMs": 320,
"endMs": 18800,
"snippet": "[Music]",
"startTimeText": "0:00"
},
{
"startMs": 18800,
"endMs": 21880,
"snippet": "We're no strangers to love",
"startTimeText": "0:18"
}
]startMs / endMs numberStart and end of the line in milliseconds
snippet stringThe caption text for this segment
startTimeText stringHuman-readable start time, e.g. 0:18
// Which caption languages exist for the video. Pass a languageCode to pick one.
[
{ "languageName": "English", "languageCode": "en" },
{ "languageName": "Spanish", "languageCode": "es" }
]languageName stringDisplay name of the caption track
languageCode stringCode to request that track, e.g. en
// The video endpoint: metadata, engagement, music, and related videos for one video.
{
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"channel": { "name": "Rick Astley", "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw", "extractedSubscribers": 4520000 },
"extractedViews": 1797400025,
"extractedLikes": 19281206,
"publishedDate": "Oct 24, 2009",
"lengthSeconds": 214,
"category": "Music",
"keywords": ["rick astley", "never gonna give you up"],
"music": [ { "song": "Never Gonna Give You Up", "artist": "Rick Astley", "album": "Whenever You Need Somebody" } ]
}videoId / title stringVideo ID and title
channel objectUploader name, ID, and subscriber count
extractedViews / extractedLikes numberView and like counts as numbers
lengthSeconds / category number / stringDuration in seconds and category
keywords string[]Tags on the video
music object[]Songs YouTube detected, with artist and album
// The channel endpoint: profile, featured video, and content shelves.
{
"channelInfo": {
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"name": "Rick Astley",
"handle": "@RickAstleyYT",
"description": "Official YouTube channel..."
},
"featuredVideo": { "videoId": "wvr7-pDJUOA", "title": "Keep Singing (Live at The O2)", "views": 23541 },
"sections": [
{ "title": "Popular uploads", "items": [ { "videoId": "dQw4w9WgXcQ", "title": "Never Gonna Give You Up", "views": 1797400025 } ] }
]
}channelInfo objectID, name, handle, and description
featuredVideo objectThe channel's pinned video
sections[] object[]Shelves of videos, each with a title and items
// The search endpoint: video, playlist, and sponsored results for a query.
{
"videoResults": [
{
"positionOnPage": 1,
"videoId": "aClnnoQK9G0",
"title": "Web Scraping Tutorial | Data Scraping from Websites",
"views": 893465,
"length": "16:27",
"publishedDate": "4 years ago"
}
],
"playlistResults": [ ... ],
"sponsoredResults": [ ... ]
}videoResults[] object[]Matching videos in result order
videoResults[].videoId / title stringVideo ID and title
videoResults[].views / length number / stringView count and duration
playlistResults object[]Matching playlists for the query
sponsoredResults object[]Promoted results for the query
An all-in-one scraping service
Every feature you need to collect data from thousands to millions of requests.
Discover similar
scrapers and APIs
to expand your projects.
TikTok Scraper API
Videos Data • $0.75 / 1k Request
Google Short Videos API
Short Video Results • $0.75 / 1k Request
Fits right into your stack.
Works with the tools you already use.
View Documentation ->Teams that deleted their scraper
Now it's the part of the pipeline they don't think about
HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.
We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.
Great web scraping API which is incredibly easy to use. It requires minimal effort to get up and running, and the documentation is very clear and helpful.
I needed to scrape some information they didn't already support, and they wrote the code for me right away, which was super nice of them.
We were particularly impressed with how easily we could integrate HasData into our existing workflow.
Plans that get cheaper at scale
Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.
Free
Startup
Business
RecommendedGrowth
Monthly scrape volume
Custom price based on required volume
Past 100M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload. Past 100M credits a month, or need terms the self-serve plans do not cover? We shape the contract, concurrency, and support around your workload.
HasData accesses publicly available data only. YouTube's terms may restrict automated access; you are responsible for compliance. Where data includes personal information, ensure a lawful basis under GDPR/CCPA.
Questions, answered
Four things, each its own endpoint: a video's timestamped transcript, full video metadata (title, views, likes, comment count), channel stats (subscribers, video count), and search results for a query. Same JSON style across all of them.
Every transcript response lists availableTranscripts for the video. Pass a languageCode to pick one. Leave it off and you get the default track. Auto-generated captions are included when that's all the video has.
Yes. Each line is a flat object with the text and its start and end times, so you can drop it straight into a summarizer or join the snippets into one string.
Per successful request. One request is one scrape, a transcript, a video, a channel, or a search page. A failed request costs nothing.
Yes, a one-time trial of 100 scrapes with every field included. No credit card required. When you're done testing, pick a plan that fits your volume.
One scrape costs 10 credits. The unit price drops with volume, from about $2.45 down to $0.75 per 1,000 scrapes. Need more than the top plan covers? We'll set a custom rate.
No. Requests run on HasData's infrastructure, so there's nothing to provision or maintain. You're responsible for using the results in line with each target site's terms and applicable law.
Your first scrape
is minutes away
100 scrapes free · no credit card