---
title: "Marine and atmospheric weather for a location"
method: GET
path: "/api/v0/weather"
tags: ["Weather"]
---

# Marine and atmospheric weather for a location

`GET /api/v0/weather`

## Request

- Base URL: `https://api.datalastic.com`
- URL: `https://api.datalastic.com/api/v0/weather`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in query parameter `api-key`
- TypeScript: <https://skmtc.dev/datalastic/apis/datalastic-maritime-api/docs/api/v0/weather/get.ts> (a function with typed inputs; its response is checked against the schema)

One weather picture for a location: marine conditions merged with
general atmospheric conditions, covering current conditions plus 7-day
daily and hourly forecasts.

Pass exactly one location group: coordinates (`lat` + `lon`), one
vessel identifier (`mmsi`, `imo`, or `uuid`), or one port identifier
(`port_unlocode` or `port_uuid`). A vessel identifier resolves
dynamically to the ship's last known position.

Responses return plain numeric values. The unit of each field is given
in that field's description.

**Credit cost:** 1 credit per request.

## Query parameters

- `lat` number, float
- `lon` number, float
- `mmsi` string
- `imo` string
- `uuid` string, uuid
- `port_unlocode` string
- `port_uuid` string, uuid
- `mode` string[]

## Response `200`

Weather for the resolved location.

- object
  - `data` Weather
    - `location` object: GeoJSON Point Feature for the resolved location. `properties.type` is `Coordinates Point`, `Vessel`, or `Port`, with the matching identifying fields populated.
      - `type` string
      - `geometry` object
        - `type` string
        - `coordinates` number[]: [longitude, latitude]
      - `properties` object
    - `weather` object: The conditions, one section per requested mode. `current` holds a single reading. `hourly` holds a 7-day forecast as one array per field. `daily` holds 7-day aggregates under renamed fields.
      - `latitude` number, float
      - `longitude` number, float
      - `generationtime_ms` number, float
      - `utc_offset_seconds` integer
      - `timezone` string
      - `timezone_abbreviation` string
      - `elevation` number, float
      - `current` WeatherReading: One set of conditions. Used for `current` and, as the element type, for the arrays inside `hourly`. Daily aggregates use renamed fields, see the `daily` property of `Weather`.
        - `time` string: Timestamp of the reading or forecast step, ISO 8601, GMT.
        - `interval` integer: Reading window in seconds. Present in `current` only.
        - `temperature_2m` number: Air temperature at 2 m above surface, in degrees Celsius.
        - `precipitation` number: Precipitation amount, in millimetres.
        - `weather_code` integer, nullable: WMO weather interpretation code.
        - `wind_speed_10m` number: Wind speed at 10 m above surface, in knots.
        - `wind_direction_10m` number: Wind direction at 10 m above surface, in degrees.
        - `wind_gusts_10m` number: Wind gusts at 10 m above surface, in knots.
        - `cloud_cover` number: Total cloud cover, in percent.
        - `relative_humidity_2m` number: Relative humidity at 2 m above surface, in percent.
        - `dew_point_2m` number: Dew point at 2 m above surface, in degrees Celsius.
        - `apparent_temperature` number: Feels-like temperature, in degrees Celsius.
        - `visibility` number: Horizontal visibility, in metres.
        - `pressure_msl` number: Air pressure at mean sea level, in hPa.
        - `wave_height` number: Significant height of combined waves, in metres.
        - `wave_direction` number: Mean direction of combined waves, in degrees.
        - `wave_period` number: Mean period of combined waves, in seconds.
        - `wind_wave_height` number: Wind wave height, in metres.
        - `wind_wave_direction` number: Wind wave direction, in degrees.
        - `wind_wave_period` number: Wind wave mean period, in seconds.
        - `wind_wave_peak_period` number: Wind wave peak period, in seconds.
        - `swell_wave_height` number: Primary swell height, in metres.
        - `swell_wave_direction` number: Primary swell direction, in degrees.
        - `swell_wave_period` number: Primary swell mean period, in seconds.
        - `swell_wave_peak_period` number: Primary swell peak period, in seconds.
        - `secondary_swell_wave_height` number: Secondary swell height, in metres.
        - `secondary_swell_wave_direction` number: Secondary swell direction, in degrees.
        - `secondary_swell_wave_period` number: Secondary swell mean period, in seconds.
        - `tertiary_swell_wave_height` number: Tertiary swell height, in metres. Hourly mode only.
        - `tertiary_swell_wave_direction` number: Tertiary swell direction, in degrees. Hourly mode only.
        - `tertiary_swell_wave_period` number: Tertiary swell mean period, in seconds. Hourly mode only.
        - `sea_surface_temperature` number: Sea surface temperature, in degrees Celsius.
        - `invert_barometer_height` number: Inverse barometer effect on sea level, in metres.
        - `sea_level_height_msl` number: Sea level height above mean sea level, in metres.
        - `ocean_current_velocity` number: Ocean current speed, in km/h.
        - `ocean_current_direction` number: Ocean current direction, in degrees.
      - `hourly` object: 7-day hourly forecast. Each key is a field name from `WeatherReading` and each value is an array of readings aligned with the `time` array.
      - `daily` object: 7-day daily aggregates. Because these are aggregates rather than instantaneous readings, the fields are renamed: `temperature_2m_max`, `temperature_2m_min`, `apparent_temperature_max`, `apparent_temperature_min`, `precipitation_sum`, `wind_speed_10m_max`, `wind_direction_10m_dominant`, `wind_gusts_10m_max`, `wave_height_max`, `wave_direction_dominant`, `wave_period_max`, `wind_wave_height_max`, `wind_wave_direction_dominant`, `wind_wave_period_max`, `wind_wave_peak_period_max`, `swell_wave_height_max`, `swell_wave_direction_dominant`, `swell_wave_period_max`, `swell_wave_peak_period_max`. Units match the base fields. Humidity, dew point, visibility, pressure, cloud cover, weather code, sea surface temperature, sea level, ocean current, and secondary and tertiary swell have no daily aggregate and appear in `current` and `hourly` only.
  - `meta` Meta
    - `duration` number, float: Server-side query time in seconds.
    - `endpoint` string
    - `success` boolean
    - `next` string: Pagination token. Present on paginated endpoints (`/vessel_find`) only when more results exist. Pass it back as the `next` query parameter to fetch the following page.

## Other responses

- `400`: Missing required parameter or invalid parameter value.
- `401`: Invalid or expired API key.
- `402`: API key is valid but the credit balance is exhausted or the subscription has expired. Purchase more credits to continue.
- `404`: Requested vessel, port, or resource was not found. No credits deducted.
- `429`: More than 600 API calls in a single minute. The response carries a `Retry-After` header with the wait in seconds. Use it for backoff.
- `500`: Server-side error. Retry the request.

## Changes

- **2026-09-08** `a29cf323d1c3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/changes/api/v0/weather/get.md)

---

[API](https://skmtc.dev/datalastic/apis/datalastic-maritime-api.md) - [All operations](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/revisions/2097cdbffcb4?raw)
