HasData
Scraper API

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 when captions are available, ready to feed a model, with proxies handled for you.

SUCCESS
99.8%

of requests succeed

P50
3.7s

median response

P95
4.2s

95% finish faster

PRICE
$0.83

per 1k scrapes at volume

Stop maintaining scrapers

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 integration commit replaces a backlog you’ll never finish.
scraper | git log
✗ hotfix: player token rotated, transcript empty
✗ fix: view count came back as '1.2M', not a number
✗ fix: caption track fell back to wrong language
✗ chore: rotate proxies for youtube runs again
✗ fix: JS render timed out on long videos
✗ hotfix: rate-limit loop on channel pages
✗ fix: search results shape changed
✗ chore: refresh residential IPs by region
✗ fix: timestamps drifted on auto-captions
✗ fix: retry storm on rate limits
✗ hotfix: player token rotated, transcript empty
✗ fix: view count came back as '1.2M', not a number
✗ fix: caption track fell back to wrong language
✗ chore: rotate proxies for youtube runs again
✗ fix: JS render timed out on long videos
✗ hotfix: rate-limit loop on channel pages
✗ fix: search results shape changed
✗ chore: refresh residential IPs by region
✗ fix: timestamps drifted on auto-captions
✗ fix: retry storm on rate limits
✗ hotfix: player token rotated, transcript empty
✗ fix: view count came back as '1.2M', not a number
✗ fix: caption track fell back to wrong language
✗ chore: rotate proxies for youtube runs again
✗ fix: JS render timed out on long videos
✗ hotfix: rate-limit loop on channel pages
✗ fix: search results shape changed
✗ chore: refresh residential IPs by region
✗ fix: timestamps drifted on auto-captions
✗ fix: retry storm on rate limits
✗ hotfix: player token rotated, transcript empty
✗ fix: view count came back as '1.2M', not a number
✗ fix: caption track fell back to wrong language
✗ chore: rotate proxies for youtube runs again
✗ fix: JS render timed out on long videos
✗ hotfix: rate-limit loop on channel pages
✗ fix: search results shape changed
✗ chore: refresh residential IPs by region
✗ fix: timestamps drifted on auto-captions
✗ fix: retry storm on rate limits
✓ feat: integrate HasData API
Code Examples

One GET Request. That's the whole integration.

Start with just a query. Add more parameters when your use case needs them.

request example
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 ID
11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`).
languageCode Language Code
BCP-47 / YouTube language code of the transcript track to return (e.g. `en`, `de`, `en-US`, `pt-BR`). Must match a track that the video actually has. When omitted, the video's default language track is returned.
type Transcript Type
Set to `asr` to fetch the YouTube auto-generated (speech-recognition) track. Omit to fetch the human-authored track for `languageCode` when one exists.
TRY ALL 3 PARAMETERS FREE
AI Integration

Add YouTube Scraper API with your AI agent

Get a reusable YouTube integration that fits your project, with secure credentials, API references, and tests.

youtube-integration.md
# Integrate HasData YouTube API

## Task

Implement only the YouTube workflow the user requests: transcripts, video metadata, channel content, or keyword search.
If no workflow is specified, ask which one before implementing. Add other endpoints only when the requested workflow needs them.
Inspect project instructions, the server-side runtime, existing HTTP client, and tests first.
Follow project conventions and preserve unrelated code. No new SDK is required.
Use the REST API; do not substitute an MCP connection or a custom scraper.

## References

Read the documentation for each endpoint needed by the requested workflow:

- Transcript: https://docs.hasdata.com/apis/youtube/transcript.md
- Video: https://docs.hasdata.com/apis/youtube/video.md
- Channel: https://docs.hasdata.com/apis/youtube/channel.md
- Search: https://docs.hasdata.com/apis/youtube/search.md
- Error handling: https://docs.hasdata.com/api-codes.md
- Documentation index: https://docs.hasdata.com/llms.txt
- Full documentation (fallback): https://docs.hasdata.com/llms-full.txt

Start with the relevant endpoint references. Use `llms.txt` to find additional pages.
Use `llms-full.txt` only when needed; extract relevant sections instead of loading everything into context.
If a `.md` reference is unavailable, try its HTML URL without `.md`.
If it is still unavailable, ask for the missing documentation rather than guessing.

## Optional agent skill

If the official `hasdata` skill is already available, use its relevant guidance.
Otherwise, if this agent supports skills, ask before installing it in this project:

```sh
npx skills add hasdata/agent-skills --skill hasdata
```

Run from the project directory and select the coding agent in use.
The `hasdata-cli` skill is not required. If installation is declined or unsupported, continue with the docs.
Flag conflicts between skill guidance and current API docs rather than guessing.

## Endpoint selection

All four endpoints use GET under `https://api.hasdata.com/scrape/youtube/`.

