• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
Kou

Kou

Api

Public
Like
Api
Home
Code
4
allanime
1
README.md
H
main.ts
test-api.ts
Environment variables
Branches
1
Pull requests
Remixes
History
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v14
View latest version
README.md

Anime REST API

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.

⚠️ Setup Required

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

Endpoints

MethodPathDescription
GET/API documentation (JSON)
GET/api/homeHomepage data (trending, spotlight, latest)
GET/api/search?q=naruto&page=1Search anime by name
GET/api/search/suggest?q=narAutocomplete suggestions
GET/api/info/:idAnime details
GET/api/episodes/:idEpisode list
GET/api/servers/:episodeIdAvailable servers for an episode
GET/api/sources/:episodeIdStreaming sources (m3u8 links)
GET/api/genre/:name?page=1Anime by genre
GET/api/category/:name?page=1Anime by category
GET/api/schedule?date=2025-01-15Airing schedule
GET/sourceView source code

Query Parameters for /api/sources/:episodeId

  • category — sub (default), dub, or raw
  • server — e.g. vidstreaming, vidcloud

Architecture

Rendering mermaid diagram...

Response Format

All responses follow this structure:

{ "success": true, "data": { ... } }

Error responses:

{ "success": false, "error": "Description of what went wrong" }

Example: Streaming Sources

{ "success": true, "data": { "headers": { "Referer": "..." }, "sources": [ { "url": "https://...master.m3u8", "isM3U8": true, "quality": "auto" } ], "subtitles": [ { "lang": "English", "url": "https://..." } ] } }

Environment Variables

KeyRequiredDescription
ANIWATCH_API_URLRecommendedURL of your aniwatch-api instance

Typical Usage Flow

  1. Search → GET /api/search?q=attack on titan → get anime id
  2. Info → GET /api/info/attack-on-titan-112 → get details
  3. Episodes → GET /api/episodes/attack-on-titan-112 → get episode IDs
  4. Sources → GET /api/sources/{episodeId} → get m3u8 links
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.