Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Open-Meteo Air Quality

API 文档
https://api.sandbase.ai/v1/api/open-meteo/air-quality

Hourly air quality forecast for any coordinates: PM2.5, PM10, ozone, NO2, CO, dust, pollen and European/US AQI.

价格
$0.0001美元 / 次调用
方法
POST
响应
JSON
参数
2 个必填 · 12 个可选

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 `nearest`.
Comma-separated list of current-condition variables to return. Same variable set as `hourly`.
Model domain. Default `auto`.
End of the interval, `yyyy-mm-dd` (ISO 8601).
Number of forecast days to return (0-7). Default 5.
Limit forecast to a given number of hours.
Comma-separated list of hourly variables to return. Common values: `pm10`, `pm2_5`, `carbon_monoxide`, `nitrogen_dioxide`, `sulphur_dioxide`, `ozone`, `aerosol_optical_depth`, `dust`, `uv_index`, `ammonia`, `european_aqi`, `us_aqi`, and pollen (`alder_pollen`, `birch_pollen`, `grass_pollen`, `mugwor
Number of past days to include (0-92). Default 0.
Include a given number of past hours.
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 Air Quality API

Returns an hourly air quality forecast for a latitude and longitude. You choose the variables with hourly, such as pm10 and pm2_5, and the response gives one value per hour with its unit.

Use cases

  • Show a PM2.5 and PM10 forecast for a city in a health or weather app.
  • Warn users when the forecast for ozone or NO2 rises above a limit you set.
  • Compare particulate levels across several sites by sending comma-separated coordinates.
  • Add pollen or AQI values to a daily outlook for allergy sufferers.

Request

curl -X POST "https://api.sandbase.ai/v1/api/open-meteo/air-quality" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"latitude": "52.52", "longitude": "13.41", "hourly": "pm10,pm2_5", "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 nearest.
currentstringNoComma-separated list of current-condition variables to return. Same variable set as hourly.
domainsstringNoModel domain. Default auto.
end_datestringNoEnd of the interval, yyyy-mm-dd (ISO 8601).
forecast_daysintegerNoNumber of forecast days to return (0-7). Default 5.
forecast_hoursintegerNoLimit forecast to a given number of hours.
hourlystringNoComma-separated list of hourly variables to return. Common values: pm10, pm2_5, carbon_monoxide, nitrogen_dioxide, sulphur_dioxide, ozone, aerosol_optical_depth, dust, uv_index, ammonia, `european_aqi
past_daysintegerNoNumber of past days to include (0-92). Default 0.
past_hoursintegerNoInclude a given number of past hours.
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": 38.0,
  "generationtime_ms": 0.3840923309326172,
  "hourly": {
    "pm10": [
      15.9
    ],
    "pm2_5": [
      13.0
    ],
    "time": [
      "2026-11-03T00:00"
    ]
  },
  "hourly_units": {
    "pm10": "μg/m³",
    "pm2_5": "μg/m³",
    "time": "iso8601"
  },
  "latitude": 52.5,
  "longitude": 13.400002,
  "timezone": "GMT",
  "timezone_abbreviation": "GMT",
  "utc_offset_seconds": 0
}

Response fields

FieldMeaning
hourly.time[]Timestamp of each hourly step, in ISO 8601 local time for the chosen timezone. Each position lines up with the same position in the other hourly lists.
hourly.pm10[]Forecast concentration of particles up to 10 µm for each hour. The unit is given in hourly_units.pm10.
hourly.pm2_5[]Forecast concentration of fine particles up to 2.5 µm for each hour. The unit is given in hourly_units.pm2_5.
hourly_units.pm10 / hourly_units.pm2_5Unit for each requested variable. In this response both are μg/m³.
hourly_units.timeFormat of the values in hourly.time[]. It is iso8601 here.
latitude / longitudeCoordinates of the grid cell the data comes from. They can differ slightly from the coordinates you sent.
elevationElevation of the grid cell, in the same response as the coordinates. The value here is 38.0.
timezone / timezone_abbreviation / utc_offset_secondsTime zone applied to the timestamps and its offset from UTC in seconds. The default is GMT with an offset of 0.
generationtime_msTime taken to generate the response, in milliseconds.

Notes

  • Each variable you list in hourly adds a matching list under hourly and an entry under hourly_units.
  • Use forecast_days (0-7) for the forecast length and past_days (0-92) to include earlier days. Or set start_date and end_date as yyyy-mm-dd.
  • Set timezone to an IANA name or auto to get local times. Without it, times are in GMT.
  • For weather variables at the same coordinates, call Open-Meteo Weather Forecast. To turn a place name into coordinates, use Open-Meteo Geocoding.

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 Air Quality API?

向 https://api.sandbase.ai/v1/api/open-meteo/air-quality 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Open-Meteo Air Quality API 的价格是多少?

每次调用 $0.0001,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Open-Meteo Air Quality API 接受哪些参数?

必填:latitude (string) 和 longitude (string)。 可选:cell_selection(land, sea, nearest 之一), current (string), domains(auto, cams_europe, cams_global 之一), end_date (string), forecast_days (integer) 和 forecast_hours (integer) 以及另外 6 项。 Parameters 表和本页的 Playground 列出了每个字段。

Open-Meteo Air Quality API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Open-Meteo 开发者账户或 API key 吗?

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