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.0001 每次调用JSON
Open-Meteo$0.0001 每次调用JSON
Open-Meteo$0.0001 每次调用JSON
Open-Meteo$0.0001 每次调用JSON
Open-Meteo$0.0001 每次调用JSON
Open-Meteo$0.0001 每次调用JSON

问题

常见问题

如何使用 Open-Meteo Weather Forecast API?

向 https://api.sandbase.ai/v1/api/open-meteo/forecast 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 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 key 吗?

不需要。Open-Meteo Weather Forecast 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Open-Meteo API 访问权限。