Base URL
The docs auto-detect your origin. If your Worker runs on a different hostname, open this page from there.
https://example.workers.dev
Endpoints
GET /api/request/search/<query>?type=all|video|channel
GET /api/request/channel/<id> (use @handle or UC…)
GET /api/request/video/<videoId>
Search — Videos & Channels
Find videos and channels matching a query. Use ?type=all (default), video, or channel to filter.
Channel Snapshot
Get rich info for a channel by handle or channel ID (subs, videos, description, avatar, banner, verified, etc.).
Video Snapshot
Get video details by video ID (title, channel, description snippet, length, view count, live flag, thumbnails).
Python Examples
Response Shapes
/api/request/search/<query>
{
"query": "mrbeast",
"type": "all",
"videos": [
{
"id": "abcdefghijk",
"title": "I Gave $1,000,000 To...",
"url": "https://www.youtube.com/watch?v=abcdefghijk",
"channel": "MrBeast",
"channelUrl": "https://www.youtube.com/@MrBeast",
"views": "157,234,567 views",
"published": "2 months ago",
"duration": "12:34",
"live": false,
"thumbnail": "https://i.ytimg.com/vi/abcdefghijk/hqdefault.jpg"
}
],
"channels": [
{
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"title": "MrBeast",
"handle": "@MrBeast",
"url": "https://www.youtube.com/@MrBeast",
"subscribers": "300M subscribers",
"videos": "790 videos",
"description": "Description snippet…",
"verified": true,
"thumbnail": "https://yt3.ggpht.com/...=s800"
}
]
}
/api/request/channel/<id>
{
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"title": "MrBeast",
"handle": "@MrBeast",
"url": "https://www.youtube.com/@MrBeast",
"subscribers": "300M subscribers",
"videos": "790 videos",
"description": "We make the world a better place…",
"verified": true,
"avatar": "https://yt3.ggpht.com/....=s800",
"banner": "https://yt3.ggpht.com/....=w2048"
}
/api/request/video/<videoId>
{
"id": "5qap5aO4i9A",
"title": "lofi hip hop radio - beats to relax/study to",
"url": "https://www.youtube.com/watch?v=5qap5aO4i9A",
"channel": "Lofi Girl",
"channelId": "UCSJ4gkVC6NrvII8umztf0Ow",
"shortDescription": "...",
"lengthSeconds": 0,
"viewCount": "10000000",
"isLive": true,
"thumbnails": [
{"url":"https://i.ytimg.com/vi/5qap5aO4i9A/hqdefault.jpg","width":480,"height":360}
]
}
- This API scrapes YouTube’s public pages (embedded JSON). It may break if YouTube changes their layout or rate-limits scrapers.
- Counts are display-style (e.g., “3.4M subscribers”), not exact integers.
- Use for personal/educational purposes only to avoid ToS issues.