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

Open-Meteo Weather Forecast

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

Up to 16-day hourly, daily and current weather forecast by coordinates: temperature, precipitation, wind, cloud cover and more.

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

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 `land`.
Comma-separated list of current-condition variables to return. Common values: `temperature_2m`, `relative_humidity_2m`, `apparent_temperature`, `is_day`, `precipitation`, `weather_code`, `wind_speed_10m`, `wind_direction_10m`.
Comma-separated list of daily aggregation variables to return. Requires `timezone`. Common values: `temperature_2m_max`, `temperature_2m_min`, `temperature_2m_mean`, `precipitation_sum`, `rain_sum`, `snowfall_sum`, `weather_code`, `sunrise`, `sunset`, `sunshine_duration`, `wind_speed_10m_max`, `uv_i
Manual elevation (meters) for statistical downscaling. Defaults to a 90m DEM. Use `nan` to disable downscaling.
End of the interval, `yyyy-mm-dd` (ISO 8601).
Number of forecast days to return (0-16). Default 7.
Limit the forecast to a given number of hours from now.
Comma-separated list of hourly variables to return. Common values: `temperature_2m`, `relative_humidity_2m`, `dew_point_2m`, `apparent_temperature`, `precipitation`, `rain`, `showers`, `snowfall`, `weather_code`, `pressure_msl`, `cloud_cover`, `wind_speed_10m`, `wind_direction_10m`, `wind_gusts_10m`
Comma-separated 15-minutely variables (Central Europe & North America high-resolution models only).
Comma-separated forecast models to use. Default `auto` selects the best model mix per location.
Number of past days to include (0-92). Default 0.
Include a given number of past hours.
Precipitation unit. Default `mm`.
Start of the interval, `yyyy-mm-dd` (ISO 8601).
Temperature unit. Default `celsius`.
Time output format. Default `iso8601`.
IANA time zone name (e.g. `Europe/Berlin`) or `auto` to resolve from coordinates. Defaults to `GMT`.
Wind speed unit. Default `kmh`.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Open-Meteo Weather Forecast API

Returns a weather forecast for one point on Earth. You send latitude and longitude, plus the variables you want in current, hourly, daily or minutely_15. The response holds the values and their units.

Use cases

  • Show the current temperature and wind speed on a city dashboard.
  • Plan outdoor events with a daily forecast of rain, wind and temperature highs and lows.
  • Feed hourly temperature and precipitation into an energy demand or irrigation model.
  • Add a short weather summary to a travel app for a given destination.

Request

curl -X POST "https://api.sandbase.ai/v1/api/open-meteo/forecast" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"latitude": "52.52", "longitude": "13.41", "current": "temperature_2m,wind_speed_10m"}'

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 land.
currentstringNoComma-separated list of current-condition variables to return. Common values: temperature_2m, relative_humidity_2m, apparent_temperature, is_day, precipitation, weather_code, wind_speed_10m, `wind_direction
dailystringNoComma-separated list of daily aggregation variables to return. Requires timezone. Common values: temperature_2m_max, temperature_2m_min, temperature_2m_mean, precipitation_sum, rain_sum, snowfall_sum, `weat
elevationstringNoManual elevation (meters) for statistical downscaling. Defaults to a 90m DEM. Use nan to disable downscaling.
end_datestringNoEnd of the interval, yyyy-mm-dd (ISO 8601).
forecast_daysintegerNoNumber of forecast days to return (0-16). Default 7.
forecast_hoursintegerNoLimit the forecast to a given number of hours from now.
hourlystringNoComma-separated list of hourly variables to return. Common values: temperature_2m, relative_humidity_2m, dew_point_2m, apparent_temperature, precipitation, rain, showers, snowfall, weather_code, `pressu
minutely_15stringNoComma-separated 15-minutely variables (Central Europe & North America high-resolution models only).
modelsstringNoComma-separated forecast models to use. Default auto selects the best model mix per location.
past_daysintegerNoNumber of past days to include (0-92). Default 0.
past_hoursintegerNoInclude a given number of past hours.
precipitation_unitstringNoPrecipitation unit. Default mm.
start_datestringNoStart of the interval, yyyy-mm-dd (ISO 8601).
temperature_unitstringNoTemperature unit. Default celsius.
timeformatstringNoTime output format. Default iso8601.
timezonestringNoIANA time zone name (e.g. Europe/Berlin) or auto to resolve from coordinates. Defaults to GMT.
wind_speed_unitstringNoWind speed unit. Default kmh.

Example response

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

{
  "current": {
    "interval": 900,
    "temperature_2m": 4.6,
    "time": "2026-11-03T07:30",
    "wind_speed_10m": 7.4
  },
  "current_units": {
    "interval": "seconds",
    "temperature_2m": "°C",
    "time": "iso8601",
    "wind_speed_10m": "km/h"
  },
  "elevation": 38.0,
  "generationtime_ms": 0.12421607971191406,
  "latitude": 52.512604,
  "longitude": 13.419517,
  "timezone": "GMT",
  "timezone_abbreviation": "GMT",
  "utc_offset_seconds": 0
}

Response fields

FieldMeaning
current.timeTime of the current reading, in the format set by timeformat. The example value is 2026-11-03T07:30, in the time zone given by timezone.
current.intervalLength of the current-conditions interval. The matching entry in current_units is seconds, so 900 means 15 minutes.
current.temperature_2m / current.wind_speed_10mCurrent air temperature at 2 m and wind speed at 10 m. These keys appear because they were listed in current. Each variable you request adds a key here.
current_unitsUnit for each key in current, such as °C for temperature_2m and km/h for wind_speed_10m. Unit parameters like temperature_unit and wind_speed_unit change these.
latitude / longitudeCoordinates of the grid cell the forecast belongs to. They can differ slightly from the coordinates you sent.
elevationElevation of the location in meters. Set the elevation parameter to override it.
timezone / timezone_abbreviationTime zone used for all timestamps in the response. It is GMT unless you set timezone.
utc_offset_secondsOffset of the response time zone from UTC, in seconds.
generationtime_msTime taken to generate the response, in milliseconds.

Notes

  • Only the variables you list in current, hourly, daily or minutely_15 come back. A request with no variable list returns just the location and time zone fields.
  • daily needs timezone. Set it to an IANA name like Europe/Berlin, or to auto to resolve it from the coordinates.
  • Use forecast_days (0-16) for the range, or start_date and end_date in yyyy-mm-dd format. Use past_days to include earlier days.
  • To look up coordinates from a place name, call Open-Meteo Geocoding. For older dates, use Open-Meteo Historical Weather.

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 Weather Forecast API?

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

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

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

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

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

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

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

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

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