API
The archive has a public, read-only JSON API at https://archive.ragtag.moe/api/v2. Responses use typed ids (vid_…,
ch_…) for identity and public refs in URLs: an 11-character YouTube video id, a UC…
YouTube channel id, or platform:id for other platforms. Errors are
problem details with a stable code. Requests are rate
limited per IP; please cache what you fetch.
Search
GET /api/v2/search?q=<text>
| Parameter | Meaning |
|---|---|
q | Full-text query over title, channel names, description and exact video id. |
channel | Only videos of this channel ref (AND-ed with q). |
sort | relevance (default), newest, oldest, views. |
page | 1-based page for relevance (results stop at 10,000). |
cursor | For other sorts: the nextCursor of the previous response. |
limit | 1–100, default 25. |
Returns {"items": [...], "total": 123, "totalIsLowerBound": false, "nextCursor": null, "nextPage": 2}.
Videos and channels
GET /api/v2/videos/{ref}: one video with its archived files and their URLs. 404 if it isn't archived, 410 if it was taken down.GET /api/v2/videos/{ref}/related: similar videos.GET /api/v2/channels?sort=videos|name|recent&offset=0&limit=100: the channel directory.GET /api/v2/channels/{ref}: one channel.GET /api/v2/channels/{ref}/videos?cursor=&limit=100: all of a channel's videos, newest first; follownextCursoruntil it's null.GET /api/v2/search/suggest?q=: search suggestions (JSON array of strings).GET /api/v2/status: service status.
Embedding
Any archived video can be embedded with an iframe:
<iframe src="https://archive.ragtag.moe/embed/vHMV44Uza4g" width="560" height="315" frameborder="0" allowfullscreen></iframe>