Sand AISand AI MAGI-2MAGI-2 è ora su SandBase: video in 1080p con audio nativoProvalo ora

Open-Meteo Air Quality

Documentazione 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.

Prezzo
$0.0001USD / chiamata
Metodo
POST
Risposta
JSON
Parametri
2 obbligatori · 12 opzionali

Playground

Input
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`.
OutputPronto

Il tuo output apparirà qui

Completa gli input, poi fai clic su Esegui.

README API

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.

Esplora altro

API correlate

Tutte le API
APIPrezzoRisposta
Open-Meteo$0.0001 per chiamataJSON
Open-Meteo$0.0001 per chiamataJSON
Open-Meteo$0.0001 per chiamataJSON
Open-Meteo$0.0001 per chiamataJSON
Open-Meteo$0.0001 per chiamataJSON
Open-Meteo$0.0001 per chiamataJSON

Domande

FAQ

Come uso l'API Open-Meteo Air Quality?

Invia una richiesta POST a https://api.sandbase.ai/v1/api/open-meteo/air-quality con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.

Quanto costa l'API Open-Meteo Air Quality?

$0.0001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.

Quali parametri accetta l'API Open-Meteo Air Quality?

Richiesti: latitude (string) e longitude (string). Facoltativi: cell_selection (uno tra land, sea, nearest), current (string), domains (uno tra auto, cams_europe, cams_global), end_date (string), forecast_days (integer) e forecast_hours (integer) e altri 6. La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.

Cosa restituisce l'API Open-Meteo Air Quality?

Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.

Mi serve un account sviluppatore o una chiave API Open-Meteo?

No. Open-Meteo Air Quality funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Open-Meteo.