- Transcript: `transcript`, required `v` (11-character video ID), optional `languageCode` and `type=asr`. Choose an available caption track; preserve the exact returned language code. Omission of `languageCode` selects the default track. Use `type=asr` for an auto-generated track; omit it for a human-authored track when one exists. Captions and requested languages are not guaranteed.
- Video: `video`, required `v`, optional `gl`, `hl`, `deviceType`.
- Channel: `channel`, required `channelId` (canonical ID or @handle), optional `tab`, `gl`, `hl`, `deviceType`, `paginationToken`. The default `featured` tab returns Home-page content; other tabs have different shapes. Use only the requested tab.
- Search: `search`, required `q`, optional `gl`, `hl`, `deviceType`, `sortBy`, `date`, `videoType`, `length`, `filters[]`, `paginationToken`. Read current allowed values. `videoType` supports video, shorts, channel, playlist, and movie. A supplied raw `sp` token overrides structured sort and filter parameters.

## Implementation

- Encode query parameters correctly and preserve the returned JSON.
- For transcripts, retain `transcript[].snippet`, `startMs`, `endMs`, and `startTimeText`. Offsets are milliseconds; convert explicitly when generating video links. Preserve `availableTranscripts`, including optional track `type`.
- For video metadata, `description` is an object with `content` and `links`. Use numeric `extractedViews` and `extractedLikes` for calculations while retaining display strings.
- For channel Home content, preserve `channelInfo`, `featuredVideo`, and `sections` when present. Numeric subscriber and video counts can originate from rounded display labels.
- For search, preserve distinct result blocks. `shortsResults[].shorts[]` contains Shorts within shelves; result types are optional. `videoResults[].views` is numeric, and `positionOnPage` belongs to the returned page. Search views are video views, not keyword search volume.
- Follow returned pagination only within a user-requested page limit. Do not silently crawl entire channels or result sets.
- Treat missing optional fields as unknown. Do not infer comment text, audience demographics, unique viewers, revenue, or transcript translations.
- Handle timeouts, documented errors, unavailable videos, missing caption tracks, empty results, and missing optional blocks.
- Keep requests server-side. If no suitable runtime exists, discuss options before changing architecture.

## Credentials

- Implement the integration and mocked tests without requiring a live API key.
- Read `HASDATA_API_KEY` from the existing environment or secret store and send it as `x-api-key`.
- If the key is missing before live verification, ask the user to configure it from https://app.hasdata.com/api-keys.
- Never ask the user to paste the key into chat. Check only that it is configured, without printing its value.
- Never put the key in browser code, logs, or version control. Add only a placeholder to example configuration.
- If using a local `.env` file, make sure it is gitignored.
- Send the key only to `https://api.hasdata.com`. Never forward it to documentation, result URLs, or redirects to another origin.

## Verification

- Add mocked tests for the selected workflow: success, unavailable or empty data, missing optional blocks, and errors. Check endpoint-specific shapes, timestamp units, and pagination limits where relevant.
- Include a usage example and run local checks.
- Only with user authorization and a configured key, make one live verification request for the selected workflow and agreed input. Successful requests consume credits.
- Validate HTTP status, documented API status, and response structure. Empty results can be valid.
- Do not automatically repeat paid requests to obtain nonempty results or test every endpoint.
- Report changed files, setup commands, and test results. State separately whether live verification passed, failed, or was skipped.
- Ask before deploying.

Use Cases

Build with YouTube Scraper API

Build transcript search, video analytics, channel catalogs, and content research tools with structured YouTube data.

Match videos to available caption languages

Build multilingual video libraries around available subtitle tracks, so viewers can find content in their preferred language.

  • dQw4w9WgXcQ
  • Available caption tracks
Caption languages Saved language availability
Caption languages — Saved language availability
LanguageCode
Englishen
German (Germany)de-DE
Portuguese (Brazil)pt-BR
API data
availableTranscripts[].languageNameavailableTranscripts[].languageCode
Your app
Match returned language codes to viewer preferences and retain track types when multiple tracks share a language.

Track public video performance

Build YouTube analytics dashboards from video views, likes, and duration to compare content performance across saved observations.

  • dQw4w9WgXcQ
  • September 17, 2026
Public video metrics Saved video metrics
Public video metrics — Saved video metrics
MetricReturned value
Views1,816,277,496
Likes19,394,194
Duration (seconds)214
API data
videoIdextractedViewsextractedLikeslengthSeconds
Your app
Store dated video metrics and calculate changes between observations in your dashboard.
Explore response fields

