Periods
GET
https://api.ai4mproject.com/v1/periodsAny keyReturns the months the API holds and when the data was last loaded. Call it first to learn the latest estimated month and how far ahead forecasts go.
Parameters
Section titled “Parameters”None.
Request
Section titled “Request”curl https://api.ai4mproject.com/v1/periods \ -H "Authorization: Bearer $AI4M_API_KEY"periods = client.get_periods()print(periods.last_estimated, periods.last_forecast)const periods = await client.getPeriods();console.log(periods.last_estimated, periods.last_forecast);periods, err := client.Periods(ctx)if err != nil { log.Fatal(err)}fmt.Println(periods.LastEstimated, periods.LastForecast)Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
last_estimated |
string | The most recent month with recorded rainfall, as YYYY-MM |
last_forecast |
string | The furthest month ahead that has a forecast |
months |
array | Every month available, oldest first. Each has a period and a kind (estimated or forecast) |
updated_at |
string | When the data was last loaded, as an ISO 8601 time |
model_version |
string | The version of the model that produced the scores |
{ "last_estimated": "2026-07", "last_forecast": "2026-11", "months": [ { "period": "2018-01", "kind": "estimated" }, { "period": "2018-02", "kind": "estimated" } ], "updated_at": "2026-10-04T22:22:54.000Z", "model_version": "ai4m-malaria-1.0"}The example shows the first two of the months. The full list starts at 2018-01.
Errors
Section titled “Errors”Any request can also return 401 for a bad key and 429 when a limit is reached. See Errors.