Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

IQAir Live City Ranking

Docs da API
https://api.sandbase.ai/v1/api/iqair/live-city-ranking

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

Preço
$0.01USD / chamada
Método
POST
Resposta
JSON assíncrono
Parâmetros
0 obrigatórios · 0 opcionais

Playground

Entrada
Nenhum esquema de entrada disponível
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da 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

FieldMeaning
data.citiesData[].rankPosition of the city in the list. Rank 1 has the highest aqi.
data.citiesData[].aqiCurrent air quality index value for the city. A higher number means worse air.
data.citiesData[].city / data.citiesData[].state / data.citiesData[].countryName of the city, its state or region, and its country.
data.citiesData[].idIdentifier of the city record.
data.citiesData[].urlPath of the city page, built as /country/state/city in lowercase with dashes.
data.citiesData[].followersCountNumber of followers the city has.
data.citiesData[].flagURLLink to the country flag image.
data.citiesData[].updatedAt / data.updatedAtTimestamp of the reading for the city and for the whole list. Both are ISO 8601 strings in UTC.
statusShows success when the call worked.

Notes

  • The request body is an empty object {}. There is no pagination parameter.
  • The url value 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.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
IQAir$0.01 por chamadaJSON assíncrono
IQAir$0.01 por chamadaJSON assíncrono
IQAir$0.01 por chamadaJSON assíncrono
IQAir$0.01 por chamadaJSON assíncrono

Perguntas

FAQ

Como eu uso a API IQAir Live City Ranking?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/iqair/live-city-ranking com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API IQAir Live City Ranking?

$0.01 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API IQAir Live City Ranking aceita?

IQAir Live City Ranking não recebe parâmetros de entrada; envie um corpo JSON vazio.

O que a API IQAir Live City Ranking retorna?

Um resultado JSON. Este endpoint é assíncrono, então a resposta informa como buscar o resultado final. O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor IQAir ou de uma chave de API?

Não. IQAir Live City Ranking funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do IQAir separadamente.