mangakakalot-api
v1.0.3
Published
Lightweight scraper library for MangaKakalot.gg (no server)
Maintainers
Readme
MangaKakalot API
A comprehensive RESTful API for scraping manga data from MangaKakalot.gg. This package provides easy access to manga information, chapters, and images from MangaKakalot.
Installation
npm install mangakakalot-apiQuick Start
As a standalone server
# Install globally
npm install -g mangakakalot-api
# Start the server
mangakakalot-api
# Or use npx
npx mangakakalot-apiAs a module in your project
const express = require('express');
const mangaAPI = require('mangakakalot-api');
const app = express();
const PORT = process.env.PORT || 3000;
// Use the manga routes
app.use('/api/manga', require('mangakakalot-api/routes'));
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});API Endpoints
Search Manga
GET /api/manga/search/:query?/:page?- Search for manga by title
- Parameters:
- query (optional): Search term (default: "attack on titan")
- page (optional): Page number (default: 1)
Get Manga Details
GET /api/manga/details/:id- Get detailed information about a specific manga
Read Chapter
GET /api/manga/read/:mangaId?/:chapterId?- Get chapter images for reading
Browse Manga
GET /api/manga/latest/:page?- Get latest manga updates (from manga-list/latest-manga)
GET /api/manga/popular/:page?- Get popular manga (from manga-list/hot-manga)
GET /api/manga/newest/:page?- Get newest manga (from manga-list/new-manga)
GET /api/manga/completed/:page?- Get completed manga (from manga-list/completed-manga)
GET /api/manga/popular-now- Get popular now manga (from homepage carousel)
GET /api/manga/home- Get complete homepage data (popular slider and latest updates)
Parameters
- page (optional): Page number (default: 1)
Response Examples
Search Response
{
"mangas": [
{
"id": "manga-id",
"title": "Manga Title",
"image": "cover-image-url",
"latestChapter": "Chapter X",
"views": 1234,
"genres": ["Action", "Comedy", "Romance"]
}
],
"currentPage": 1,
"hasNextPage": true,
"totalPages": 100,
"totalMangas": 5000
}Manga Details Response
{
"id": "manga-id",
"title": "Manga Title",
"altTitles": "Alternative titles",
"image": "cover-image-url",
"author": "Author Name",
"status": "Ongoing/Completed",
"genres": ["Action", "Comedy", "Romance"],
"chapters": [
{
"id": "chapter-id",
"name": "Chapter X",
"date": "Release date"
}
],
"anilistId": 12345,
"poster": "high-quality-poster-url",
"banner": "banner-image-url"
}Chapter Images Response
{
"id": "chapter-id",
"title": "Chapter Title",
"mangaId": "manga-id",
"mangaTitle": "Manga Title",
"images": ["image-url-1", "image-url-2", "..."],
"prevChapter": "previous-chapter-id",
"nextChapter": "next-chapter-id",
"allChapters": [
{
"id": "chapter-id",
"name": "Chapter X"
}
]
}Installation
- Install dependencies:
npm install- Start the server:
npm startFor development with auto-reload:
npm run devTo test the API:
npm testThe API will be available at http://localhost:3000
Features
- Scrapes manga data from MangaKakalot.gg
- Integrates with AniList API for high-quality cover images
- Provides endpoints for searching, browsing, and reading manga
- CORS enabled for cross-origin requests
- Caching headers for improved performance
- Proper headers including referer to avoid being blocked
- Pagination information including total pages and total manga count
Deployment
This API is configured for deployment on Vercel. Simply push to your Vercel-connected repository to deploy.
