Developers

Sourced country data for AI assistants and your own code, free.

The data

Country statistics from World Bank, EIA, Our World in Data and more: economy, people, energy, climate and defence, by year. Anonymous and read only: no key, no account.

AI assistants

Add GeoLens to Claude or ChatGPT as a connector and ask for numbers in plain words; each answer names its source, its licence and when GeoLens last updated it. The server speaks the Model Context Protocol over Streamable HTTP:

https://api.geolens.eu/mcp
  • search_indicators finds an indicator id from plain words.
  • get_series reads yearly values for up to 30 countries or a group.
  • compare ranks a country against a group or its peers.
  • chart_link opens that chart in the editor, ready to restyle.

Claude: Settings, Connectors, Add custom connector, paste the URL.

ChatGPT: Settings, Apps and Connectors, Advanced settings, turn on Developer mode, then Create, paste the URL and pick No authentication.

REST API

Base URL https://api.geolens.eu, JSON out, the full schema in openapi.json. Each IP may make 300 requests a minute; past that the answer is 429 with Retry-After.

GET /api/indicators?q=
Search indicators by words; up to 1,000 a page.
GET /api/indicators/series?props=&isos=
Yearly series: up to 32 indicators by 64 countries in one call.
GET /api/indicators/{prop}/periods?isos=&freq=M
Monthly or quarterly points, up to 30 countries.
GET /api/facts?indicator=&year=&group=&countries=
Ranks, group totals and thresholds, up to 50 countries.
GET /api/facts/groups
The country groups (EU, NATO, G7) and every country code.
GET /api/records?ids=
Cited figures with their provenance, up to 200 ids.

Examples

curl "https://api.geolens.eu/api/indicators?q=gdp+per+capita&pageSize=5"
curl "https://api.geolens.eu/api/indicators/series?props=gdpPerCapita&isos=POL,DEU"
curl "https://api.geolens.eu/api/facts?indicator=gdpPerCapita&group=eu27&countries=POL"

Licence

Cite the source and its licence beside every figure you use, for example: Source: World Bank, through GeoLens (geolens.eu). Licence: CC BY 4.0. Each source's terms are on Data sources.