YouTube channel
A channel's header and metadata plus its Videos tab, newest first, one ~30-video page per call.
https://api.scrapercompany.com/v1/youtube/channelPass an @handle, a channel URL or a UC… id. channel carries the title, handle, subscribers_text and video_count_text verbatim ("27.9M subscribers", "5.8K videos"), the full description, keywords, RSS URL, avatar, banner and the header's first link (more_links_text says how many more YouTube folds away). videos rows carry views and the relative age verbatim as YouTube prints them on the grid ("47K views", "16 hours ago"); a channel with no Videos tab answers its metadata with no videos. With page_token the answer is the next page of videos only (an empty page is not charged). An unknown handle or id is a 404.
Request
Send POST https://api.scrapercompany.com/v1/youtube/channel authenticated with your API key in the x-api-key header (see Authentication).
Run this request on your own API key from this page, with the values you type. Signed out? Sign in or get an API key.
Body
JSON object. Unknown fields are rejected with 422.
- channel string | null min length 3, max length 300
@handle, aUC…channel id (channels[].channel_idorvideo.channel.idfrom the other YouTube routes) or a channel URL (/@name,/channel/UC…,/c/…,/user/…). Required unlesspage_tokenis given. - page_token string | null max length 4000
next_page_tokenfrom a previous answer: the next page of videos only (channelis then null). - hl string default
enpattern ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,4})?$Interface language YouTube localizes texts in (
hl): relative dates, view-count wording, caption track names. Counts parse to integers only for English-style numbers. - gl string default
USpattern ^[A-Za-z]{2}$Content country (
gl), two letters.
Example request
curl -X POST "https://api.scrapercompany.com/v1/youtube/channel" \
-H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response
200 — A channel's metadata and latest videos. Metered responses carry x-credits-charged and x-credits-remaining headers (see credit headers).
{
"search_parameters": {
"engine": "youtube_channel",
"channel": "@TED",
"hl": "en",
"gl": "US"
},
"channel": {
"channel_id": "UCAuUUnT6oDeKwE6v1NGQxug",
"title": "TED",
"handle": "@TED",
"link": "https://www.youtube.com/@TED",
"subscribers_text": "27.9M subscribers",
"video_count_text": "5.8K videos",
"description": "The TED Talks channel features the best talks and performances from the TED Conference, where the world's leading thinkers and doers give the talk of their lives in 18 minutes (or less) — plus originals, podcasts and exclusive content.",
"keywords": "TED talks ideas worth spreading technology entertainment design",
"rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCAuUUnT6oDeKwE6v1NGQxug",
"is_family_safe": true,
"avatar": "https://yt3.googleusercontent.com/ytc/AIdro_koIFcCOrvh0KThLNOiazAIDu6hcs8bjkGNwe1f6A_OYm8=s160-c-k-c0x00ffffff-no-rj",
"banner": "https://yt3.googleusercontent.com/mgi4tXOEErQ-2-TUQISotNllP2DOI2IvpXEImFufQLKixWv2T-mKHv__uH3Nc5_gISGhF3IH=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
"links": [
{
"title": "ted.com/membership",
"url": "https://www.ted.com/membership"
}
],
"more_links_text": "and 2 more links"
},
"videos": [
{
"position": 1,
"video_id": "RCNO3k4QL5M",
"title": "How to Use Tech to Outsmart Dictators | Leopoldo López | TED",
"link": "https://www.youtube.com/watch?v=RCNO3k4QL5M",
"channel": {
"name": "TED",
"id": "UCAuUUnT6oDeKwE6v1NGQxug",
"handle": "@TED",
"link": "https://www.youtube.com/@TED",
"thumbnail": "https://yt3.googleusercontent.com/ytc/AIdro_koIFcCOrvh0KThLNOiazAIDu6hcs8bjkGNwe1f6A_OYm8=s160-c-k-c0x00ffffff-no-rj"
},
"views_text": "61K views",
"published_time": "1 day ago",
"length": "14:50",
"length_seconds": 890,
"badges": [],
"is_live": false,
"thumbnail": "https://i.ytimg.com/vi/RCNO3k4QL5M/hq720_custom_3.jpg?sqp=CKDll9YG-oaymwErCNAFEJQDSFryq4qpAx0IARUAAIhCGAHYAQHiAQoIGBACGAY4AUABuALzGA==&rs=AOn4CLAxLLMDB4J2WrXf-_N4jpz3dltqvw"
}
],
"next_page_token": "4qmFsgLdCBIYVUNBdVVVblQ2b0RlS3dFNnYxTkdReHVn…",
"meta": {
"source": "youtube",
"elapsed_s": 0.42
}
}Errors
Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.
| Status | Meaning | Retry? |
|---|---|---|
401 Unauthorized | Missing or invalid API key. {"detail":"missing or invalid API key"} | No, fix the request |
402 Payment Required | Not enough credits for this request: the account's credits mode is {"detail":"insufficient credits: this request costs 5, 0 available. Credits renew 2026-11-01."} | No, fix the request |
404 Not Found | The property, stay, job or record was not found. {"detail":"job not found"} | No, fix the request |
422 Unprocessable Content | Request validation failed. {"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]} | No, fix the request |
429 Too Many Requests | Too many requests: the key's requests-per-minute limit was exceeded, or (in {"detail":"rate limit 60/min exceeded"} | Yes, with backoff |
502 Bad Gateway | The upstream source failed, blocked the request or returned an unusable answer. Safe to retry later; failed requests are not charged. {"detail":"RuntimeError"} | Yes, with backoff |
503 Service Unavailable | Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later. {"detail":"database unavailable: OperationalError"} | Yes, with backoff |
Try it
Press Try it above to run this request on your own key, with the values you type (sign in first). For a no-code walkthrough, use the workspace’s guided Try it.
- Export your key:
export SCRAPERCOMPANY_API_KEY=sk_...(no key yet? start a free trial). - Copy the cURL example above and run it in a terminal.
Credits
2 credits per successful call (2 (an empty answer, an unknown channel and failed requests are free)). Failed, blocked and empty results are free.