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.
- Fiyat
- $0.01USD / çağrı
- Yöntem
- POST
- Yanıt
- Asenkron JSON
- Parametreler
- 0 gerekli · 0 isteğe bağlı
Oynatma Alanı
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
API README
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.
Geliştirmeye başlayın
İlk isteğinizi gönderin
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
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. Kimlik doğrulama
SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
3. Parametreler
Bu API için bir parametre şeması yayınlanmamış.
4. Yanıt
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
İlgili APIs
| API | Fiyat | Yanıt |
|---|---|---|
IQAir Live City RankingBu API IQAir | $0.01 çağrı başına | Asenkron JSON |
IQAir | $0.01 çağrı başına | Asenkron JSON |
IQAir | $0.01 çağrı başına | Asenkron JSON |
IQAir | $0.01 çağrı başına | Asenkron JSON |
Sorular
SSS
IQAir Live City Ranking API'sini nasıl kullanırım?
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/iqair/live-city-ranking adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
IQAir Live City Ranking API'sinin fiyatı nedir?
çağrı başına $0.01, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
IQAir Live City Ranking API'si hangi parametreleri kabul eder?
IQAir Live City Ranking hiçbir giriş parametresi almaz; boş bir JSON gövdesi gönderin.
IQAir Live City Ranking API'si ne döndürür?
Bir JSON sonucu. Bu uç nokta asenkron çalışır; bu nedenle yanıt, tamamlanan sonucu nasıl alacağınızı söyler. Bu sayfadaki README'de örnek bir yanıt yer alır.
Bir IQAir geliştirici hesabına veya API anahtarına ihtiyacım var mı?
Hayır. IQAir Live City Ranking, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. IQAir API erişimi için ayrıca başvuru yapmanız gerekmez.
