🌍 gaia20

European Regions API

Fast in-memory API for European NUTS regions and LAU cities. Blazing fast queries with full Greek text search support.

✨ Features

Quick Start

List all NUTS3 regions

curl https://gaia20.atha.gr/api/v1/datasets/nuts/regions?level=3

Search Greek cities

curl "https://gaia20.atha.gr/api/v1/datasets/nuts/regions?level=4&search=Αθήνα"

Get specific region

curl https://gaia20.atha.gr/api/v1/datasets/nuts/regions/EL301

Get child regions

curl https://gaia20.atha.gr/api/v1/datasets/nuts/regions/EL301/children

API Endpoints

GET /health
Health check with dataset status and uptime
GET /metrics
Prometheus metrics endpoint
GET /api/v1/datasets
List available datasets with statistics
GET /api/v1/datasets/nuts/regions
List or search NUTS regions
Query params: level (0-4), search, limit, offset
GET /api/v1/datasets/nuts/regions/{code}
Get a specific region by NUTS code
GET /api/v1/datasets/nuts/regions/{code}/children
Get all child regions of a parent region

Response Format

{
  "data": [
    {
      "code": "EL301",
      "label": "Βόρειος Τομέας Αθηνών",
      "level": 3,
      "parent_code": "EL30",
      "population": 650000,
      "full_path": "Ελλάδα > Αττική > Βόρειος Τομέας Αθηνών",
      "matched_lau_cities": ["Μαρούσι", "Κηφισιά"]
    }
  ],
  "meta": {
    "total": 7,
    "limit": 100,
    "offset": 0,
    "search_ms": 2.3
  }
}

NUTS Hierarchy

Configuration

Environment variables:

GAIA20_HOST=0.0.0.0                           # Server host
GAIA20_PORT=8080                              # Server port
GAIA20_LOG_LEVEL=info                         # Log level (debug|info|warn|error)
GAIA20_LOG_FORMAT=json                        # Log format (json|text)
GAIA20_NUTS_DATA_PATH=./data/nuts/regions.tsv # Data file path
GAIA20_METRICS_ENABLED=true                   # Enable Prometheus metrics

Performance