API Documentation - News Service
This API provides structured access to news content with intelligent features like natural language queries, trending articles, and user event tracking.
Core Endpoints
Query API - GET /api/v1/news/query
Trending API - GET /api/v1/news/trending
**Future ToDos:**
- Instead of using time delay, we should implement a scheduled job to more effectively apply the time decay algorithm.
User Events API - POST /api/v1/user-events/register
Specialized Retrieval Endpoints
Category API - GET /api/v1/news/category
Score API - GET /api/v1/news/score
Search API - GET /api/v1/news/search
Source API - GET /api/v1/news/source
Nearby API - GET /api/v1/news/nearby
Common Features
- All endpoints return: Top 5 most relevant articles in JSON format
- Error codes: 400 (bad request), 404 (no results), 500 (server error)
- LLM summaries: All article responses include AI-generated summaries