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.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
All parameters are optional query string parameters. Pass location, lat/long, or ip to 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.
formatoptionalStringdefault: jsonResponse format: 'json'.
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.
date (Object)
Address Lookup (Object), Coordinates Lookup (Object), IP Lookup (Object)
timestamp (String), wave_height (Float), wave_direction (Float), wave_period (Float), wind_wave_height (Float), …
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
Location not found