Location:
Forecast length:

By default, we provide forecasts for 7 days, but you can access forecasts for up to 16 days.

Note: Current conditions are based on 15-minutely weather model data. Every weather variable available in hourly data, is available as current condition as well.

API Documentation

The /marine endpoint returns wave, swell, and ocean data as JSON for any location. Provide coordinates and select marine variables. Default: 7 days starting at midnight today. Parameters:

latitude longitude Floating point Required
WGS84 latitude and longitude. Comma-separated for multiple locations, e.g. &latitude=52.52,48.85&longitude=13.41,2.35. Multi-location responses return a list; CSV/XLSX add location_id.
hourly String array
Comma-separated list of hourly marine variables, or use multiple &hourly= parameters.
daily String array
Comma-separated list of daily aggregations. Multiple &daily= supported. Requires timezone when used.
current String array
Variables for current conditions (latest values).
timeformat String Default: iso8601
Use unixtime for Unix epoch seconds (GMT). For daily values, add utc_offset_seconds to get the correct local date.
timezone String Default: GMT
Time zone for local timestamps (data starts at 00:00 local). Use any IANA time zone. Set auto to resolve from coordinates. Comma-separated for multiple locations.
past_days Integer (0-92) Default: 0
Include past days (e.g. yesterday) in the response.
forecast_days Integer (0-8) Default: 7
Number of forecast days (default 7, max 8).
forecast_hours past_hours Integer (>0)
Number of hourly timesteps. Uses the current hour as reference instead of midnight.
start_date end_date String (yyyy-mm-dd)
Date range in ISO format, e.g. 2022-06-30.
start_hour end_hour String (yyyy-mm-ddThh:mm)
Time range for hourly data in ISO format, e.g. 2022-06-30T12:00.
length_unit String Default: metric
Units: metric or imperial.
cell_selection String Default: sea
Grid-cell selection: sea (default) prefers ocean; land picks a land cell with similar elevation; nearest picks the closest cell.
api_key String
Your API key for authenticated requests.

New optional parameters may be added over time. Required parameters will not change for API stability.

Hourly Parameter Definition

Available hourly marine variables. Most are instantaneous at the given hour.

wave_height wind_wave_height swell_wave_height secondary_swell_wave_height tertiary_swell_wave_height Instant Meter
Wave height of significant mean, wind and swell waves. Wave directions are always reported as the direction the waves come from. 0° = From north towards south; 90° = From east
wave_direction wind_wave_direction swell_wave_direction secondary_swell_wave_direction tertiary_swell_wave_direction Instant °
Mean direction of mean, wind and swell waves
wave_period wind_wave_period swell_wave_period secondary_swell_wave_period tertiary_swell_wave_period Instant Seconds
Period between mean, wind and swell waves.
wind_wave_peak_period swell_wave_peak_period Instant Seconds
Peak period between wind and swell waves.
ocean_current_velocity Instant km/h (mph, m/s, knots)
Velocity of ocean current considering Eulerian, Waves and Tides.
ocean_current_direction Instant °
Direction following the flow of the current. E.g. where the current is heading towards. 0° = Going north; 90° = Towards east.
sea_surface_temperature Instant Celsius
The sea surface temperature close to the water surface
sea_level_height_msl Instant metre
The sea level height accounts for ocean tides, the inverted barometer effect, sea surface height, global mean steric variation, and global mean mass volume variation. The reference (datum) height is the global mean sea level, not the lowest astronomical tide. Accuracy is limited in coastal areas—while it can be reasonably accurate near unobstructed coasts, it may be completely unreliable further inland. This data is not suitable for coastal navigation.
invert_barometer_height Instant metre
Invert barometer effect is the height low and high pressure systems effect the sea level height. This is already considered in sea_level_height_msl

Daily Parameter Definition

Aggregations are a simple 24 hour aggregation from hourly values. The parameter &daily= accepts the following values:

wave_height_max wind_wave_height_max swell_wave_height_max Meter
Maximum wave height on a given day for mean, wind and swell waves
wave_direction_dominant wind_wave_direction_dominant swell_wave_direction_dominant °
Dominant wave direction of mean, wind and swell waves
wave_period_max wind_wave_period_max swell_wave_period_max Seconds
Maximum wave period of mean, wind and swell
wind_wave_peak_period_max swell_wave_peak_period_max Seconds
Maximum peak period between wind and swell waves.

JSON Return Object

On success a JSON object will be returned.

{
    "latitude": 52.52,
    "longitude": 13.419,
    "generationtime_ms": 2.2119,
    "utc_offset_seconds": 0,
    "timezone": "Europe/Berlin",
    "timezone_abbreviation": "CEST",
    "hourly": {
        "time": ["2022-07-01T00:00", "2022-07-01T01:00", "2022-07-01T02:00", ...],
        "wave_height": [1, 1.7, 1.7, 1.5, 1.5, 1.8, 2.0, 1.9, 1.3, ...]
    },
    "hourly_units": {
        "wave_height": "m"
    },
}
latitude longitude Floating point
WGS84 of the center of the weather grid-cell which was used to generate this forecast. This coordinate might be a few kilometres away from the requested coordinate.
generationtime_ms Floating point
Generation time of the weather forecast in milliseconds. This is mainly used for performance monitoring and improvements.
utc_offset_seconds Integer
Applied timezone offset from the &timezone= parameter.
timezone timezone_abbreviation String
Timezone identifier (e.g. Europe/Berlin) and abbreviation (e.g. CEST)
hourly Object
For each selected weather variable, data will be returned as a floating point array. Additionally a time array will be returned with ISO8601 timestamps.
hourly_units Object
For each selected weather variable, the unit will be listed here.
daily Object
For each selected daily weather variable, data will be returned as a floating point array. Additionally a time array will be returned with ISO8601 timestamps.
daily_units Object
For each selected daily weather variable, the unit will be listed here.

Errors

In case an error occurs, for example a URL parameter is not correctly specified, a JSON error object is returned with a HTTP 400 status code.

{
    "error": true, 
    "reason": "Cannot initialize WeatherVariable from invalid String value
	    temperature_2m for key hourly" 
}