# Power Plants API
> The WRI Global Power Plant Database as an API — 34,900+ power stations across 167 countries (~5,700 GW total capacity). Look up any plant by its WRI/GPPD id (e.g. WRI1000452 → Three Gorges Dam, 22,500 MW hydro); search by name, country, fuel type or capacity range; or find every power station within a radius of any coordinate (great-circle distance, optional fuel filter). Each record carries the installed capacity (MW), primary fuel (Solar, Hydro, Wind, Gas, Coal, Nuclear, …), country, latitude/longitude, commissioning year and owner. Ideal for energy dashboards, ESG/climate analytics, grid and infrastructure tools.

## 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/powerplants-api/..."
```

## Pricing
- **Free** (Free) — 3,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 40,000 calls/Mo, 8 req/s
- **Pro** ($20/Mo) — 200,000 calls/Mo, 20 req/s
- **Mega** ($48/Mo) — 1,000,000 calls/Mo, 50 req/s

## Endpoints

### Power Plants

#### `GET /v1/nearby` — Power plants within a radius of a coordinate

**Parameters:**
- `lat` (query, optional, string) — Latitude (-90..90) Example: `52.52`
- `lon` (query, optional, string) — Longitude (-180..180) Example: `13.40`
- `radius_km` (query, optional, string) — Search radius in km (1-20000, default 100)
- `fuel` (query, optional, string) — Optional fuel filter
- `limit` (query, optional, string) — Max results (1-100, default 10)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/powerplants-api/v1/nearby?lat=52.52&lon=13.40"
```

**Response:**
```json
{
    "data": {
        "fuel": null,
        "count": 10,
        "total": 128,
        "center": {
            "lat": 52.52,
            "lon": 13.4
        },
        "results": [
            {
                "id": "WRI1005948",
                "fuel": "Gas",
                "name": "Mitte",
                "owner": "Vattenfall Europe Wärme AG",
                "country": "DEU",
                "latitude": 52.5117,
                "longitude": 13.4209,
                "capacity_mw": 444,
                "distance_km": 1.7,
                "country_name": "Germany",
                "commissioning_year": 1996
            },
            {
                "id": "WRI1005950",
                "fuel": "Coal",
                "name": "Berlin-Moabit power station",
                "owner": "Vattenfall Europe AG",
                "country": "DEU",
                "latitude": 52.5374,
                "longitude": 13.3461,
                "capacity_mw": 89,
                "distance_km": 4.1,
                "country_name": "Germany",
                "commissioning_year": 1990
            },
            {
                "id": "WRI1005951",
                "fuel": "Oil",
                "name": "Moabit (Oil)",
                "owner": "Vattenfall Europe Wärme Aktiengesellschaft",
                "country": "DEU",
                "latitude": 52.5374,
                "longitude": 13.3461,
                "capacity_mw": 51,
                "distance_km": 4.1,
                "country_
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/plant` — A single power plant by WRI/GPPD id

**Parameters:**
- `id` (query, optional, string) — WRI/GPPD identifier, e.g. WRI1000452 (Three Gorges Dam) Example: `WRI1000452`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/powerplants-api/v1/plant?id=WRI1000452"
```

**Response:**
```json
{
    "data": {
        "id": "WRI1000452",
        "fuel": "Hydro",
        "name": "Three Gorges Dam",
        "owner": null,
        "country": "CHN",
        "latitude": 30.8235,
        "longitude": 111.0032,
        "capacity_mw": 22500,
        "country_name": "China",
        "commissioning_year": 2003
    },
    "meta": {
        "timestamp": "2026-05-31T03:47:07.273Z",
        "request_id": "9ee13cc4-c7b5-401b-be7c-8766d7980550"
    },
    "status": "ok",
    "message": "Power plant retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search by name with country / fuel / capacity filters

**Parameters:**
- `q` (query, optional, string) — Name / owner search, e.g. hoover
- `country` (query, optional, string) — Country name or ISO3, e.g. Germany or DEU
- `fuel` (query, optional, string) — Primary fuel: Solar, Hydro, Wind, Gas, Coal, Nuclear, Oil, Biomass… Example: `Nuclear`
- `min_mw` (query, optional, string) — Minimum capacity in MW
- `max_mw` (query, optional, string) — Maximum capacity in MW
- `limit` (query, optional, string) — Results per page (1-100, default 20) Example: `20`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/powerplants-api/v1/search?fuel=Nuclear&limit=20&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "limit": 20,
        "query": null,
        "total": 195,
        "offset": 0,
        "filters": {
            "fuel": "nuclear",
            "max_mw": null,
            "min_mw": null,
            "country": null
        },
        "results": [
            {
                "id": "ARG0000029",
                "fuel": "Nuclear",
                "name": "ATUCHA I",
                "owner": "NASA",
                "country": "ARG",
                "latitude": -33.967,
                "longitude": -59.2059,
                "capacity_mw": 370,
                "country_name": "Argentina",
                "commissioning_year": 1974
            },
            {
                "id": "ARG0000030",
                "fuel": "Nuclear",
                "name": "ATUCHA II",
                "owner": "NASA",
                "country": "ARG",
                "latitude": -33.9674,
                "longitude": -59.2045,
                "capacity_mw": 745,
                "country_name": "Argentina",
                "commissioning_year": 2014
            },
            {
                "id": "ARG0000112",
                "fuel": "Nuclear",
                "name": "EMBALSE",
                "owner": "NASA",
                "country": "ARG",
                "latitude": -32.2316,
                "longitude": -64.4422,
                "capacity_mw": 648,
                "country_name": "Argentina",
                "commissioning_year": 1984
            
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Totals, capacity & fuel breakdown

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

**Response:**
```json
{
    "data": {
        "note": "id = WRI/GPPD identifier. Capacity in megawatts (MW).",
        "fuels": [
            {
                "fuel": "Solar",
                "count": 10665
            },
            {
                "fuel": "Hydro",
                "count": 7156
            },
            {
                "fuel": "Wind",
                "count": 5344
            },
            {
                "fuel": "Gas",
                "count": 3998
            },
            {
                "fuel": "Coal",
                "count": 2330
            },
            {
                "fuel": "Oil",
                "count": 2320
            },
            {
                "fuel": "Biomass",
                "count": 1430
            },
            {
                "fuel": "Waste",
                "count": 1068
            },
            {
                "fuel": "Nuclear",
                "count": 195
            },
            {
                "fuel": "Geothermal",
                "count": 189
            },
            {
                "fuel": "Storage",
                "count": 135
            },
            {
                "fuel": "Other",
                "count": 43
            },
            {
                "fuel": "Cogeneration",
                "count": 41
            },
            {
                "fuel": "Petcoke",
                "count": 12
            },
            {
                "fuel": "Wave and Tidal",
                "count": 10
            }

…(truncated, see openapi.json for full schema)
```


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