IQAir Live City Ranking
https://api.sandbase.ai/v1/api/iqair/live-city-rankingReal-time global city air quality rankings sorted by AQI descending. Returns up to 122 major cities with current AQI values, geographic metadata, and follower counts.
- Prezzo
- $0.01USD / chiamata
- Metodo
- POST
- Risposta
- JSON asincrono
- Parametri
- 0 obbligatori · 0 opzionali
Playground
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
README API
IQAir Live City Ranking
Returns a ranked list of major cities with their current air quality index (AQI), sorted from highest AQI to lowest. The API takes no input. Each row includes the city, state, country, follower count and a page path for the city.
Use cases
- Show a live list of the most polluted cities in a dashboard or news widget.
- Compare the current AQI of cities in different countries in one call.
- Pick the most followed cities to decide which ones to track in more detail.
- Build a list of city page paths to pass to a city-level air quality lookup.
Request
curl -X POST "https://api.sandbase.ai/v1/api/iqair/live-city-ranking" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"citiesData": [
{
"aqi": 236,
"city": "Lahore",
"country": "Pakistan",
"flagURL": "https://cdn.airvisual.net/flags/pakistan.jpg",
"followersCount": 1139595,
"id": "Dt8HhEj6mC2eatyBr",
"rank": 1,
"state": "Punjab",
"updatedAt": "2026-11-03T07:00:00.000Z",
"url": "/pakistan/punjab/lahore"
}
],
"updatedAt": "2026-11-03T07:00:00.000Z"
},
"status": "success"
}
Response fields
| Field | Meaning |
|---|---|
data.citiesData[].rank | Position of the city in the list. Rank 1 has the highest aqi. |
data.citiesData[].aqi | Current air quality index value for the city. A higher number means worse air. |
data.citiesData[].city / data.citiesData[].state / data.citiesData[].country | Name of the city, its state or region, and its country. |
data.citiesData[].id | Identifier of the city record. |
data.citiesData[].url | Path of the city page, built as /country/state/city in lowercase with dashes. |
data.citiesData[].followersCount | Number of followers the city has. |
data.citiesData[].flagURL | Link to the country flag image. |
data.citiesData[].updatedAt / data.updatedAt | Timestamp of the reading for the city and for the whole list. Both are ISO 8601 strings in UTC. |
status | Shows success when the call worked. |
Notes
- The request body is an empty object
{}. There is no pagination parameter. - The
urlvalue gives the country, state and city slugs. Use them with IQAir City Air Quality for a single city. - For a map-based view of stations, see IQAir Map Data.
Pricing
$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Invia la tua prima richiesta
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/iqair/live-city-ranking" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. Autenticazione
Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
3. Parametri
Non è stato pubblicato alcuno schema dei parametri per questa API.
4. Risposta
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
API correlate
| API | Prezzo | Risposta |
|---|---|---|
IQAir Live City RankingQuesta API IQAir | $0.01 per chiamata | JSON asincrono |
IQAir | $0.01 per chiamata | JSON asincrono |
IQAir | $0.01 per chiamata | JSON asincrono |
IQAir | $0.01 per chiamata | JSON asincrono |
Domande
FAQ
Come uso l'API IQAir Live City Ranking?
Invia una richiesta POST a https://api.sandbase.ai/v1/api/iqair/live-city-ranking 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 IQAir Live City Ranking?
$0.01 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Quali parametri accetta l'API IQAir Live City Ranking?
IQAir Live City Ranking non accetta parametri di input; invia un body JSON vuoto.
Cosa restituisce l'API IQAir Live City Ranking?
Un risultato JSON. Questo endpoint viene eseguito in modo asincrono, quindi la risposta indica come recuperare il risultato completato. Il README di questa pagina include una risposta di esempio.
Mi serve un account sviluppatore o una chiave API IQAir?
No. IQAir Live City Ranking 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 IQAir.
