Skip to content

State boundaries

GEThttps://api.ai4mproject.com/v1/boundaries/statesScope: lga_boundaries

Returns the outline of every state as a GeoJSON FeatureCollection, for drawing a national map.

None.

curl https://api.ai4mproject.com/v1/boundaries/states \
-H "Authorization: Bearer $AI4M_API_KEY"
Field Type Description
type string Always FeatureCollection
source string Where the shapes come from
features[].properties.code string Two-letter state code, matching state_code in the risk endpoints
features[].properties.name string State name
features[].properties.zone string Zone code: NC, NE, NW, SE, SS or SW
features[].geometry object A GeoJSON Polygon or MultiPolygon, in longitude and latitude (WGS 84)
200 OK
{
"type": "FeatureCollection",
"source": "GADM 4.1, simplified",
"features": [
{
"type": "Feature",
"properties": {
"code": "AB",
"name": "Abia",
"zone": "SE"
},
"geometry": {
"type": "Polygon",
"coordinates": [
"…"
]
}
},
{
"type": "Feature",
"properties": {
"code": "AD",
"name": "Adamawa",
"zone": "NE"
},
"geometry": {
"type": "Polygon",
"coordinates": [
"…"
]
}
}
]
}

The example shows two of the 37 states, with coordinates left out.

Code Status When
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.