Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Open-Meteo Marine Forecast

Tài liệu 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.

Giá
$0.0001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
2 bắt buộc · 11 tùy chọn

Phòng thử nghiệm

Đầu vào
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`.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

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.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Open-Meteo$0.0001 mỗi lần gọiJSON
Open-Meteo$0.0001 mỗi lần gọiJSON
Open-Meteo$0.0001 mỗi lần gọiJSON
Open-Meteo$0.0001 mỗi lần gọiJSON
Open-Meteo$0.0001 mỗi lần gọiJSON
Open-Meteo$0.0001 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Open-Meteo Marine Forecast?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/open-meteo/marine với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Open-Meteo Marine Forecast có giá bao nhiêu?

$0.0001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Open-Meteo Marine Forecast chấp nhận những tham số nào?

Bắt buộc: latitude (string) và longitude (string). Tùy chọn: cell_selection (một trong số land, sea, nearest), current (string), daily (string), end_date (string), forecast_days (integer) và hourly (string) và 5 mục khác. Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Open-Meteo Marine Forecast trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Open-Meteo không?

Không. Open-Meteo Marine Forecast chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Open-Meteo.