{"id":29710724,"url":"https://github.com/shineii86/aninewsapi","last_synced_at":"2025-09-09T11:40:20.632Z","repository":{"id":304833855,"uuid":"1020168548","full_name":"Shineii86/AniNewsAPI","owner":"Shineii86","description":"Real-time Anime News API that scrapes live articles from Crunchyroll \u0026 ANN — supports smart caching, tag filtering, full article content, and Vercel deployment. Built for anime devs.","archived":false,"fork":false,"pushed_at":"2025-07-16T00:57:05.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T05:43:33.907Z","etag":null,"topics":["anime","anime-api","anime-api-free","anime-news","anime-news-network","ann","cheerio","crunchyroll","crunchyroll-api","crunchyroll-downloader","newsapi","otaku","otakudesu","serverless","vercel","webscraper","webscraper-website"],"latest_commit_sha":null,"homepage":"https://aninews.vercel.app","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shineii86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-15T12:52:15.000Z","updated_at":"2025-07-16T00:58:26.000Z","dependencies_parsed_at":"2025-07-16T08:37:52.782Z","dependency_job_id":"c3333ac5-0c5b-4f6f-a2e7-60b19d401f5e","html_url":"https://github.com/Shineii86/AniNewsAPI","commit_stats":null,"previous_names":["shineii86/aninews"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Shineii86/AniNewsAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shineii86%2FAniNewsAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shineii86%2FAniNewsAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shineii86%2FAniNewsAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shineii86%2FAniNewsAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shineii86","download_url":"https://codeload.github.com/Shineii86/AniNewsAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shineii86%2FAniNewsAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266754006,"owners_count":23979146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anime","anime-api","anime-api-free","anime-news","anime-news-network","ann","cheerio","crunchyroll","crunchyroll-api","crunchyroll-downloader","newsapi","otaku","otakudesu","serverless","vercel","webscraper","webscraper-website"],"created_at":"2025-07-23T21:39:48.267Z","updated_at":"2025-07-23T21:39:51.850Z","avatar_url":"https://github.com/Shineii86.png","language":"HTML","readme":"# 📰 Anime News API\n\n![Vercel](https://img.shields.io/badge/Deployed%20On-Vercel-black?logo=vercel)\n![Scraping](https://img.shields.io/badge/Scraper-Cheerio-yellow?logo=javascript)\n![Status](https://img.shields.io/badge/API-Stable-green)\n![License](https://img.shields.io/badge/License-MIT-blue)\n[![Made By](https://img.shields.io/badge/Made%20by-Shinei%20Nouzen-critical)](https://github.com/Shineii86)\n\n![Last Commit](https://img.shields.io/github/last-commit/Shineii86/AniNewsAPI?style=for-the-badge)\n![Repo Size](https://img.shields.io/github/repo-size/Shineii86/AniNewsAPI?style=for-the-badge) [![GitHub Stars](https://img.shields.io/github/stars/Shineii86/AniNewsAPI?style=for-the-badge)](https://github.com/Shineii86/AniNewsAPI/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/Shineii86/AniNewsAPI?style=for-the-badge)](https://github.com/Shineii86/AniNewsAPI/fork)\n[![API Status](https://img.shields.io/website?down_color=lightgrey\u0026down_message=offline\u0026label=API%20Status\u0026style=for-the-badge\u0026up_color=green\u0026up_message=online\u0026url=https%3A%2F%2Faninews.vercel.app)](https://aninews.vercel.app)\n\n\n\u003e 🛰️ A real-time, blazing-fast, tag-filterable Anime News API that fetches fresh articles from multiple reliable sources with smart caching for optimal performance.\n\n---\n\n## 📦 Features\n\n- ⚡ **Real-time Scraping** (no database required)\n- 🔁 **Smart Caching** with auto-refresh (15 minutes)\n- 🏷️ Filter by **tags** and **sources**\n- 📄 Fetch full **article content by slug**\n- 🧩 **Multi-source support**: 5 reliable anime news sources\n- 📥 Ready-to-deploy on [Vercel](https://vercel.com)\n- 🚀 **Improved Error Handling** and response structure\n- 🔄 **Concurrent Fetching** for better performance\n\n---\n\n## 🗞️ News Sources\n\n| Source | Description | Type |\n|--------|-------------|------|\n| **Anime News Network** | Industry-leading anime news | Official |\n| **Anime Corner** | Community-driven anime news | Community |\n| **MyAnimeList** | Popular anime database news | Official |\n| **Otaku USA Magazine** | Anime culture magazine | Community |\n| **Crunchyroll** | Official anime streaming news | Official |\n\n---\n\n## 📡 API Endpoints \n\n### `GET /api/news` \u003csup\u003e`(✅ Stable)`\u003c/sup\u003e\n\nReturns the latest anime news articles from all sources.\n\n#### Query Parameters:\n\n| Param     | Type     | Default     | Description                                  |\n|-----------|----------|-------------|----------------------------------------------|\n| `limit`   | Number   | `10`        | Max number of articles (1-50)               |\n| `sort`    | String   | `latest`    | `latest` or `oldest`                         |\n| `source`  | String   | `all`       | Source filter (see available sources below) |\n\n#### Available Sources:\n- `all` - All sources (default)\n- `ann` - Anime News Network\n- `animecorner` - Anime Corner\n- `myanimelist` - MyAnimeList\n- `otakuusa` - Otaku USA Magazine\n- `crunchyroll` - Crunchyroll\n\n#### Example Response:\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"title\": \"New Anime Series Announced\",\n      \"slug\": \"ann-new-anime-series-announced\",\n      \"source\": \"Anime News Network\",\n      \"excerpt\": \"A new anime series has been announced...\",\n      \"date\": \"2024-01-15T10:30:00.000Z\",\n      \"image\": \"https://example.com/image.jpg\",\n      \"link\": \"https://www.animenewsnetwork.com/news/...\",\n      \"tags\": [\"news\", \"anime-news-network\"]\n    }\n  ],\n  \"meta\": {\n    \"total\": 10,\n    \"source\": \"all\",\n    \"sort\": \"latest\",\n    \"limit\": 10,\n    \"timestamp\": \"2024-01-15T10:30:00.000Z\",\n    \"availableSources\": [\"all\", \"ann\", \"animecorner\", \"myanimelist\", \"otakuusa\", \"crunchyroll\"]\n  }\n}\n```\n\n#### Example Requests:\n```http\nGET /api/news?source=ann\u0026limit=5\u0026sort=latest\nGET /api/news?source=animecorner\u0026limit=3\nGET /api/news?limit=20\u0026sort=oldest\n```\n\n---\n\n### `GET /api/news/tags` \u003csup\u003e`(⚠️ Experimental)`\u003c/sup\u003e\n\nFilter articles by tags (currently supports Crunchyroll only).\n\n#### Query Parameters:\n\n| Param | Type   | Required | Description           |\n|-------|--------|----------|-----------------------|\n| `tag` | String | Yes      | Tag to filter by      |\n\n#### Example:\n```http\nGET /api/news/tags?tag=official\n```\n\n---\n\n### `GET /api/news/[slug]` \u003csup\u003e`(✅ Stable)`\u003c/sup\u003e\n\nGet full article content by slug.\n\n#### Example:\n```http\nGET /api/news/ann-new-anime-series-announced\n```\n\n---\n\n## 🚀 Quick Start\n\n### Deploy to Vercel\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Shineii86/AniNewsAPI)\n\n### Local Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/Shineii86/AniNewsAPI.git\ncd AniNewsAPI\n\n# Install dependencies\nnpm install\n\n# Start development server\nnpm run dev\n\n# API will be available at http://localhost:3000\n```\n\n---\n\n## 🔧 Configuration\n\n### Environment Variables\n\n```env\n# Optional: Set cache duration (in seconds)\nCACHE_TTL=900\n\n# Optional: Set Chrome executable path for Puppeteer\nCHROME_EXECUTABLE_PATH=/usr/bin/chromium-browser\n```\n\n### Caching\n\nThe API uses a two-tier caching system:\n- **Memory Cache**: Fast in-memory storage (15 minutes TTL)\n- **File Cache**: Persistent disk storage for backup\n\n---\n\n## 📊 Performance\n\n- **Response Time**: ~200-500ms (cached)\n- **Concurrent Sources**: 5 sources fetched simultaneously\n- **Cache Duration**: 15 minutes\n- **Rate Limiting**: Built-in via Vercel\n- **Uptime**: 99.9%+\n\n---\n\n## 🛠️ Technical Details\n\n### Architecture\n- **Runtime**: Node.js (Vercel Functions)\n- **Scraping**: Cheerio + Axios\n- **Caching**: Node-cache + File system\n- **Deployment**: Vercel Serverless Functions\n\n### Error Handling\n- Graceful fallback when sources fail\n- Detailed error logging\n- Structured error responses\n- Timeout protection (10s per source)\n\n---\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Adding New Sources\n\nTo add a new anime news source:\n\n1. Create a new scraper in `utils/fetchNewSource.js`\n2. Follow the existing pattern for data structure\n3. Add the source to `api/news.js`\n4. Update the README documentation\n5. Test thoroughly\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- [Anime News Network](https://www.animenewsnetwork.com/) for comprehensive anime news\n- [Anime Corner](https://animecorner.me/) for community-driven content\n- [MyAnimeList](https://myanimelist.net/) for database and news\n- [Otaku USA Magazine](https://otakuusamagazine.com/) for anime culture coverage\n- [Crunchyroll](https://www.crunchyroll.com/) for official anime news\n\n---\n\n## 🔗 Links\n\n- **API Base URL**: `https://aninews.vercel.app`\n- **Documentation**: [GitHub Repository](https://github.com/Shineii86/AniNewsAPI)\n- **Issues**: [GitHub Issues](https://github.com/Shineii86/AniNewsAPI/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Shineii86/AniNewsAPI/discussions)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eMade with ❤️ for the anime community\u003c/p\u003e\n  \u003cp\u003e⭐ Star this repo if you find it useful!\u003c/p\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshineii86%2Faninewsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshineii86%2Faninewsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshineii86%2Faninewsapi/lists"}