Purple Air API
Overview
Purple Air gives you access to real-time air quality data from a global network of community-owned sensors. You can query sensor readings, location data, and historical air quality metrics without any authentication. It is a great starting point for environmental monitoring projects or building local air quality dashboards.
Beginner Tip
PurpleAir sensors report PM2.5 particulate matter — query by sensor ID or bounding box to get readings for a specific area. Note that the newer API v1 (api.purpleair.com) now requires an API key, so check which version you are targeting.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Purple Air",
"description": "Real Time Air Quality Monitoring",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
sensor_index Unique identifier for each PurpleAir sensor. name Human-readable label given to the sensor by its owner. pm2.5_atm PM2.5 particulate matter reading in micrograms per cubic meter, corrected for atmospheric pressure. latitude Latitude coordinate of the sensor location. longitude Longitude coordinate of the sensor location. last_seen Unix timestamp of the most recent data upload from this sensor. Implementation Example
const url = "https://www2.purpleair.com/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →arcsecond.io
⭐ Beginner's Pickarcsecond.io is a free astronomy API that aggregates data from multiple space databases, including stars, planets, exoplanets, and observing sites.
arXiv
arXiv provides programmatic access to curated research-sharing platform: physics, mathematics, quantitative finance, and economics via REST API.
GBIF
⭐ Beginner's PickGBIF (Global Biodiversity Information Facility) is a free, open API providing access to hundreds of millions of species occurrence records from around the world.
iDigBio
iDigBio is a free API that gives you access to millions of digitized natural history museum specimens from institutions across the United States and beyond.
inspirehep.net
INSPIRE-HEP is a free REST API for the High Energy Physics literature database, covering papers, authors, institutions, conferences, and experiments in particle physics.