Ask the same questions from code
Everything on the map is available as JSON or CSV: the same questions, the same parameters, the same provenance. Open data needs no key; GVCdtLab licensed data needs an API key tied to an authorised account.
Interactive reference (OpenAPI) openapi.json Create account
Quick start
1 · List questions
curl -s https://geonia.warin.ca/api/v1/questions?lang=en
2 · Read parameters
curl -s https://geonia.warin.ca/api/v1/questions/macro-map
3 · Get the answer
curl -s "https://geonia.warin.ca/api/v1/questions/macro-map/answer?indicator=FP.CPI.TOTL.ZG&year=2024"
Worked examples
Python — world inflation in 2024, ranked
import requests
base = "https://geonia.warin.ca/api/v1"
ans = requests.get(f"{base}/questions/macro-map/answer",
params={"indicator": "FP.CPI.TOTL.ZG", "year": "2024", "lang": "en"}).json()
print(ans["headline"])
for row in ans["table"]["rows"][:10]:
print(row["name"], row["value"])
for p in ans["provenance"]:
print(p["name"], p["license"], p["fetched_at"], p["cache"])
R — Canada's trade redirection (licensed)
library(httr2)
ans <- request("https://geonia.warin.ca/api/v1/questions/trade-redirection/answer") |>
req_url_query(dropped_importer = "United States", dropped_exporter = "China", product = "all") |>
req_headers("X-API-Key" = Sys.getenv("GEONIA_API_KEY")) |>
req_perform() |>
resp_body_json()
ans$headline
SQL — query the warehouse directly (licensed)
curl -s -X POST https://geonia.warin.ca/api/v1/sql \
-H "X-API-Key: $GEONIA_API_KEY" -H "Content-Type: application/json" \
-d '{"query": "SELECT product_label, count(*) AS markets FROM cca_export WHERE cca_tau > 0 GROUP BY 1 ORDER BY 2 DESC LIMIT 10"}'
Raw live data
curl -s "https://geonia.warin.ca/api/v1/data/wdi/SP.POP.TOTL?countries=CAN;MEX;USA&date=2000:2024" curl -s "https://geonia.warin.ca/api/v1/data/fred/DEXCAUS?start=2024-01-01" curl -s "https://geonia.warin.ca/api/v1/data/imf/NGDP_RPCH?countries=CAN,USA" curl -s "https://geonia.warin.ca/api/v1/data/bis/policy-rates?start=2024-01"
Endpoints
GET
Catalogue by research direction
/api/v1/questionsCatalogue by research direction
GET
Parameters, sources, method and caveats
/api/v1/questions/{id}Parameters, sources, method and caveats
GET
Valid values of a dynamic parameter
/api/v1/questions/{id}/options/{param}Valid values of a dynamic parameter
GET
Answer: headline, map, chart, table, notes, provenance (format=json|csv)
/api/v1/questions/{id}/answerAnswer: headline, map, chart, table, notes, provenance (format=json|csv)
GET
Sources, licences and access classes
/api/v1/sourcesSources, licences and access classes
GET
Indicators for a place at its level: world/WLD, region/SSF, economy/KEN, subnational/CA-QC (indicators=a,b,c)
/api/v1/places/{level}/{code}Indicators for a place at its level: world/WLD, region/SSF, economy/KEN, subnational/CA-QC (indicators=a,b,c)
GET
Country boundaries (GeoJSON)
/api/v1/geo/countriesCountry boundaries (GeoJSON)
GET
Context layers (GeoJSON)
/api/v1/layers/ports · /layers/minesContext layers (GeoJSON)
GET
Live pass-through to public sources, cached with provenance
/api/v1/data/{wdi|fred|imf|bis}/…Live pass-through to public sources, cached with provenance
GET
Street level: firms (REQ), industries & location quotients, Québec supply chains, estimated jobs grid, MTMD traffic
/api/v1/local/summary · /firms · /employment · /supply-chain · /traffic?bbox=w,s,e,nStreet level: firms (REQ), industries & location quotients, Québec supply chains, estimated jobs grid, MTMD traffic
GET
Québec GDP per grid cell, downscaled from GDP by industry with REQ jobs and calibrated to StatCan GDP by CMA; cells refine with the box
/api/v1/local/gdp?bbox=w,s,e,n&calibrate=trueQuébec GDP per grid cell, downscaled from GDP by industry with REQ jobs and calibrated to StatCan GDP by CMA; cells refine with the box
GET
Census units in view — Québec (REQ) or Île-de-France (SIRENE, IRIS and communes) — with indicators, estimated GDP, aggregate statistics and quarterly series
/api/v1/units?bbox=w,s,e,n&level=da|ct|csd|iris|com&indicator=§or=Census units in view — Québec (REQ) or Île-de-France (SIRENE, IRIS and communes) — with indicators, estimated GDP, aggregate statistics and quarterly series
GET
Quarterly SIRENE establishment panel for Île-de-France (active, creations, closures, salaried jobs), newest first
/api/v1/panel/sirene?level=idf|com|iris&uid=|bbox=&start=2000Q1&format=csvQuarterly SIRENE establishment panel for Île-de-France (active, creations, closures, salaried jobs), newest first
GET
Quarterly REQ panel (active, entries, exits, jobs) by census unit and sector, newest first
/api/v1/panel/req?level=qc|csd|ct|da&uid=|bbox=&start=1996Q1&format=csvQuarterly REQ panel (active, entries, exits, jobs) by census unit and sector, newest first
GET
Current weather and 3-day outlook (Open-Meteo)
/api/v1/local/weather?lat=&lon=Current weather and 3-day outlook (Open-Meteo)
GET
Live AIS ships (aisstream.io key required)
/api/v1/live/vessels?bbox=Live AIS ships (aisstream.io key required)
GET
Any Statistics Canada table, as the statcanR package does it
/api/v1/data/statcan/search?q= · /{table} · /{table}/metadata · /{table}/series?members=a|bAny Statistics Canada table, as the statcanR package does it
GET
Warehouse tables (licensed)
/api/v1/sql/schemaWarehouse tables (licensed)
POST
One read-only SELECT, 5,000 rows, 15 s (licensed)
/api/v1/sqlOne read-only SELECT, 5,000 rows, 15 s (licensed)
Principles
- Reliable public sources are queried live, never bulk-downloaded; every response is cached with its URL, timestamp, version and SHA-256 fingerprint.
- If a source is down, the last copy is served and flagged as stale.
- Access classes: open (no key) and licensed (key from an authorised account). Sensitive data is never served by the platform.
- Answers distinguish association, prediction and causation; caveats are part of the answer.