Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hasdata.com/llms.txt

Use this file to discover all available pages before exploring further.

The YouTube Channel API provides structured data from YouTube channel pages including channel info, videos, shorts, playlists, posts, streams, releases, podcasts, and more.

Get Your API Key

Sign in at hasdata.com, go to your account settings, and copy your API key. All requests must include your key in the x-api-key header.

Request Cost and API Credits

Each request to the YouTube Channel API consumes API Credits from your account balance.
  • Cost per request: 10 API Credits
  • Credits are deducted only for successful requests.
  • Your total available credits depend on your active plan.
You can use your credits across all HasData APIs. The same credit balance is shared platform-wide.
Unused credits do not roll over. Any remaining credits expire at the end of the current billing period.
To monitor your credit usage and remaining balance, sign in to your account dashboard at app.hasdata.com.

Make Your First Request

curl --request GET -G \
  --url 'https://api.hasdata.com/scrape/youtube/channel' \
  --data-urlencode 'channelId=@PewDiePie' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <your-api-key>'

API Parameters

ParameterDefault ValueRequiredDescription
channelId@PewDiePieYesYouTube channel identifier — either the canonical channel ID (UC…, 24 chars) or the public handle starting with @ (e.g. @PewDiePie). Legacy /c/<custom> and /user/<name> URL slugs are also accepted.
tab-NoChannel tab to scrape. Each tab returns a different content shape:
- featured (default) — channel Home page (channel trailer + curated rows)
- videos — uploaded long-form videos
- shorts — Shorts feed
- streams — past and upcoming live streams
- playlists — created and saved playlists
- posts / community — community posts
- podcasts — podcast episodes
- releases — music releases
- about — channel description, links, stats
- store — channel merch
gl-NoThe two-letter country code for the country you want to limit the search to.
hl-NoThe two-letter language code for the language you want to use for the search.
deviceType-NoDevice type for the request.
paginationToken-NoToken returned in the previous response to fetch the next page of results.