---
title: "Hourly marine forecast with optional extended variables"
method: GET
path: "/api/v1/weather/marine/hourly"
tags: ["Environment"]
---

# Hourly marine forecast with optional extended variables

`GET /api/v1/weather/marine/hourly`

Hourly marine forecast: wave conditions, ocean currents, sea temperature. Optional `variables` parameter opens the widened Open-Meteo hourly palette (wind_wave_direction, wind_wave_period, wind_wave_peak_period, swell_wave_direction, swell_wave_period, swell_wave_peak_period, ocean_current_direction, sea_level_height_msl, invert_barometer_height). Optional `past_days` adds retrospective lookback up to 92 days. Leaving both unset preserves the legacy response shape.

## Query parameters

- `latitude` number, nullable — Latitude in decimal degrees (-90 to 90).
- `longitude` number, nullable — Longitude in decimal degrees (-180 to 180).
- `city` string, nullable — City name (alternative to lat/lon).
- `country` string, nullable — Country code (ISO 3166-1 alpha-2/alpha-3) or slug.
- `hours` integer — Forecast hours (1-168).
- `variables` string, nullable — Optional comma-separated list of hourly marine variables. When set, enables the extended palette including wind_wave_direction, wind_wave_period, wind_wave_peak_period, swell_wave_direction, swell_wave_period, swell_wave_peak_period, ocean_current_direction, sea_level_height_msl, invert_barometer_height. Leave unset for legacy payload.
- `past_days` integer — Optional historical lookback in days (0-92). Defaults to 0.

## Response `200`

Hourly marine forecast.

- EnvelopeWeatherMarineHourlyData
  - `data` WeatherMarineHourlyData, required — Response model for /weather/marine/hourly (hourly-series shape).
    - `latitude` number, nullable — Latitude in decimal degrees.
    - `longitude` number, nullable — Longitude in decimal degrees.
    - `hourly` WeatherMarineHourlyPoint[], nullable — Per-hour marine samples.
      - `timestamp` string, nullable — ISO timestamp of the hourly sample.
      - `wave_height_m` number, nullable — Significant wave height (m).
      - `wave_direction_deg` integer, nullable — Mean wave direction (degrees).
      - `wave_period_s` number, nullable — Mean wave period (s).
      - `wind_wave_height_m` number, nullable — Wind-wave height (m).
      - `swell_wave_height_m` number, nullable — Swell-wave height (m).
      - `sea_surface_temperature_c` number, nullable — Sea-surface temperature (C).
      - `ocean_current_velocity_kmh` number, nullable — Ocean current velocity (km/h).
    - `source` string, nullable — Upstream source identifier.
  - `meta` SugraMeta, required — Metadata attached to every /api/v1/* response envelope.
    - `endpoint` string, required — Requested endpoint path.
    - `data_time` string, required — ISO 8601 UTC timestamp of the source data, not of the request.
    - `response_time` string, required — ISO 8601 UTC timestamp when this response was produced.
    - `provider` string, required — API name and version.
    - `source` string, nullable — Identifier of the primary upstream source used for this response.
    - `attribution` string, nullable — Human-readable attribution mandated by an upstream source (e.g. a securities regulator or self-regulatory organization). Present only on responses whose source requires the owner and source to be clearly identified. Do not remove or alter it when using the response.
    - `fallback_used` boolean, nullable — True when the primary source failed and a fallback produced the data.
    - `fallback_chain` string[], nullable — Ordered list of sources attempted, in the order they were tried.
    - `cached` boolean, nullable — True when this response was served from the internal cache.
    - `stale` boolean, nullable — True when the cached response was returned after the upstream rate-limited or errored. Clients can use this to detect degraded data.

## Other responses

- `401` — Missing or invalid `x-api-key` header.
- `422` — Validation Error
- `429` — Daily rate limit exceeded. Check `X-RateLimit-Reset` for the next window.
- `503` — Upstream source is temporarily unavailable. Retry after a short delay.

---

[API](https://skmtc.net/sugra/apis/sugra-api.md) · [All operations](https://skmtc.net/sugra/apis/sugra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sugra/sugra-api/versions/4e2740743eb4/schema)
