🛰️ A real-time, blazing-fast, tag-filterable Anime News API that fetches fresh articles from multiple reliable sources with smart caching for optimal performance.
- ⚡ Real-time Scraping (no database required)
- 🔁 Smart Caching with auto-refresh (15 minutes)
- 🏷️ Filter by tags and sources
- 📄 Fetch full article content by slug
- 🧩 Multi-source support: 5 reliable anime news sources
- 📥 Ready-to-deploy on Vercel
- 🚀 Improved Error Handling and response structure
- 🔄 Concurrent Fetching for better performance
Source | Description | Type |
---|---|---|
Anime News Network | Industry-leading anime news | Official |
Anime Corner | Community-driven anime news | Community |
MyAnimeList | Popular anime database news | Official |
Otaku USA Magazine | Anime culture magazine | Community |
Crunchyroll | Official anime streaming news | Official |
Returns the latest anime news articles from all sources.
Param | Type | Default | Description |
---|---|---|---|
limit |
Number | 10 |
Max number of articles (1-50) |
sort |
String | latest |
latest or oldest |
source |
String | all |
Source filter (see available sources below) |
all
- All sources (default)ann
- Anime News Networkanimecorner
- Anime Cornermyanimelist
- MyAnimeListotakuusa
- Otaku USA Magazinecrunchyroll
- Crunchyroll
{
"success": true,
"data": [
{
"title": "New Anime Series Announced",
"slug": "ann-new-anime-series-announced",
"source": "Anime News Network",
"excerpt": "A new anime series has been announced...",
"date": "2024-01-15T10:30:00.000Z",
"image": "https://example.com/image.jpg",
"link": "https://www.animenewsnetwork.com/news/...",
"tags": ["news", "anime-news-network"]
}
],
"meta": {
"total": 10,
"source": "all",
"sort": "latest",
"limit": 10,
"timestamp": "2024-01-15T10:30:00.000Z",
"availableSources": ["all", "ann", "animecorner", "myanimelist", "otakuusa", "crunchyroll"]
}
}
GET /api/news?source=ann&limit=5&sort=latest
GET /api/news?source=animecorner&limit=3
GET /api/news?limit=20&sort=oldest
Filter articles by tags (currently supports Crunchyroll only).
Param | Type | Required | Description |
---|---|---|---|
tag |
String | Yes | Tag to filter by |
GET /api/news/tags?tag=official
Get full article content by slug.
GET /api/news/ann-new-anime-series-announced
# Clone the repository
git clone https://github.com/Shineii86/AniNewsAPI.git
cd AniNewsAPI
# Install dependencies
npm install
# Start development server
npm run dev
# API will be available at http://localhost:3000
# Optional: Set cache duration (in seconds)
CACHE_TTL=900
# Optional: Set Chrome executable path for Puppeteer
CHROME_EXECUTABLE_PATH=/usr/bin/chromium-browser
The API uses a two-tier caching system:
- Memory Cache: Fast in-memory storage (15 minutes TTL)
- File Cache: Persistent disk storage for backup
- Response Time: ~200-500ms (cached)
- Concurrent Sources: 5 sources fetched simultaneously
- Cache Duration: 15 minutes
- Rate Limiting: Built-in via Vercel
- Uptime: 99.9%+
- Runtime: Node.js (Vercel Functions)
- Scraping: Cheerio + Axios
- Caching: Node-cache + File system
- Deployment: Vercel Serverless Functions
- Graceful fallback when sources fail
- Detailed error logging
- Structured error responses
- Timeout protection (10s per source)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
To add a new anime news source:
- Create a new scraper in
utils/fetchNewSource.js
- Follow the existing pattern for data structure
- Add the source to
api/news.js
- Update the README documentation
- Test thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
- Anime News Network for comprehensive anime news
- Anime Corner for community-driven content
- MyAnimeList for database and news
- Otaku USA Magazine for anime culture coverage
- Crunchyroll for official anime news
- API Base URL:
https://aninews.vercel.app
- Documentation: GitHub Repository
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ for the anime community
⭐ Star this repo if you find it useful!