Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Open-Meteo Marine Forecast

API 文件
https://api.sandbase.ai/v1/api/open-meteo/marine

Hourly and daily marine forecast by coordinates: wave height, direction and period, swell and ocean currents.

價格
$0.0001美元/次呼叫
方法
POST
回應
JSON
參數
2 個必填 · 11 個選填

Playground

輸入
WGS84 latitude of the location. Multiple coordinates can be comma-separated.
WGS84 longitude of the location (negative for the Americas). Multiple coordinates can be comma-separated.
Grid-cell preference for the coordinate. Default `sea`.
Comma-separated list of current-condition variables to return. Same variable set as `hourly`.
Comma-separated list of daily aggregation variables to return. Requires `timezone`. Common values: `wave_height_max`, `wave_direction_dominant`, `wave_period_max`, `wind_wave_height_max`, `swell_wave_height_max`.
End of the interval, `yyyy-mm-dd` (ISO 8601).
Number of forecast days to return (0-8). Default 5.
Comma-separated list of hourly variables to return. Common values: `wave_height`, `wave_direction`, `wave_period`, `wind_wave_height`, `wind_wave_direction`, `wind_wave_period`, `swell_wave_height`, `swell_wave_direction`, `swell_wave_period`, `ocean_current_velocity`, `ocean_current_direction`, `se
Unit for wave heights. Default `metric`.
Number of past days to include (0-92). Default 0.
Start of the interval, `yyyy-mm-dd` (ISO 8601).
Time output format. Default `iso8601`.
IANA time zone name (e.g. `Europe/Berlin`) or `auto` to resolve from coordinates. Defaults to `GMT`.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Open-Meteo Marine Forecast API

Returns a marine forecast for a latitude and longitude. You choose the hourly, daily or current variables, such as wave height, wave period, swell and ocean current velocity. The request needs latitude and longitude.

Use cases

  • Show an hourly wave height chart for a harbor or sailing route.
  • Check daily maximum wave height and dominant wave direction before a ferry or boat trip.
  • Compare wind wave and swell wave height at a surf spot.
  • Add ocean current velocity and direction to a navigation or fishing planner.

Request

curl -X POST "https://api.sandbase.ai/v1/api/open-meteo/marine" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"latitude": "54.54", "longitude": "10.23", "hourly": "wave_height", "forecast_days": 1}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
latitudestringYesWGS84 latitude of the location. Multiple coordinates can be comma-separated.
longitudestringYesWGS84 longitude of the location (negative for the Americas). Multiple coordinates can be comma-separated.
cell_selectionstringNoGrid-cell preference for the coordinate. Default sea.
currentstringNoComma-separated list of current-condition variables to return. Same variable set as hourly.
dailystringNoComma-separated list of daily aggregation variables to return. Requires timezone. Common values: wave_height_max, wave_direction_dominant, wave_period_max, wind_wave_height_max, swell_wave_height_max.
end_datestringNoEnd of the interval, yyyy-mm-dd (ISO 8601).
forecast_daysintegerNoNumber of forecast days to return (0-8). Default 5.
hourlystringNoComma-separated list of hourly variables to return. Common values: wave_height, wave_direction, wave_period, wind_wave_height, wind_wave_direction, wind_wave_period, swell_wave_height, `swell_wave_direction
length_unitstringNoUnit for wave heights. Default metric.
past_daysintegerNoNumber of past days to include (0-92). Default 0.
start_datestringNoStart of the interval, yyyy-mm-dd (ISO 8601).
timeformatstringNoTime output format. Default iso8601.
timezonestringNoIANA time zone name (e.g. Europe/Berlin) or auto to resolve from coordinates. Defaults to GMT.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "elevation": 0.0,
  "generationtime_ms": 0.10061264038085938,
  "hourly": {
    "time": [
      "2026-11-03T00:00"
    ],
    "wave_height": [
      0.68
    ]
  },
  "hourly_units": {
    "time": "iso8601",
    "wave_height": "m"
  },
  "latitude": 54.541664,
  "longitude": 10.2083435,
  "timezone": "GMT",
  "timezone_abbreviation": "GMT",
  "utc_offset_seconds": 0
}

Response fields

FieldMeaning
hourly.timeList of hourly timestamps in ISO 8601 format, such as 2026-11-03T00:00. The time zone is the one in timezone.
hourly.wave_heightList of wave heights, one value for each entry in hourly.time. Other variables you request in hourly appear as extra lists with the same length.
hourly_units.wave_heightUnit for the wave height values. The example response shows m.
hourly_units.timeFormat of the time values. The example response shows iso8601.
latitude / longitudeCoordinates of the grid cell that the forecast uses. They can differ slightly from the coordinates you sent.
elevationElevation of the grid cell. The example response shows 0.0 for a sea cell.
timezone / timezone_abbreviationTime zone used for the timestamps. The default is GMT.
utc_offset_secondsOffset of the response time zone from UTC, in seconds.
generationtime_msTime taken to generate the response, in milliseconds.

Notes

  • Set daily together with timezone to get daily values such as wave_height_max. Use timezone set to auto to resolve the zone from the coordinates.
  • Use forecast_days (0-8) and past_days (0-92) to set the time range, or use start_date and end_date in yyyy-mm-dd format.
  • cell_selection defaults to sea, so the forecast uses the nearest sea grid cell. Set it to land or nearest to change this.
  • Set length_unit to imperial for wave heights in feet. Check hourly_units for the unit in each response. For land weather at the same point, call Open-Meteo Weather Forecast.

Pricing

$0.0001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Open-Meteo每次呼叫 $0.0001JSON
Open-Meteo每次呼叫 $0.0001JSON
Open-Meteo每次呼叫 $0.0001JSON
Open-Meteo每次呼叫 $0.0001JSON
Open-Meteo每次呼叫 $0.0001JSON
Open-Meteo每次呼叫 $0.0001JSON

問題

常見問題

我要如何使用 Open-Meteo Marine Forecast API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/open-meteo/marine。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Open-Meteo Marine Forecast API 的費用是多少?

每次 $0.0001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Open-Meteo Marine Forecast API 接受哪些參數?

必要:latitude (string) 和 longitude (string)。 選填:cell_selection(land, sea, nearest 之一), current (string), daily (string), end_date (string), forecast_days (integer) 和 hourly (string),以及另外 5 個。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Open-Meteo Marine Forecast API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Open-Meteo 開發者帳號或 API 金鑰嗎?

不需要。Open-Meteo Marine Forecast 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Open-Meteo API 存取權。