Captured counts can change. Growth is calculated from saved observations; views do not identify unique viewers.

Build a channel video library

Organize channel videos by content shelf to build creator research tools and searchable video catalogs.

  • @PewDiePie
  • Home tab
Channel videos Saved channel shelf
Channel videos — Saved channel shelf
ShelfVideoDuration
VideosEarthquake by Mount Fuji32:16
VideosMeet our newest family member24:04
API data
channelInfo.handlesections[]sections[].items[].videoIdsections[].items[].titlesections[].items[].duration
Your app
Group shelf items by channel and deduplicate video IDs across shelves in your catalog.

Research videos for target keywords

Build topic research tools from YouTube video titles, view counts, and search positions for your chosen keywords.

  • BMW
  • Search results
Videos returned for BMW Saved search results
Videos returned for BMW — Saved search results
Position on pageVideoViews
1BELI BMW M2 BARU, HANDOVERNYA DI LUAR DUGAAN665,639
2BMW 3 MILIAR INI NYAMANNYA MIRIP ROLLS-ROYCE476,042
API data
videoResults[].positionOnPagevideoResults[].titlevideoResults[].viewsvideoResults[].videoId
Your app
Save query-specific video results and compare titles and page positions across dated searches.

Monitor Shorts around your topics

Build Shorts discovery feeds from keyword searches, with video links and public view counts for short-form content research.

  • BMW
  • Shorts shelf
Shorts returned for BMW Saved Shorts results
Shorts returned for BMW — Saved Shorts results
Short IDDisplayed viewsNumeric views
d4WRwrd4Gh827M views27,000,000
QVnYg9Wxwks1.5M views1,500,000
API data
shortsResults[].shorts[].videoIdshortsResults[].shorts[].linkshortsResults[].shorts[].viewsshortsResults[].shorts[].isNew
Your app
Collect Shorts by video ID and compare their returned view counts across saved searches.
Response

Timestamped transcript, one predictable schema

Explore timestamped transcripts, video and channel details, recommendations, Shorts and search results from their respective endpoints.

transcript.json
[
  {
    "startMs": 320,
    "endMs": 18800,
    "snippet": "[Music]",
    "startTimeText": "0:00"
  },
  {
    "startMs": 18800,
    "endMs": 21880,
    "snippet": "We're no strangers to love",
    "startTimeText": "0:18"
  }
]
Fields in transcript
startMs / endMs number

Start and end of the line in milliseconds

snippet string

The caption text for this segment

startTimeText string

Human-readable start time, e.g. 0:18

What We Offer

An all-in-one scraping service

Every feature you need to collect data from thousands to millions of requests.

Loved by developers

Teams that deleted their scraper

Now it's the part of the pipeline they don't think about

4.8 ★★★★★
across 100+ reviews on 5 platforms
Trustpilot Trustpilot ★★★★★

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.

Denver Sinclair
Denver Sinclair
Capterra Capterra ★★★★★

We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.

JN
Jacob N.
Trustpilot Trustpilot ★★★★★

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.

Arnold Foster
Arnold Foster
Trustpilot Trustpilot ★★★★★

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.

Hussein Ali
Hussein Ali
Clutch Clutch ★★★★★

We were particularly impressed with how easily we could integrate HasData into our existing workflow.

TB
Taras Bazyshyn
CEO at BAZTDL Sp. z o.o
Pricing

Plans that get cheaper at scale

Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.

Free
$0 /mo
Free forever
100 scrapes / month
1,000 credits / month
1 concurrent request
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Community support
Start free
Startup
$49 /mo
$2.46 / 1k scrapes
20K scrapes / month
200K credits / month
5 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Email support
Get started
Basic
Recommended
$99 /mo
$0.99 / 1k scrapes
100K scrapes / month
1M credits / month
15 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Priority email support
Get started
Growth
$208 /mo
$0.69 / 1k scrapes
3M credits / month
50 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Dedicated account manager
Get started
Monthly scrape volume
Free 100K 500K 2M
Best fit
Basic
scrapes / mo
100K
Concurrency
15
$ / 1k scrapes
$0.99
$99 /mo
Get Started
Enterprise
Custom price based on required volume

Past 20M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload.

Credits rollover
Unused credits carry into the next billing period.
Concurrency 2000+
Parallel request limits set to your peak load.
#1 request priority
Highest speed, always first in the queue.
Personal manager
A direct line to the founding team.
SSO
SAML single sign-on for the whole team.
Security review
Security questionnaire, DPA, and controls overview.
Talk to sales Quote within one business day
FAQ

Questions, answered

1 Grab your API key 2 Send a GET request 3 Get structured JSON

Your first scrape
is minutes away

100 scrapes free · no credit card