Free and Open Source API for Nepali News Sources - Scrape, aggregate, and access Nepali news articles in JSON format with automatic updates every 4 hours.
Nepali News API is a free, open-source news aggregation service that scrapes top Nepali news sources and provides clean, structured JSON data. Perfect for developers building news apps, researchers analyzing Nepali media, or anyone needing programmatic access to Nepali news content.
- π 100% Free - No API keys, no rate limits, no subscriptions
- π Auto-Updated - Fresh news every 4 hours via GitHub Actions
- π Open Source - Transparent, extensible, and community-driven
- π± Easy Integration - Simple JSON endpoints for quick implementation
- π³π΅ Unicode Support - Proper Nepali text encoding (UTF-8)
- π Plug & Play - No backend setup required for API consumers
Access the API directly - no authentication required:
# Get today's aggregated news
curl https://raw.githubusercontent.com/gaurovgiri/newsapi/refs/heads/master/data/today.json
# Get news from a specific date (format: YYYY-MM-DD)
curl https://raw.githubusercontent.com/gaurovgiri/newsapi/refs/heads/master/data/2024-12-12.jsonJavaScript:
fetch('https://raw.githubusercontent.com/gaurovgiri/newsapi/refs/heads/master/data/today.json')
.then(res => res.json())
.then(data => console.log(`${data.total_articles} articles from ${data.sources.length} sources`));Python:
import requests
data = requests.get('https://raw.githubusercontent.com/gaurovgiri/newsapi/refs/heads/master/data/today.json').json()
print(f"{data['total_articles']} articles available")β‘οΈ See Quick Start Guide for more examples
git clone https://github.com/gaurovgiri/newsapi.git
cd newsapi
pip install -r requirements.txt
python main.py{
"scrape_date": "2024-12-12",
"scrape_time": "06:00:15",
"total_articles": 156,
"sources": ["News24", "Kathmandu Post", "Ekantipur", "Nagarik News"],
"articles": [
{
"title": "Article Title in Nepali or English",
"link": "https://example.com/article",
"description": "Article summary or excerpt",
"published_date": "2024-12-12T10:30:00",
"source": "News24",
"language": "ne"
}
]
}β‘οΈ See API Usage Guide for detailed documentation and examples
| Source | Language | Website |
|---|---|---|
| News24 | Nepali | news24nepal.tv |
| Kathmandu Post | English | kathmandupost.com |
| Ekantipur | Nepali | ekantipur.com |
| Nagarik News | Nepali | nagariknews.nagariknetwork.com |
Want to add more sources? See Contributing Guide
newsapi/
βββ main.py # Main scraper orchestrator
βββ news_source.py # Abstract base class for scrapers
βββ requirements.txt # Python dependencies
βββ run_scraper.sh # Shell script for automation
βββ sources/ # Modular news source scrapers
β βββ __init__.py
β βββ _template.py # Template for new sources
β βββ news24.py
β βββ kathmandu_post.py
β βββ ekantipur.py
β βββ nagarik_news.py
βββ data/ # Generated JSON files
β βββ today.json # Latest scrape (always current)
β βββ YYYY-MM-DD.json # Historical date-stamped files
βββ .github/
βββ workflows/
βββ scrape-news.yml # Automated scraping workflow
β
Modular Architecture - Each news source in a separate, maintainable module
β
Template-Based - Easy-to-use template for adding new sources
β
Date-Stamped Archives - Historical data preserved with date-based filenames
β
Automated Updates - GitHub Actions runs scraper every 4 hours
β
Error Handling - Graceful failures with detailed logging
β
Unicode Support - Proper UTF-8 encoding for Nepali Devanagari script
β
No Database Required - Lightweight JSON file storage
β
GitHub-Hosted - Free hosting and CDN via GitHub Raw
| Document | Description |
|---|---|
| Quick Start | Get up and running in minutes |
| API Usage Guide | Complete API documentation with examples |
| Contributing Guide | How to add new news sources |
| Automation Guide | Set up automated scraping |
- π± News Apps - Build mobile or web applications with real-time Nepali news
- π Data Analysis - Research Nepali media trends and content patterns
- π€ Chatbots - Integrate news feeds into AI assistants
- π§ News Digests - Create automated news summary emails
- π Alert Systems - Monitor specific topics or keywords
- π Archive Projects - Build historical news databases
Contributions are welcome! Whether you want to add a new news source, fix bugs, or improve documentation:
- π° Add News Sources - See Contributing Guide
- π Report Bugs - Open an issue
- π‘ Suggest Features - Share your ideas in discussions
- β Star the Repo - Show your support!
See LICENSE for full details.
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: docs/
Special thanks to:
- All Nepali news sources for providing accessible content
- The open-source community for inspiration and tools
- Contributors who help expand and improve this project
Made with β€οΈ for the Nepali developer community