Skip to main content

Population Explorer API: Usage Guide

This document provides a step-by-step guide on how to use the Population Explorer API to query population statistics for a specific geographic area.


1. API Endpoint

Base URL:
https://www.populationexplorer.com/api/geodata/population/


2. Authentication

To use the API, include your authentication token in the request header:
Authorization: Token your_token_here


3. Request Format

The API expects a POST request with the following structure:

  • Headers:

    • Authorization: Token-based authentication.
    • Content-Type: application/json.
  • Body: A GeoJSON object defining the geographic area of interest.

Example Request

curl -H "Authorization: Token your_token_here" \
-H "Content-Type: application/json" \
-X POST -d '{
"type": "Polygon",
"coordinates": [[[6.94625616073608, 50.9500866975338, 0.0], [6.95224285125733, 50.9498568863318, 0.0], [6.95370197296143, 50.9480183558104, 0.0], [6.95383071899414, 50.9458147270956, 0.0], [6.95183515548706, 50.9442058769703, 0.0], [6.94780111312866, 50.9434893123546, 0.0], [6.942458152771, 50.9443275566572, 0.0], [6.9428014755249, 50.9479777991703, 0.0], [6.94625616073608, 50.9500866975338, 0.0]]]
}' \
https://www.populationexplorer.com/api/geodata/population/