A high-performance, lightweight anime data and streaming API built with ElysiaJS. This service provides endpoints for searching anime, retrieving details, fetching episode lists, and generating streaming sources from https://kuudere.to
- Fast & Lightweight: Built on top of the Elysia framework.
- Type Safety: extensive runtime validation using Elysia's
tschema. - Robust Logging: Integrated with
Logesticfor request logging. - Error Handling: Centralized handling for Timeouts, HTTP errors, and 404s.
- CORS Enabled: Ready for frontend integration.
- Bun (Recommended) or Node.js
- Git
- Clone the repository
git clone https://github.com/your-username/kuudere-api.git
cd kuudere-api
- Install dependencies
bun install
- Environment Setup
Create a
.envfile in the root directory:
PORT=3000
To start the server in development mode (with hot reloading):
bun dev
To run the server in production mode:
bun start
The server will start on http://localhost:3000 (or your defined PORT).
All endpoints are prefixed with /api/v1.
Search for an anime title.
- Endpoint:
GET /api/v1/search - Query Parameters:
query(string, required): The search term.
Example:
GET /api/v1/search?query=naruto
Retrieve detailed information about a specific anime.
- Endpoint:
GET /api/v1/info/:id - Path Parameters:
id(string, required): The unique ID of the anime.
Example:
GET /api/v1/info/naruto-shippuden
Fetch the list of episodes for a specific anime.
- Endpoint:
GET /api/v1/episodes/:id - Path Parameters:
id(string, required): The unique ID of the anime.
Example:
GET /api/v1/episodes/naruto-shippuden
Retrieve streaming links/sources for a specific episode.
- Endpoint:
GET /api/v1/sources - Query Parameters:
id(string, required): The unique ID of the episode.subType(string, optional):'sub'or'dub'. Defaults to'sub'.
Example:
GET /api/v1/sources?id=naruto-episode-1&subType=sub
The API uses a standardized error response format.
| Status Code | Code | Description |
|---|---|---|
200 |
SUCCESS |
Request was successful. |
400 |
BAD_REQUEST |
Validation failed or invalid parameters. |
404 |
NOT_FOUND |
Route or resource not found. |
408 |
REQUEST_TIMEOUT |
Upstream request timed out. |
500 |
INTERNAL_SERVER_ERROR |
Server-side error. |
Error Response Example:
{
"success": false,
"message": "Requested timed out. Please try again.",
"code": "REQUEST_TIMEOUT",
"error": {
"name": "TimeoutError",
"message": "Request timed out"
}
}