AirVisual API

Real-time air quality and pollution data

🔑 Auth: apiKey 🔒 HTTPS: Yes 🌐 CORS: Unknown

Live Technical Metrics

Pre-calculated · updated every 20 min
Server-measured technical metrics for the AirVisual API
Uptime Status ⬜ Unknown — not yet probed
Server Latency N/A
Hosting Server Not disclosed
Content-Type Not disclosed
Cache-Control Not set
CORS Support ❓ Unknown — verify before deploying
Authentication ⚠️ Requires apiKey — obtain credentials from the official documentation
Category Environment

Quick Integration Code

⚠️ Auth: apiKey
// ⚠️  This API requires apiKey authentication
// Add your credentials to the headers below
fetch("https://api-docs.iqair.com/")
  .then(response => {
    if (!response.ok) throw new Error(`HTTP ${response.status}`);
    return response.json();
  })
  .then(data => console.log(data))
  .catch(error => console.error("Request failed:", error));
# ⚠️  This API requires apiKey authentication
# Add your credentials to the headers dict below
import requests

url = "https://api-docs.iqair.com/"
headers = {
    "Accept": "application/json",
    # "Authorization": "Bearer YOUR_TOKEN_HERE",
}

response = requests.get(url, headers=headers, timeout=10)
response.raise_for_status()
data = response.json()
print(data)
curl -X GET "https://api-docs.iqair.com/" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Accept: application/json" \
  -H "User-Agent: MyApp/1.0" \
  --max-time 10 \
  --silent | python3 -m json.tool

Sample JSON Response — Environment

Environment

  "results" 
    
      "date" "2025-01-15"
      "location" "Mauna Loa Observatory, Hawaii"
      "co2_ppm" 424.87
      "ch4_ppb" 1913.2
      "n2o_ppb" 337.8
      "aqi" 
        "value" 42
        "category" "Good"
        "pollutant" "PM2.5"