Loading
Loading
Access real-time and forecast marine weather data for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Each response includes ocean wave parameters, wind wave data, and swell information with daily, hourly, or minutely precision for up to 16 days ahead.
The Marine Weather API delivers wave height, wave direction, wave period, wind wave data, and swell wave data. By default the API returns current marine conditions. When a date range is specified via startDate and endDate the API switches to forecast mode. The maximum forecast range is 16 days. When no location parameter is provided the API auto-detects the requesting IP address.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
All parameters are optional query string parameters. Pass location, lat/long, or ipto specify a target. If none are provided the API resolves marine data for the calling machine's IP address. Use startDate and endDate to switch to forecast mode. Use precision to control forecast granularity.
startDateoptionalstringStarting date for which to fetch marine forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
endDateoptionalstringEnd date for which to fetch marine forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
locationoptionalstringSpecifies the target location. It can be a city name, place name, or a complete address (e.g., "Lahore", "Paris, France", "1600 Amphitheatre Parkway, Mountain View, CA").
latoptionalfloatLatitude of the target location. Must be used together with "long".
longoptionalfloatLongitude of the target location. Must be used together with "lat".
ipoptionalstringIPv4 or IPv6 address used to infer location. Defaults to the requester’s public IP if not provided.
precisionoptionalstringdefault: dailySet the data precision: "daily" for daily, "hourly" for hourly, and "minutely" for minute-level data. Defaults to "daily".
timezoneoptionalstringSpecifies the timezone for returned results. Defaults to the resolved location’s timezone.
A successful request returns a 200 OK response with a JSON object. The top-level object always contains location. When a date range is provided the response also contains a forecast object keyed by date. See the response preview on the right for the full JSON structure.
locationLocation object. Can be with coordinates, IP, or location string depending on input.
forecastAn object keyed by date (YYYY-MM-DD). Each date entry contains daily, hourly, or minutely marine weather data depending on the precision parameter.
When a lookup is performed using 'lat'/'long' parameters, the location object includes the following fields:
latitudeGeographic latitude coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole).
longitudeGeographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East).
country_nameFull name of the country corresponding to the provided coordinates.
state_provState, province, or primary administrative division name for the location.
cityCity or municipal area name associated with the coordinate location.
localitySpecific locality, neighborhood, district, or village name within the broader area.
elevationHeight above mean sea level in meters for the specified coordinates.
timezoneIANA timezone database identifier for the location (e.g., America/New_York, Europe/London).
timezone_abbreviationAbbreviated timezone representation based on current offset (e.g., EST, GMT, PST).
The daily forecast object contains the following marine weather fields:
timestampISO 8601 formatted timestamp.
wave_height_maxHighest recorded significant mean wave height throughout the day, measured in meters (m), representing the peak wave conditions during the 24-hour period.
wave_direction_dominantMost frequently occurring wave direction for mean waves during the day, expressed in degrees (°) from north.
wave_period_maxLongest time interval in seconds (s) between consecutive mean wave crests recorded throughout the day.
wind_wave_height_maxPeak height of wind-generated waves measured in meters (m) within the 24-hour period, representing the maximum locally-driven wave conditions.
wind_wave_direction_dominantPrevailing directional bearing in degrees (°) for wind waves throughout the day, indicating the most common source direction.
wind_wave_period_maxLongest duration in seconds (s) between wind wave crests observed during the daily period.
wind_wave_peak_period_maxMaximum peak period in seconds (s) for wind waves during the day, representing the interval of the most energetic wind-driven wave component.
swell_wave_height_maxHighest swell wave elevation in meters (m) recorded throughout the day for waves originating from distant weather systems.
swell_wave_direction_dominantPrimary direction in degrees (°) from which swell waves approached during the day, representing the most common swell orientation.
swell_wave_period_maxLongest time interval in seconds (s) between swell wave peaks recorded during the 24-hour period.
swell_wave_peak_period_maxMaximum peak period in seconds (s) for swell waves throughout the day, indicating the interval of the most powerful swell component.
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
Location not found