# Marine & Surf Forecast API
> Marine and surf forecasts as an API, powered by Open-Meteo — clean JSON, no key. Get the current sea state and the hourly and daily wave forecast for any coastline by latitude/longitude or simply by place name: significant wave height, period and direction, plus the swell and wind-wave components broken out separately, and daily maxima and dominant directions. A built-in geocoding helper turns a place name into coordinates. Forecasts run up to ten days ahead. Live forecast data straight from Open-Meteo's marine model. Ideal for surf-report apps, sailing and boating tools, coastal and marine-operations dashboards and beach widgets. 4 data endpoints. Authenticated with an x-oanor-key; fair-use rate limits per plan.

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

## Pricing
- **Free** (Free) — 4,000 calls/Mo, 5 req/s
- **Starter** ($6/Mo) — 55,000 calls/Mo, 15 req/s
- **Pro** ($24/Mo) — 280,000 calls/Mo, 30 req/s
- **Mega** ($80/Mo) — 1,100,000 calls/Mo, 80 req/s

## Endpoints

### Forecast

#### `GET /v1/daily` — Daily wave & swell forecast

**Parameters:**
- `place` (query, optional, string) — Place name (or latitude/longitude) Example: `Biarritz`
- `days` (query, optional, string) — Forecast days (1–10) Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marine-api/v1/daily?place=Biarritz&days=5"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "daily": [
            {
                "time": "2026-06-08",
                "wave_height_max": 1.72,
                "wave_period_max": 9.4,
                "wind_wave_height_max": 0.22,
                "swell_wave_height_max": 1.72,
                "swell_wave_period_max": 7.95,
                "wave_direction_dominant": 303,
                "swell_wave_direction_dominant": 303
            },
            {
                "time": "2026-06-09",
                "wave_height_max": 1.44,
                "wave_period_max": 8.95,
                "wind_wave_height_max": 0.32,
                "swell_wave_height_max": 1.42,
                "swell_wave_period_max": 7.65,
                "wave_direction_dominant": 307,
                "swell_wave_direction_dominant": 307
            },
            {
                "time": "2026-06-10",
                "wave_height_max": 1.66,
                "wave_period_max": 9.8,
                "wind_wave_height_max": 0.3,
                "swell_wave_height_max": 1.66,
                "swell_wave_period_max": 8.3,
                "wave_direction_dominant": 309,
                "swell_wave_direction_dominant": 309
            },
            {
                "time": "2026-06-11",
                "wave_height_max": 1.56,
                "wave_period_max": 9.3,
                "wind_wave_height_max": 0.4,
                "swell_wave_height_max": 1.56,
                "swell_wave_period_max": 7.8,
        
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/forecast` — Current sea state + daily summary

**Parameters:**
- `place` (query, optional, string) — Coastal place name (or use latitude/longitude) Example: `Nazare`
- `latitude` (query, optional, string) — Latitude
- `longitude` (query, optional, string) — Longitude

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marine-api/v1/forecast?place=Nazare"
```

**Response:**
```json
{
    "data": {
        "daily": [
            {
                "time": "2026-06-08",
                "wave_height_max": 2.26,
                "wave_period_max": 8.65,
                "wind_wave_height_max": 0.9,
                "swell_wave_height_max": 2.12,
                "swell_wave_period_max": 8.05,
                "wave_direction_dominant": 312,
                "swell_wave_direction_dominant": 306
            },
            {
                "time": "2026-06-09",
                "wave_height_max": 2.74,
                "wave_period_max": 7.65,
                "wind_wave_height_max": 2.18,
                "swell_wave_height_max": 2.02,
                "swell_wave_period_max": 8.35,
                "wave_direction_dominant": 330,
                "swell_wave_direction_dominant": 308
            },
            {
                "time": "2026-06-10",
                "wave_height_max": 2.78,
                "wave_period_max": 8.05,
                "wind_wave_height_max": 1.62,
                "swell_wave_height_max": 2.14,
                "swell_wave_period_max": 7.8,
                "wave_direction_dominant": 334,
                "swell_wave_direction_dominant": 320
            }
        ],
        "units": {
            "wave_height": "m",
            "wave_period": "s",
            "wave_direction": "°"
        },
        "current": {
            "time": "2026-06-08T02:15",
            "wave_height": 2.1,
            "wave_period": 8.55,
            "wave_direction": 31
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/hourly` — Hourly wave & swell forecast

**Parameters:**
- `place` (query, optional, string) — Place name (or latitude/longitude) Example: `Honolulu`
- `latitude` (query, optional, string) — Latitude
- `longitude` (query, optional, string) — Longitude
- `days` (query, optional, string) — Forecast days (1–10) Example: `2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marine-api/v1/hourly?place=Honolulu&days=2"
```

**Response:**
```json
{
    "data": {
        "count": 48,
        "hourly": [
            {
                "time": "2026-06-07T00:00",
                "wave_height": 1.2,
                "wave_period": 8.55,
                "wave_direction": 146,
                "wind_wave_height": 0.7,
                "swell_wave_height": 0.6,
                "swell_wave_period": 10.3,
                "swell_wave_direction": 185
            },
            {
                "time": "2026-06-07T01:00",
                "wave_height": 1.2,
                "wave_period": 8.5,
                "wave_direction": 145,
                "wind_wave_height": 0.72,
                "swell_wave_height": 0.58,
                "swell_wave_period": 10.35,
                "swell_wave_direction": 186
            },
            {
                "time": "2026-06-07T02:00",
                "wave_height": 1.22,
                "wave_period": 8.4,
                "wave_direction": 143,
                "wind_wave_height": 0.76,
                "swell_wave_height": 0.58,
                "swell_wave_period": 10.4,
                "swell_wave_direction": 187
            },
            {
                "time": "2026-06-07T03:00",
                "wave_height": 1.24,
                "wave_period": 8.35,
                "wave_direction": 142,
                "wind_wave_height": 0.78,
                "swell_wave_height": 0.58,
                "swell_wave_period": 10.4,
                "swell_wave_direction": 187
            },
            {
  
…(truncated, see openapi.json for full schema)
```

### Reference

#### `GET /v1/geocode` — Place name to coordinates

**Parameters:**
- `query` (query, required, string) — Place name Example: `Honolulu`
- `limit` (query, optional, string) — Max results (1–20) Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marine-api/v1/geocode?query=Honolulu&limit=5"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "query": "Honolulu",
        "results": [
            {
                "name": "Honolulu",
                "region": "Hawaii",
                "country": "United States",
                "latitude": 21.30694,
                "timezone": "Pacific/Honolulu",
                "longitude": -157.85834,
                "population": 350964,
                "country_code": "US"
            },
            {
                "name": "Honolulu",
                "region": "North Carolina",
                "country": "United States",
                "latitude": 35.36294,
                "timezone": "America/New_York",
                "longitude": -77.28163,
                "country_code": "US"
            },
            {
                "name": "Honolulu",
                "region": "Karas Region",
                "country": "Namibia",
                "latitude": -27.98517,
                "timezone": "Africa/Windhoek",
                "longitude": 18.77134,
                "country_code": "NA"
            },
            {
                "name": "Honolulu",
                "region": "Central Finland",
                "country": "Finland",
                "latitude": 62.02538,
                "timezone": "Europe/Helsinki",
                "longitude": 26.07524,
                "country_code": "FI"
            },
            {
                "name": "Honolulu Zoo",
                "region": "Hawaii",
                "country": "United States",
 
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "service": "marine-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/daily": "Daily wave/swell forecast (days=).",
            "GET /v1/hourly": "Hourly wave/swell forecast (days=).",
            "GET /v1/geocode": "Resolve a place name to coordinates.",
            "GET /v1/forecast": "Current sea state + daily summary (place= or latitude=&longitude=)."
        },
        "description": "Marine & surf forecasts via Open-Meteo: current sea state and hourly/daily wave & swell forecasts (height, period, direction; swell and wind waves) by latitude/longitude or place name, plus a place→coordinates geocoding helper. Real forecast data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:12.452Z",
        "request_id": "bb27b5f5-1add-4e5b-b99f-a97dc67dc516"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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