- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
Pass a handle, an id (channelId) or a channel url.
You send one of handle or id or url.
Part of the YouTube Scraper API: 18 YouTube endpoints on one key.
Request
Send your key in the x-api-key header.
1curl -G "https://api.socialscrape.dev/v1/youtube/channel" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'handle=NASA'1import os2import requests34params = {5 "handle": "NASA",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/youtube/channel",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11 timeout=60,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/youtube/channel");2url.search = new URLSearchParams({3 handle: "NASA",4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape YouTube channel details",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/youtube/channel",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "handle",19 "value": "NASA"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | Channel handle, with or without @. Also accepted as username. |
id | string | one of | Channel id (UC...). Also accepted as channelId, channel_id. |
url | url | one of | Any channel URL (/@handle, /channel/UC..., /c/name). |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_361e8bbed3bc9681bdc6d240",8 "data": {9 "object": "profile",10 "platform": "youtube",11 "id": "UCLA_DiR1FfKNvjuUpBHmylQ",12 "handle": "NASA",13 "name": "NASA",14 "headline": null,15 "url": "https://www.youtube.com/@NASA",16 "kind": "channel",17 "bio": "NASA's mission is to pioneer the future in space exploration, scientific discovery, and aeronautics research.\r\n\r\nTo do that, we have worked around the world ...",18 "avatar_url": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s160-c-k-c0x00ffffff-no-rj",19 "banner_url": "https://yt3.googleusercontent.com/y8Srh-oCcilLvBO8jAPI546m1bn0puA5DIvQiBZ1cSxc_rZfKxKSFlTCtoCQCtB6viUf1NGsaQ=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-n...",20 "verified": true,21 "is_private": null,22 "external_url": "https://www.nasa.gov",23 "links": [24 {25 "title": "nasa.gov",26 "url": "https://www.nasa.gov"27 },28 {29 "title": "X",30 "url": "https://x.com/nasa"31 },32 {33 "title": "Facebook",34 "url": "https://www.facebook.com/NASA"35 }36 ],37 "location": null,38 "category": null,39 "created_at": "2008-06-03T00:00:00Z",40 "stats": {41 "followers": 15100000,42 "following": null,43 "posts": 6195,44 "likes": null,45 "views": 113279412046 },47 "extra": {48 "channel_url": "https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ",49 "facebook_profile_id": "NASA",50 "is_family_safe": true,51 "is_live": true,52 "is_unlisted": false,53 "joined_text": "Joined Jun 3, 2008"54 }55 },56 "cursor": null,57 "has_more": null58}Fields
One Profile in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "profile" | ||
platform | Platform | yes | |
id | string or null | ||
handle | string or null | ||
name | string or null | ||
headline | string or null | a short tagline apart from the bio (LinkedIn's headline) | |
url | string or null | ||
kind | "person" or "creator" or "channel" or "page" or "company" or "artist" or "organization" or "shop" or "unknown" | ||
bio | string or null | ||
avatar_url | string or null | ||
banner_url | string or null | ||
verified | boolean or null | ||
is_private | boolean or null | ||
external_url | string or null |
Show the other 6 fields
| Field | Type | Always | Notes |
|---|---|---|---|
links | Link[] or null | ||
location | string or null | ||
category | string or null | ||
created_at | string (ISO 8601 date-time) or null | ||
stats | ProfileStats | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The Python client has client.youtube.channel(...) and the TypeScript client client.youtube.channel(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.