Api
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v11View latest version
A REST API that provides anime search, info, episode lists, and streaming/m3u8 source links — all via JSON endpoints. Built with Hono on Val Town.
This API proxies an aniwatch-api instance. The default demo instance (api-aniwatch.onrender.com) is slow and rate-limited.
For reliable use, deploy your own aniwatch-api and set the ANIWATCH_API_URL environment variable:
ANIWATCH_API_URL=https://your-aniwatch-api-instance.com
Quick deployment options:
- Vercel: One-click deploy from the aniwatch-api repo
- Render: Free tier available
- Railway: One-click deploy
| Method | Path | Description |
|---|---|---|
GET | / | API documentation (JSON) |
GET | /api/home | Homepage data (trending, spotlight, latest) |
GET | /api/search?q=naruto&page=1 | Search anime by name |
GET | /api/search/suggest?q=nar | Autocomplete suggestions |
GET | /api/info/:id | Anime details |
GET | /api/episodes/:id | Episode list |
GET | /api/servers/:episodeId | Available servers for an episode |
GET | /api/sources/:episodeId | Streaming sources (m3u8 links) |
GET | /api/genre/:name?page=1 | Anime by genre |
GET | /api/category/:name?page=1 | Anime by category |
GET | /api/schedule?date=2025-01-15 | Airing schedule |
GET | /source | View source code |
category—sub(default),dub, orrawserver— e.g.vidstreaming,vidcloud
Rendering mermaid diagram...
All responses follow this structure:
{ "success": true, "data": { ... } }
Error responses:
{ "success": false, "error": "Description of what went wrong" }
{ "success": true, "data": { "headers": { "Referer": "..." }, "sources": [ { "url": "https://...master.m3u8", "isM3U8": true, "quality": "auto" } ], "subtitles": [ { "lang": "English", "url": "https://..." } ] } }
| Key | Required | Description |
|---|---|---|
ANIWATCH_API_URL | Recommended | URL of your aniwatch-api instance |
- Search →
GET /api/search?q=attack on titan→ get animeid - Info →
GET /api/info/attack-on-titan-112→ get details - Episodes →
GET /api/episodes/attack-on-titan-112→ get episode IDs - Sources →
GET /api/sources/{episodeId}→ get m3u8 links