Note
The old deployment URL https://aninewsapi.vercel.app/ is no longer accessible. Use the current URL: https://aninews.vercel.app/
Real-time Anime News Aggregation API
A serverless API aggregating anime news from 7 sources in real-time β with smart caching, keyword search, RSS feeds, and full-article extraction.
π Quick Start Β· π‘ API Docs Β· ποΈ Sources Β· ποΈ Architecture Β· π€ Contributing
| π‘ 7 Sources ANN Β· MAL Β· Crunchyroll Anime Corner Β· Otaku USA Anime Herald Β· Comic Book |
β‘ 11 Endpoints News Β· Search Β· RSS Β· SSE Tags Β· Slug Β· Health Stats Β· OpenAPI Β· Cache |
π ~200ms Cached responses 10-min auto-refresh Cross-source dedup |
π° 60+ Articles Full-text search RSS 2.0 feed Pagination support |
|
|
|
|
| Source | Key | Method | Articles |
|---|---|---|---|
| Anime News Network | ann |
Google News RSS | ~15 |
| Anime Corner | animecorner |
Direct Scraping | ~12 |
| MyAnimeList | myanimelist |
Direct Scraping | ~15 |
| Otaku USA Magazine | otakuusa |
Google News RSS | ~12 |
| Crunchyroll | crunchyroll |
Google News RSS | ~15 |
| Anime Herald | animeherald |
RSS Feed | ~10 |
| Comic Book | comicbook |
Direct Scraping | ~10 |
Total: 60+ unique articles after cross-source deduplication
Request Flow
| Stage | Component | Description |
|---|---|---|
| 1 | Client | Browser, app, or curl sends request |
| 2 | Vercel Edge / Express | Routes request, applies CORS + rate limit headers |
| 3 | Cache Check | node-cache with 10-min TTL β hit = instant response |
| 4 | Fetch Sources | 7 concurrent scrapers (3 retries each, 15s timeout) |
| 5 | Deduplicate | Cross-source dedup by normalized title |
| 6 | Enrich & Respond | Paginate, sort, format β JSON/RSS/SSE |
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/news |
GET | Latest news with pagination, sorting, source filtering |
/api/news/tags |
GET | Tag listing with counts, or filter by tag |
/api/news/:slug |
GET | Full article content extraction |
/api/search |
GET | Full-text search with relevance scoring |
/api/rss |
GET | RSS 2.0 XML feed |
/api/health |
GET | Status, version, uptime |
/api/stats |
GET | Cache hit/miss metrics |
/api/stream |
GET | Server-Sent Events for real-time push |
/api/openapi |
GET | OpenAPI 3.0.3 specification |
/api/cache/clear |
POST | Manual cache flush |
Sources
| Source | Key | Method |
|---|---|---|
| Anime News Network | ann |
Google News RSS |
| Anime Corner | animecorner |
Direct Scrape |
| MyAnimeList | myanimelist |
Direct Scrape |
| Otaku USA | otakuusa |
Google News RSS |
| Crunchyroll | crunchyroll |
Google News RSS |
| Anime Herald | animeherald |
RSS Feed |
| Comic Book | comicbook |
Direct Scrape |
Latest anime news from all or specific sources.
| Param | Type | Default | Description |
|---|---|---|---|
limit |
1-100 |
20 |
Max articles |
offset |
β₯0 |
0 |
Pagination offset |
sort |
latest|oldest |
latest |
Sort order |
source |
string |
all |
Filter by source key |
refresh |
boolean |
false |
Bypass cache |
curl "https://aninews.vercel.app/api/news?limit=10"
curl "https://aninews.vercel.app/api/news?source=crunchyroll&limit=10&offset=10"π Example Response
{
"success": true,
"data": [{ "title": "Demon Slayer Season 4 Announced", "slug": "ann-demon-slayer-season-4-announced", "source": "Anime News Network", "excerpt": "...", "date": "2026-05-07T10:30:00.000Z", "image": "...", "link": "...", "tags": ["news", "anime"] }],
"meta": { "total": 62, "returned": 10, "offset": 0, "limit": 10, "hasMore": true, "source": "all", "sort": "latest", "responseTime": "234ms" }
}Full-text search with relevance scoring. Title matches rank higher than excerpt matches.
| Param | Required | Description |
|---|---|---|
q |
β | Search query (min 2 chars) |
source |
β | Filter by source |
limit |
β | Max results |
offset |
β | Pagination |
curl "https://aninews.vercel.app/api/search?q=demon+slayer"
curl "https://aninews.vercel.app/api/search?q=manga&source=ann&limit=5"List available tags with counts, or filter articles by tag.
curl "https://aninews.vercel.app/api/news/tags"
curl "https://aninews.vercel.app/api/news/tags?tag=official"Full article content extraction.
curl "https://aninews.vercel.app/api/news/ann-demon-slayer-season-4-announced"Standard RSS 2.0 XML feed. Works with any feed reader.
| Param | Default | Description |
|---|---|---|
source |
all |
Filter by source |
limit |
20 |
Max items |
curl "https://aninews.vercel.app/api/rss"
curl "https://aninews.vercel.app/api/rss?source=crunchyroll&limit=10"Health check, cache statistics, and manual cache flush.
Server-Sent Events (SSE) stream for real-time article notifications. Clients receive new_article events as they're fetched and heartbeat events every 30s to keep the connection alive.
curl -N "https://aninews.vercel.app/api/stream"OpenAPI 3.0.3 specification in JSON format. Use with Swagger UI, Postman, or any OpenAPI-compatible tool.
curl "https://aninews.vercel.app/api/openapi"git clone https://github.com/Shineii86/AniNewsAPI.git
cd AniNewsAPI && npm install && npm run dev
# β http://localhost:3000| Variable | Default | Description |
|---|---|---|
CACHE_TTL |
600 |
Cache duration in seconds |
PORT |
3000 |
Server port (Express mode) |
| Metric | Value |
|---|---|
| Cached response | ~200ms |
| Fresh fetch (all 7) | ~3-6s |
| Cache TTL | 10 minutes |
| Retry attempts | 3 per source |
| Timeout per source | 15 seconds |
| Total articles (avg) | 60+ after dedup |
| Layer | Technology |
|---|---|
| Runtime | Node.js β₯ 18 |
| HTTP | Express 5 / Vercel Functions |
| Scraping | Cheerio + Axios |
| RSS | rss-parser |
| Caching | node-cache + filesystem |
AniNewsAPI/
βββ api/ # Vercel serverless functions
β βββ cache/clear.js # Cache management
β βββ health.js # Health check
β βββ news.js # Main news endpoint
β βββ news/{slug}.js # Article by slug
β βββ news/tags.js # Tag filtering
β βββ rss.js # RSS feed
β βββ search.js # Keyword search
β βββ stats.js # Cache statistics
β βββ stream.js # SSE real-time feed
β βββ openapi.js # OpenAPI 3.0 spec
βββ utils/ # Core logic
β βββ cacheHandler.js # Memory + disk cache
β βββ constants.js # Shared config
β βββ contentParser.js # Article extraction
β βββ dateParser.js # Multi-format date parsing
β βββ fetch*.js # Source scrapers (7 files)
β βββ generateSlug.js # URL-safe slug generator
βββ public/index.html # Landing page (v4.0)
βββ server.js # Express server entry
βββ vercel.json # Vercel routing config
βββ CHANGELOG.md
- Create
utils/fetchNewSource.jsβ export async function returning[{ title, slug, source, excerpt, date, image, link, tags }] - Register in
api/news.jsβSOURCESobject - Test with
npm test, submit a PR
MIT Β© Shinei Nouzen
| Source | About |
|---|---|
| Anime News Network | Industry-leading anime journalism |
| Anime Corner | Community-driven anime news & polls |
| MyAnimeList | The largest anime/manga database |
| Otaku USA Magazine | English-language anime culture magazine |
| Crunchyroll | Official streaming platform news |
| Anime Herald | Anime news, reviews & editorials |
| Comic Book | Anime & manga coverage at ComicBook |
Built with β€οΈ for the anime community
β Star this repo Β· π Report a bug Β· π‘ Request a feature