HTTP API · 14 endpoints

Endpoint reference

Each web address below gives you one kind of YouTube information. Open one in your browser to see it, or use it in your code. Each card shows what to type in, an example result, and whether it works today (checked on 9 October 2026).

Base URL
https://ytapis.djalokyt27.workers.dev
Checking…
WorkingEmpty right nowNeeds token
GET/shorts?q=:query&limit=:nWorkingArray

Search for YouTube Shorts. Returns the same VideoResult shape. Use embedUrl to build a Shorts feed.

ParamTypeDefaultNotes
qstring—Required. Missing it returns 400 {"error":"Missing query param \"q\""}.
limitinteger151 to 50.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/shorts?q=dance&limit=5'
GET/continue?token=:token&limit=:nNeeds an SDK token

Fetch the next page with a continuation token. The HTTP API does not hand out tokens, so this route is mainly for the SDK. Use searchContinue() in TypeScript or search_continue() in Python.

ParamTypeDefaultNotes
tokenstring—Required. Comes from an SDK search response.
limitinteger151 to 50.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/continue?token=CONTINUATION_TOKEN&limit=15'
GET/channel/:channelId?limit=:nEmpty right nowArray

Videos from a channel. Channel IDs start with UC. Returned [] in our tests.

Use the UC… channel ID. The route does not resolve @handles.

ParamTypeDefaultNotes
channelIdstring—Path. Required. Example: UC_x5XG1OV2P6uZZ5FSM9Ttw.
limitinteger15Query. 1 to 50.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw?limit=10'
GET/channel/:channelId/metadataPartialObject

Channel details: name, handle, avatar, banner, subscriber count, social links, verification. In our test the request succeeded, but name and subscriber fields came back empty for the sample channel, so treat every field as optional.

Use the UC… channel ID. An @handle returns the same shape with empty fields (checked with @RickAstleyYT on 9 October 2026).

cURL
curl 'https://ytapis.djalokyt27.workers.dev/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw/metadata'
Response shape
{
  "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "name": "",
  "handle": "",
  "description": "",
  "subscriberCount": "",
  "subscriberCountRaw": 0,
  "videoCount": "",
  "videoCountRaw": 0,
  "avatar": "",
  "banner": "",
  "isVerified": false,
  "socialLinks": [],
  "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw"
}
GET/playlist/:playlistId?limit=:nEmpty right nowArray

Videos in a playlist, in order. Playlist IDs start with PL or UU. Returned [] in our tests.

ParamTypeDefaultNotes
playlistIdstring—Path. Required.
limitinteger15Query. 1 to 50.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/playlist/PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf?limit=50'
GET/video/:videoIdWorkingObject

Full metadata for one video, as a VideoResult object. Invalid or unknown IDs do not return 404. You receive placeholder data (title like Video abc), so validate IDs yourself: 11 characters from A-Z a-z 0-9 _ -.

ParamTypeNotes
videoIdstringPath. The 11-character ID, for example dQw4w9WgXcQ.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/video/dQw4w9WgXcQ'
GET/video/:videoId/comments?limit=:nEmpty right nowArray

Top-level comment threads, with replies when the upstream provides them. Returned [] for the sample video in our tests.

Each item has id, text, likeCount, publishedTime, replyCount, isPinned, isLikedByCreator, replies (array) and author with name, channelId, avatar, isVerified, isOwner. This shape comes from the worker source. We have not yet seen a non-empty response.

ParamTypeDefaultNotes
limitinteger201 to 100 top-level threads.
sort——Not supported. The worker accepts sort but does not pass it to the comment fetcher, so the upstream default order is always returned.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/video/dQw4w9WgXcQ/comments?limit=30'
GET/video/:videoId/statsWorkingObject

Current stats: views, likes, comments, live flag and viewer count. Tested live on 9 October 2026.

comments is always 0. The worker hard-codes it. Counts are rounded, so treat them as approximate.

cURL
curl 'https://ytapis.djalokyt27.workers.dev/video/dQw4w9WgXcQ/stats'
Real response (9 Oct 2026)
{
  "views": 1800000000,
  "likes": 19479475000,
  "comments": 0,
  "isLive": false,
  "viewerCount": 0
}
GET/video/:videoId/liveWorkingObject

Live stream info: whether it is live or upcoming, viewer count, start times and like counts. Good for polling.

isUpcoming is unreliable. The worker sets it to true whenever the video is not live and has zero viewers, so most ordinary videos return true. Check isLive and scheduledStartTime together.

cURL
curl 'https://ytapis.djalokyt27.workers.dev/video/jfKfPfyJRdk/live'
Real response (9 Oct 2026)
{
  "isLive": false,
  "isUpcoming": true,
  "viewerCount": 0,
  "viewerCountStr": "0",
  "startTime": "Streamed live on Jul 12, 2022",
  "scheduledStartTime": "",
  "likesCount": 3487450000,
  "dislikesCount": 0
}
GET/video/:videoId/transcript?lang=:codeEmpty right nowArray

Timestamped captions. start and duration are seconds. Returned [] for the sample video in our tests, so only some videos may work at the moment.

ParamTypeDefaultNotes
videoIdstring—Path. Required.
langstringautoLanguage code, for example en, es or fr.
cURL
curl 'https://ytapis.djalokyt27.workers.dev/video/dQw4w9WgXcQ/transcript?lang=en'
GET/healthWorkingObject

Health check. Use it to confirm the API is reachable before you make other calls.

cURL
curl 'https://ytapis.djalokyt27.workers.dev/health'
Response
{ "status": "ok", "version": "2.0.0" }

Errors you will see

Full details are on the errors page. The short version:

SituationWhat you get
Missing required q on /shorts400 with {"error": "…"}
Unknown route404 with {"error":"Not found"}
Invalid or unknown video ID200 with placeholder data (validate IDs first)
Upstream returns nothing200 with []