{
  "openapi": "3.1.1",
  "info": {
    "title": "GeoLens open data API",
    "description": "Anonymous, read-only country statistics with their source and licence. 300 requests a minute per IP. Cite the source and licence of every figure; per-source terms: https://geolens.eu/data. The same data for AI assistants: the MCP server at https://api.geolens.eu/mcp. Docs: https://geolens.eu/developers.",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.geolens.eu"
    }
  ],
  "paths": {
    "/api/records": {
      "get": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/facts/groups": {
      "get": {
        "tags": [
          "Facts"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/facts": {
      "get": {
        "tags": [
          "Facts"
        ],
        "parameters": [
          {
            "name": "indicator",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "threshold",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "countries",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1990
            }
          },
          {
            "name": "step",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/indicators/{prop}/periods": {
      "get": {
        "tags": [
          "IndicatorPeriods"
        ],
        "parameters": [
          {
            "name": "prop",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "iso",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isos",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "freq",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "M"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/indicators": {
      "get": {
        "tags": [
          "IndicatorSearch"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tier",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "props",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "partOf",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collapse",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/indicators/series": {
      "get": {
        "tags": [
          "IndicatorSeriesBatch"
        ],
        "parameters": [
          {
            "name": "props",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isos",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Records"
    },
    {
      "name": "Facts"
    },
    {
      "name": "IndicatorPeriods"
    },
    {
      "name": "IndicatorSearch"
    },
    {
      "name": "IndicatorSeriesBatch"
    }
  ]
}