Retrieve the population count for a Geometry or NUTS ID.

<aside> 🌍 Coverage: Global

</aside>

ENDPOINTS

GET /population
POST /population

Retrieve Population data with a GET request

Parameter Description Mandatory
aoi_id calculate statistics for an AOI No
nuts_id calculate statistics for a NUTS area (only Europe) No
bbox calculate statistics for a comma separated bounding box (southwestLng, southwestLat, northeastLng, northeastLat) No

Returns

Returns a GeoJson Object with population data.

GET /population

curl

curl <https://api.riscognition.io/population?aoi_id=YOUR-I\\>
-H "Authorization: Bearer YOUR-API-KEY" \\

# NUTS example with api-key as query param 
curl <https://api.riscognition.io/population?nuts_id=DE21&key=YOUR-API-KEY>

python

params = {'aoi_id': 'YOUR_ID'}
headers = {'Authorization': 'Bearer YOUR-API-KEY'}
response = requests.get("<https://api.riscognition.io/population>, params=params, headers=headers)

Retrieve Population data with a POST request

The payload has to be in JSON!

GeoJSON Geometry:

{
  "geometry": {
    "type": "Polygon",
    "coordinates": [...]
  }
}

or one of “aoi_id”, “nuts_id”, “bbox” (or use the GET request)

{
  "aoi_id": "YOUR-ID"
}
or
{
  "nuts_id": "DE21"
}
or
{
  "bbox": "-3.4373,38.2748,-3.1887,38.4654"
}

Returns

Returns a GeoJson Object with population data.

POST /population

curl

curl <https://api.riscognition.io/population> \\
-H "Authorization: Bearer YOUR-API-KEY" \\
-H "Content-Type: application/json" \\
-X POST \\
-d '{"geometry": { "type": "Polygon", "coordinates": [...]}}'

python

aoi = {
  "geometry": {
    "type": "Polygon",
    "coordinates": [...]
  }
}

headers = {'Authorization': 'Bearer YOUR-API-KEY', 'Content-Type': 'application/json'}
response = requests.post("<https://api.riscognition.io/population>", json=aoi, headers=headers)