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

問題

常見問題

我要如何使用 Open-Meteo Air Quality API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/open-meteo/air-quality。您也可以直接在本頁的 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 金鑰嗎?

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