API Endpoints
Health Check
GET /
Returns a welcome message.
Response:
Latest Report
GET /latest
Returns the most recent available price report as JSON.
Response: 200 OK (JSON)
{
"date": "2026-07-31",
"items": [
{
"category": "Vegetables",
"item": "Beans",
"market": "Dambulla",
"price": 335.00,
"unit": "Rs/kg"
}
]
}
List Reports
GET /reports
Lists all available report dates.
Response: 200 OK (text)
price_report_20260731.json
price_report_20260730.json
price_report_20260728.json
Specific Date
GET /reports/{date}
Returns a specific date's report.
Parameter: date — YYYYMMDD format
Example: GET /reports/20260731
Response: 200 OK (JSON)
Error: 404 Not Found
Report not found for 20260731. Use /reports to see available dates