Developer API
JSON endpoints for other apps · no API key · 60 requests/minute per IP · open Swagger UI
Request GET/api/predict/
Response
Not sent yet— ms
// Press “Send request” to see the live JSON response here.Parameters
| Parameter | Meaning | Allowed |
|---|---|---|
temperature | Today’s mean temperature (°C) | -10 … 55 |
humidity | Mean relative humidity (%) | 0 … 100 |
wind_speed | Mean wind speed (km/h) | 0 … 150 |
pressure | Mean surface pressure (hPa) | 900 … 1100 |
date | Date of the readings | YYYY-MM-DD |
city optional | City slug | alexandria aswan cairo |
model optional | Model to use | best ridge gbr rf |
Response fields
prediction | Tomorrow’s mean temperature (°C); low/high = 95% range |
forecast[] | Days +1 … +7: date, prediction, low, high, normal (seasonal average) |
explain[] | Effect of each input on tomorrow’s forecast (°C vs. average conditions) |
outside_training_range[] | Inputs the model has never seen values like — treat the result with caution |
mae_day1 | Average error of this model on the hold-out period (°C) |
All endpoints
GET
/api/predict/7-day forecast (also accepts POST form fields)GET
/api/latest/?city=cairolatest real daily readings from Open-MeteoPOST
/api/batch/CSV upload (field file); add ?format=csv for CSV outputGET
/api/models/cities, models and their accuracyGET
/api/health/health checkErrors
400 Validation error
{
"errors": {
"humidity": [{
"message": "Ensure this value is less than or equal to 100.0."
}]
}
}429 Rate limit
{
"error": "Rate limit exceeded",
"limit_per_minute": 60
}
// + Retry-After header (seconds)502 Live data unavailable
{
"error": "Could not reach the weather provider: ConnectionError"
}
// /api/latest/ only