A high-performance RESTful API service for scraping and extracting structured data from AnimeWorldIndia.
This API is provided for educational and research purposes only. Users are responsible for ensuring their use complies with all applicable copyright laws and terms of service. The developers do not endorse or facilitate piracy. All content accessed through this API remains the property of its respective copyright holders. Use responsibly and respect intellectual property rights.
- π¬ Dynamic Content: Extract home page content (newest drops, trending, etc.)
- πΊ Deep Extraction: Get detailed information about series and movies
- π Episode Management: Fetch episodes organized by season
- π₯ Stream Ready: Extract multiple embed player links automatically
- π Advanced Browsing: Filter by category (movies, series, anime, cartoon, genres, languages)
- π€ A-Z Index: Browse alphabetically with full pagination
- π Smart Search: Supports AJAX suggestions and full page search
- π Security: Origin-based access control and rate limiting
- π‘οΈ Hardened: Integrated Helmet.js, CORS, and Compression
- π Custom UX: Premium HTML error pages (403, 404)
- Clone the repository:
git clone [https://github.com/DPModsPro/AnimeWorldIndia-Api.git](https://github.com/DPModsPro/AnimeWorldIndia-Api.git)
cd AnimeWorldIndia-Api- Install dependencies:
npm install- Create a
.envfile from the example:
cp .env.example .env-
Configure your environment variables (see Configuration)
-
Start the server:
# Development mode (with auto-restart)
npm run dev
# Production mode
npm startCreate a .env file in the root directory with the following variables:
PORT=3000
NODE_ENV=development
CORS_ORIGIN=https://example.comPORT- Server port (default:3000)NODE_ENV- Environment mode:developmentorproduction(default:development)CORS_ORIGIN- Allowed origins for API access:- Set to
*to allow all origins - Or specify comma-separated list:
https://example.com,https://another.com - Requests without matching origin/referer will be blocked with 403
- Set to
All endpoints are prefixed with /api and require a valid origin/referer header (unless CORS_ORIGIN=*).
Get home page content including newest drops, trending, and other categories.
GET /api/homeResponse:
{
"newestDrops": [...],
"trending": [...],
"animeMovies": [...],
...
}Browse content by category or type with pagination.
GET /api/category/{type}?page={page}Parameters:
type- Category type (e.g.,movies,series,anime,cartoon,genre/sci-fi,language/hindi)page- Page number (optional, default:1)
Example:
GET /api/category/movies?page=1
GET /api/category/genre/sci-fi?page=2
GET /api/category/language/hindi?page=1Response:
{
"success": true,
"currentPage": 1,
"totalPages": 8,
"data": {
"items": [...]
}
}Browse content alphabetically by letter with pagination.
GET /api/letter/{letter}?page={page}Parameters:
letter- Letter to browse (e.g.,A,B,D,Z)page- Page number (optional, default:1)
Example:
GET /api/letter/D?page=1
GET /api/letter/A?page=2Response:
{
"success": true,
"currentPage": 1,
"totalPages": 3,
"data": {
"items": [...]
}
}Search for content using AJAX suggestions or full page search.
GET /api/search?suggestion={term}
GET /api/search?q={term}Query Parameters:
suggestion- Search term for AJAX quick suggestions (returns minimal data without images)q- Search term for full page search (returns complete results with images)
Note: Either suggestion or q parameter is required.
Example:
GET /api/search?suggestion=naruto
GET /api/search?q=narutoResponse (AJAX suggestion):
{
"success": true,
"data": {
"items": [
{
"id": "naruto",
"type": "series",
"title": "Naruto"
}
]
}
}Response (Full page search):
{
"success": true,
"data": {
"items": [
{
"id": "naruto",
"type": "series",
"title": "Naruto",
"image": "https://image.tmdb.org/t/p/w500/..."
}
]
}
}Get detailed information about a specific series or movie.
GET /api/info/{id}Parameters:
id- Series or movie ID (e.g.,spy-x-family,your-name)
Response:
{
"id": "spy-x-family",
"type": "series",
"postId": "1101",
"title": "Spy x Family",
"image": "...",
"background": "https://image.tmdb.org/t/p/w1280/...",
"description": "...",
"genres": [...],
"languages": [...],
"duration": "...",
"year": "...",
"seasons": [1, 2, 3],
"episodes": "43",
"episodesList": [...],
"recommended": [...]
}Note: For movies, seasons, episodes, and episodesList fields are excluded.
Get episodes for a specific season of a series.
GET /api/episodes/{id}/{season}Parameters:
id- Series IDseason- Season number
Response:
{
"success": true,
"id": "spy-x-family",
"postId": "1101",
"season": 2,
"episodes": [...]
}Get embed player links for an episode.
GET /api/embed/{id}Parameters:
id- Episode ID (e.g.,spy-x-family-3x1)
Response:
{
"id": "spy-x-family-3x1",
"servers": [
{
"server": 0,
"name": "Play",
"url": "..."
},
{
"server": 1,
"name": "Abyss",
"url": "..."
}
]
}Note: If the episode page returns 404, the API will fall back to the series/movie details page to find iframes.
Check API health status.
GET /api/healthResponse:
{
"success": true,
"data": {
"status": "healthy",
"timestamp": "...",
"uptime": 123.45
}
}Scrape any URL with optional extractor.
GET /api/scrape?url={url}&extractor={extractor}Query Parameters:
url- URL to scrape (required)extractor- Extractor type (optional)
The API implements origin-based access control:
- Requests to
/api/*endpoints require a validOriginorRefererheader - Origins must match the
CORS_ORIGINenvironment variable - Requests without origin/referer or with non-allowed origins receive a 403 Forbidden response
- Set
CORS_ORIGIN=*to allow all origins (not recommended for production)
- 100 requests per 15 minutes per IP address
- Applied to all
/api/*endpoints
- Helmet.js for security headers
- CORS configuration
- Compression middleware
- 403 Forbidden - Origin/referer not allowed (serves
403.html) - 404 Not Found - Route not found (serves
404.html) - 400 Bad Request - Invalid request parameters
- 429 Too Many Requests - Rate limit exceeded
- 500 Internal Server Error - Server error
AniBiee-AnimeWorldIndia-scraper/
βββ public/ # Static files (HTML pages, images)
β βββ index.html # Home page
β βββ 404.html # 404 error page
β βββ 403.html # 403 error page
βββ src/
β βββ base/ # Base classes for scraping
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ extractors/ # Data extraction logic
β βββ middleware/ # Express middleware
β βββ routes/ # API routes
β βββ utils/ # Utility functions
β βββ router.js # Router setup
βββ server.js # Entry point
βββ package.json # Dependencies
βββ .env.example # Environment variables example
# Run in development mode with auto-restart
npm run dev
# Run linter
npm run lintISC License - See LICENSE file for details.
-
β Star this repository: If you find this API helpful, please give it a star on GitHub to support the development!
-
π’ Join our Community: Get updates and support on our official Telegram channel. Join SagaBox App on Telegram
-
π Developer Portfolio: Check out more projects and information at my official website. Visit basirulakhlak.tech
Author: Basirul Akhlak Borno
- GitHub: @basirulakhlakborno
- Website: https://basirulakhlak.tech/
Copyright (c) 2026 Basirul Akhlak Borno. All Rights Reserved.
Distributed under the ISC License. See LICENSE for details.
