Skip to content

LGA forecasts

GEThttps://api.ai4mproject.com/v1/forecasts/lgasScope: forecasts

Returns forecast risk scores for every LGA in one state, one report for each month after the latest estimated month.

Name Type Required Description
state string Yes Two-letter state code, such as KN
months integer No How many months ahead to return, from 1 to 4. Defaults to 4

Parameters go in the query string.

curl "https://api.ai4mproject.com/v1/forecasts/lgas?state=KN&months=2" \
-H "Authorization: Bearer $AI4M_API_KEY"
Field Type Description
forecasts array One report per month, nearest month first
forecasts[].period string The month the scores are for
forecasts[].kind string Always forecast for this endpoint
forecasts[].state_code string The state asked for
forecasts[].state string Its name
forecasts[].lgas array The same fields as LGA risk
200 OK
{
"forecasts": [
{
"period": "2026-08",
"kind": "forecast",
"state_code": "KN",
"state": "Kano",
"lgas": [
{
"lga_code": "NGA.20.26_1",
"lga": "Kunchi",
"score": 0.543,
"score_low": 0.273,
"score_high": 0.787,
"level": "very_high",
"is_urban": false,
"population": 170771
},
{
"lga_code": "NGA.20.39_1",
"lga": "Tofa",
"score": 0.536,
"score_low": 0.291,
"score_high": 0.781,
"level": "very_high",
"is_urban": false,
"population": 138370
}
]
},
{
"period": "2026-09",
"kind": "forecast",
"state_code": "KN",
"state": "Kano",
"lgas": [
{
"lga_code": "NGA.20.26_1",
"lga": "Kunchi",
"score": 0.545,
"score_low": 0.295,
"score_high": 0.787,
"level": "very_high",
"is_urban": false,
"population": 170771
},
{
"lga_code": "NGA.20.39_1",
"lga": "Tofa",
"score": 0.543,
"score_low": 0.297,
"score_high": 0.784,
"level": "very_high",
"is_urban": false,
"population": 138370
}
]
}
]
}

The example was requested with months=2 and shows two LGAs in each month.

Code Status When
UNKNOWN_STATE 404 state is missing or is not a valid state code
INVALID_MONTHS 400 months is not a whole number from 1 to 4
SCOPE_REQUIRED 403 The key does not include the scope this endpoint needs

Any request can also return 401 for a bad key and 429 when a limit is reached. See Errors.