# geoBoundaries API
> Open administrative boundaries as an API, powered by geoBoundaries — the open database of political administrative boundaries built by the William & Mary geoLab. For more than 200 countries and every administrative level — ADM0 (national), ADM1 (states, provinces or regions), ADM2 (counties or districts) and on down to ADM4/ADM5 local units — get the boundary's metadata (official name, the source agency that produced it, the data licence, the year represented, the number of administrative units and the mean vertex count) together with direct download links to the geometry in full-resolution GeoJSON, a simplified GeoJSON, TopoJSON and a ZIP bundle; list every administrative level available for a country with its unit count and download link; and browse the full catalogue of countries that have boundaries. The geometry itself is delivered as standard GeoJSON/TopoJSON files at the returned URLs, ready to drop into Leaflet, Mapbox, QGIS, deck.gl or any GIS pipeline. Ideal for mapping and visualisation, choropleths, spatial joins, geofencing, election and census cartography and location analytics. ISO codes are 3-letter (DEU, USA, BRA); administrative levels are ADM0 to ADM5. Data from the geoBoundaries project (CC-BY 4.0).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/geoboundaries-api/..."
```

## Pricing
- **Free** (Free) — 590 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 20,800 calls/Mo, 6 req/s
- **Pro** ($20/Mo) — 89,500 calls/Mo, 15 req/s
- **Mega** ($54/Mo) — 372,000 calls/Mo, 40 req/s

## Endpoints

### Boundaries

#### `GET /v1/boundary` — A country boundary at one level

**Parameters:**
- `iso` (query, required, string) — ISO3 country code, e.g. DEU Example: `DEU`
- `adm` (query, required, string) — Admin level ADM0-ADM5 Example: `ADM1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoboundaries-api/v1/boundary?iso=DEU&adm=ADM1"
```

**Response:**
```json
{
    "data": {
        "boundary": {
            "iso": "DEU",
            "name": "Germany",
            "year": "2021",
            "level": "ADM1",
            "source": "Federal Agency for Cartography and Geodesy",
            "license": "Data license Germany - Attribution - Version 2.0",
            "download": {
                "zip": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1-all.zip",
                "geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1.geojson",
                "topojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1.topojson",
                "simplified_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1_simplified.geojson"
            },
            "canonical": "Länder",
            "license_url": null,
            "mean_vertices": 8850,
            "admin_unit_count": 16
        }
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:02.207Z",
        "request_id": "adf09f3d-171f-4430-be4c-7de32366f6a1"
    },
    "status": "ok",
    "message": "Boundary retrieved",
    "success": true
}
```

#### `GET /v1/countries` — The country catalogue

**Parameters:**
- `q` (query, optional, string) — Filter by name or ISO, e.g. brazil

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoboundaries-api/v1/countries"
```

**Response:**
```json
{
    "data": {
        "count": 230,
        "query": null,
        "total": 230,
        "countries": [
            {
                "iso": "ABW",
                "name": "Aruba",
                "year": "2021",
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/ABW/ADM0/geoBoundaries-ABW-ADM0.geojson"
            },
            {
                "iso": "AFG",
                "name": "Afghanistan",
                "year": "2014",
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/AFG/ADM0/geoBoundaries-AFG-ADM0.geojson"
            },
            {
                "iso": "AGO",
                "name": "Angola",
                "year": "2021",
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/AGO/ADM0/geoBoundaries-AGO-ADM0.geojson"
            },
            {
                "iso": "AIA",
                "name": "Anguilla",
                "year": "2021",
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/AIA/ADM0/geoBoundaries-AIA-ADM0.geojson"
            },
            {
                "iso": "ALB",
                "name": "Albania",
                "year": "2003",
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/ALB/ADM0/geoBoundaries-ALB-ADM0.geojson"
            },
       
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/levels` — Admin levels available for a country

**Parameters:**
- `iso` (query, required, string) — ISO3 country code Example: `DEU`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoboundaries-api/v1/levels?iso=DEU"
```

**Response:**
```json
{
    "data": {
        "iso": "DEU",
        "count": 4,
        "levels": [
            {
                "name": "Germany",
                "year": "2021",
                "level": "ADM0",
                "admin_unit_count": 1,
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM0/geoBoundaries-DEU-ADM0.geojson",
                "download_simplified": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM0/geoBoundaries-DEU-ADM0_simplified.geojson"
            },
            {
                "name": "Germany",
                "year": "2021",
                "level": "ADM1",
                "admin_unit_count": 16,
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1.geojson",
                "download_simplified": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM1/geoBoundaries-DEU-ADM1_simplified.geojson"
            },
            {
                "name": "Germany",
                "year": "2021",
                "level": "ADM2",
                "admin_unit_count": 38,
                "download_geojson": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM2/geoBoundaries-DEU-ADM2.geojson",
                "download_simplified": "https://github.com/wmgeolab/geoBoundaries/raw/9469f09/releaseData/gbOpen/DEU/ADM2/geoBoundaries-DEU-ADM2_
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoboundaries-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Open administrative boundaries for 200+ countries at every level — ADM0 (national), ADM1 (states/provinces/regions), ADM2 (counties/districts) down to ADM4/5 (local). /v1/boundary?iso=DEU&adm=ADM1 = a boundary's metadata (official name, source agency, licence, year represented, number of administrative units, mean vertex count) together with direct download links to the full-resolution and simplified GeoJSON, the TopoJSON and a ZIP bundle; /v1/levels?iso=DEU = every administrative level available for a country, each with its unit count and GeoJSON download link; /v1/countries (optional q= name/ISO filter) = the full catalogue of countries with an ADM0 boundary. ISO codes are 3-letter (DEU, USA, BRA); levels are ADM0-ADM5. The geometry itself is served as GeoJSON/TopoJSON files at the returned download URLs (use them in any GIS or mapping library). Data from the geoBoundaries project, CC-BY 4.0. For country facts see the Countries API, for geocoding the Geocoding API, for elevation the Elevation API.",
        "source": "geoBoundaries — W&M geoLab (geoboundaries.org)",
        "endpoints": [
            "/v1/boundary",
            "/v1/levels",
            "/v1/countries",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:03.045Z",
        "request_id": "6149cb99-6ac6-4f72-bfab-e64591244dc0"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/geoboundaries-api
OpenAPI spec: https://www.oanor.com/api/geoboundaries-api/openapi.json
