API access
Read-only local endpoints and export formats.
Repeat list parameters to select multiple values. Supported bounds are YYYY, YYYY-Qn, YYYY-MM and YYYY-MM-DD. Cursors are opaque and bound to their filter set. Match the snapshot ID when paging and exporting.
| Endpoint | Filters and response |
|---|---|
GET /api/v1/indicators | Catalogue with labels, sources and vintage availabilityaccess_tier, source_id, q, theme, country, geo, level, frequency, source_tier, licence, vintage, limit, cursor, snapshotdata, next_cursor, snapshot |
GET /api/v1/observations | Observation rows with values, lineage and source nullsaccess_tier, source_id, indicator, country, geo, level, start, end, frequency, source_tier, vintage, licence, limit, cursor, snapshotdata, next_cursor, snapshot |
POST /api/v1/exports | Data and a metadata and attribution manifestJSON · access_tier, source_id, indicator (required), country, geo, level, start, end, frequency, source_tier, vintage, licence, snapshot, format, shapemetadata, data (JSON) / file + metadata |
Examples
curl "https://stats.pe.ac/api/v1/observations?indicator=population.total&country=UZB&start=2023&end=2024"
import json
from urllib.request import urlopen
with urlopen("https://stats.pe.ac/api/v1/indicators?limit=5") as response:
catalogue = json.load(response)
print(catalogue["data"][0]["id"])
format=csv_long | csv_wide | xlsx | parquet | json | statashape=long | wide{"error":{"code":"invalid_period","message":"…"},"request_id":"…"}
Authorization and console
Local academic queries use an anonymous quota when X-API-Key is omitted. A local key has its own request, row and export byte quotas. Use X-Request-ID to retry a request without charging it twice. Commercial use is limited by source terms.