# Climate API
> Classify any location's climate with the Köppen-Geiger system — the standard used across geography, ecology, agriculture and architecture. Provide a location's twelve monthly mean temperatures and precipitation totals and get back its climate code (for example Cfb or BWh), the climate group and full name, a description, and a block of derived statistics (annual mean temperature, annual precipitation, warmest and coldest month, driest month, months above 10 °C, summer-precipitation share and the aridity threshold). The hemisphere is auto-detected from the temperature curve, or you can set it explicitly. A reference endpoint returns all thirty Köppen-Geiger codes with names, groups, descriptions and example cities. Every endpoint accepts input via the query string or the request body and returns lean JSON. Pure server-side computation (no third-party upstream), so responses are instant and always available. Ideal for EdTech and geography tools, AgTech and crop-suitability apps, architecture and GIS pipelines.

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

## Pricing
- **Free** (Free) — 14,000 calls/Mo, 4 req/s
- **Basic** ($5/Mo) — 175,000 calls/Mo, 12 req/s
- **Pro** ($15/Mo) — 1,300,000 calls/Mo, 40 req/s
- **Mega** ($39/Mo) — 6,500,000 calls/Mo, 130 req/s

## Endpoints

### Climate

#### `GET /v1/classify` — Köppen-Geiger code from monthly data

**Parameters:**
- `monthly_temp` (query, required, string) — 12 monthly mean temps °C (Jan..Dec) Example: `5,5,7,9,13,16,18,18,15,11,7,5`
- `monthly_precip` (query, required, string) — 12 monthly precip mm (Jan..Dec) Example: `55,41,42,44,49,45,45,50,49,69,59,55`
- `hemisphere` (query, optional, string) — north|south (auto-detected) Example: `north`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climate-api/v1/classify?monthly_temp=5%2C5%2C7%2C9%2C13%2C16%2C18%2C18%2C15%2C11%2C7%2C5&monthly_precip=55%2C41%2C42%2C44%2C49%2C45%2C45%2C50%2C49%2C69%2C59%2C55&hemisphere=north"
```

#### `GET /v1/code` — Single code detail

**Parameters:**
- `code` (query, required, string) — Köppen code Example: `Cfb`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climate-api/v1/code?code=Cfb"
```

#### `GET /v1/codes` — All Köppen-Geiger codes

**Parameters:**
- `group` (query, optional, string) — Tropical|Arid|Temperate|Continental|Polar Example: `Polar`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climate-api/v1/codes?group=Polar"
```


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