AniNewsAPI
Real-time Anime News API that scrapes live articles from Crunchyroll & ANN — supports smart caching, tag filtering, full article content, and Vercel deployment. Built for anime devs.
Install / Use
/learn @Shineii86/AniNewsAPIREADME
📰 Anime News API
🛰️ A real-time, blazing-fast, tag-filterable Anime News API that fetches fresh articles from multiple reliable sources with smart caching for optimal performance.
📦 Features
- ⚡ 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
🗞️ News Sources
| 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 |
📡 API Endpoints
GET /api/news <sup>(✅ Stable)</sup>
Returns the latest anime news articles from all sources.
Query Parameters:
| 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) |
Available Sources:
all- All sources (default)ann- Anime News Networkanimecorner- Anime Cornermyanimelist- MyAnimeListotakuusa- Otaku USA Magazinecrunchyroll- Crunchyroll
Example Response:
{
"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"]
}
}
Example Requests:
GET /api/news?source=ann&limit=5&sort=latest
GET /api/news?source=animecorner&limit=3
GET /api/news?limit=20&sort=oldest
GET /api/news/tags <sup>(⚠️ Experimental)</sup>
Filter articles by tags (currently supports Crunchyroll only).
Query Parameters:
| Param | Type | Required | Description |
|-------|--------|----------|-----------------------|
| tag | String | Yes | Tag to filter by |
Example:
GET /api/news/tags?tag=official
GET /api/news/[slug] <sup>(✅ Stable)</sup>
Get full article content by slug.
Example:
GET /api/news/ann-new-anime-series-announced
🚀 Quick Start
Deploy to Vercel
Local Development
# 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
🔧 Configuration
Environment Variables
# Optional: Set cache duration (in seconds)
CACHE_TTL=900
# Optional: Set Chrome executable path for Puppeteer
CHROME_EXECUTABLE_PATH=/usr/bin/chromium-browser
Caching
The API uses a two-tier caching system:
- Memory Cache: Fast in-memory storage (15 minutes TTL)
- File Cache: Persistent disk storage for backup
📊 Performance
- Response Time: ~200-500ms (cached)
- Concurrent Sources: 5 sources fetched simultaneously
- Cache Duration: 15 minutes
- Rate Limiting: Built-in via Vercel
- Uptime: 99.9%+
🛠️ Technical Details
Architecture
- Runtime: Node.js (Vercel Functions)
- Scraping: Cheerio + Axios
- Caching: Node-cache + File system
- Deployment: Vercel Serverless Functions
Error Handling
- Graceful fallback when sources fail
- Detailed error logging
- Structured error responses
- Timeout protection (10s per source)
🤝 Contributing
- 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
Adding New Sources
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
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- 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
🔗 Links
- API Base URL:
https://aninews.vercel.app - Documentation: GitHub Repository
- Issues: GitHub Issues
- Discussions: GitHub Discussions
<div align="center"> <p>Made with ❤️ for the anime community</p> <p>⭐ Star this repo if you find it useful!</p> </div>
Related Skills
tmux
342.0kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
blogwatcher
342.0kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
product
Cloud-agnostic Kubernetes infrastructure with Terraform & Helm for homelabs, edge, and production clusters.
Unla
2.1k🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
