X CASPER
YouTube Video API
A free, unlimited API for YouTube videos — search with filter chips, channels, playlists, video details, player info with per-language audio tracks, captions and downloads. No API key. No OAuth. No sign-up.
01Overview
Everything about the project at a glance — what it is, who built it, and how it talks to YouTube Video.
| Name | X CASPER YouTube Video API |
|---|---|
| Version | 1.0.0 |
| Base URL | this site — detected automatically from the host serving this page |
| Built by | Casper — XCASPER SPACE, Kenya |
| Access | Just call the API — nothing else is needed. |
| Cost & limits | Free and unlimited. No API key, no OAuth, no sign-up required. |
How it works
The API talks to YouTube the same way the YouTube app does, with no key and no login, for videos, channels and playlists.
Everything it returns is public: the same search results, channels, playlists and video pages anyone can open on YouTube.
Clean JSON responses
Every JSON response comes back pretty-printed and carries the provider and creator alongside the result.
See the response format below, or press Test on any endpoint and read the live output right here.
02Endpoints
All 14 routes are simple GET requests that return JSON — except /api/download/:id, which streams the audio file itself. Every link on this page is built from the host serving it, detected automatically: Copy copies the full URL on this host, and Test runs the call right here and pretty-prints the response — no need to open the URL in a browser.
api.03Examples
Real calls with real IDs. Copy any of them — every copy is the full URL on this host, domain included, ready to paste and call.
{
"provider": "XCASPER SPACE",
"creator": "Casper",
"success": true,
"query": "alan walker faded",
"type": "video",
"tab": "All",
"chips": [
{ "text": "All", "selected": true },
{ "text": "Shorts", "selected": false }
],
"count": 20,
"results": [
{
"id": "60ItHLz5WEA",
"type": "video",
"title": "Alan Walker - Faded",
"channel": "Alan Walker",
"views": "4,069,672,138 views",
"duration": "3:33"
}
]
}
04Features
Videos, channels and playlists, covered end to end — every route below runs with no key and no login.
Search & filter chips
Full search across videos, channels and playlists, plus the server-issued filter chips — All, Shorts, Unwatched, Videos, Recently uploaded, Live — replayed with ?tab=.
Channels & playlists
Complete channel pages — subscribers, total videos and views, joined date, country, links, trailer, top / newest / oldest video and first-page counts — by channel id, @handle or full channel URL. Plus playlist contents, up to 100 videos in a single call.
Video details & player
Title, author, length, views and description for any video, plus honest playability — one direct URL only, itag 18 (360p mp4).
Audio languages
Multi-language videos list every audio track — Arabic, Hindi, Spanish and more — with ?hl= selecting the default track and ?audioTrack= picking one.
Captions
Caption tracks for any video, with the full transcript text and timings when available.
Downloads
Download the video as an MP4 file, or the audio as an MP3 — streamed straight to you. 360p and 128 kbps are verified live; higher qualities and bitrates go through the y2mate converter.
05Download — every format
/api/download/:id streams a video as an MP4 file in 1080, 720, 360, 240 or 144p with ?format=mp4&quality=720, or as an MP3 at 320, 256 or 128 kbps with ?format=mp3&bitrate=320. The 360p MP4 comes straight from YouTube (itag 18, the only format with a direct URL); every other quality and bitrate goes through the y2mate converter, with a fallback converter behind it. Right now the y2mate converter is blocked from this server's IP, so a higher-quality request is served by the fallback at its own quality (a 720p request came back as 1080p in the live test), and a 320 or 256 kbps request fails with a clean 502 instead of serving the wrong bitrate. Add &info=1 to resolve the download link without fetching the file, and GET /api/download lists every format. Press Test on the download endpoint above and the file is fetched right here — you can play it and save it without leaving this page.
How to call it
- Pass the video's ID as
:id— for example/api/download/60ItHLz5WEAfor Faded by Alan Walker - Add
?format=mp4&quality=720for a 720p video (1080, 720, 360, 240 or 144), or?format=mp3&bitrate=320for audio (320, 256 or 128 kbps) &vcodec=av1orvp9picks the video codec (defaulth264);&info=1resolves the link only, without downloading- No key, no login, no cookies — a plain
GETis all it takes
What you get
- The file itself, streamed straight to you
- MP4 360p direct from YouTube; other qualities via the converter (the fallback serves its own quality — 1080p observed). MP3 128 kbps verified; 320/256 kbps need the y2mate converter reachable
- Full-length videos — the complete video, start to finish
| File | Size | Length | Route |
|---|---|---|---|
| Faded — Alan Walker (MP4) | 7,834,859 bytes | 212.49 s | Direct itag 18 |
| Faded — Alan Walker (MP3) | 3,400,749 bytes | 212.49 s | Converter, 128 kbps |
| Faded — Alan Walker (MP4, asked 720p) | 44,266,103 bytes | 212.53 s | Fallback converter, served 1080p |
06Tips
Three small things that make the API easier to work with.
Filter with the chips
Every search returns its filter chips. Pass one back as ?tab=Shorts (or its index, ?tab=1) to narrow the same search — Shorts, Unwatched, Videos, Recently uploaded, Live.
Pick an audio language
On /api/player or /api/video, pass ?hl=hi to make Hindi the default audio track, or ?audioTrack=hi.3 to pick that track's formats directly.
Resolve playback fresh
Call /api/player at play time and use the playback details it returns straight away — that is when they are at their freshest. Only itag 18 carries a direct URL.