Overview
Purple Air is a company specializing in the development and deployment of air quality sensors and an associated data platform. Established in 2015, the company's primary focus is on monitoring particulate matter (PM2.5), a key indicator of air pollution. The Purple Air network consists of thousands of sensors deployed globally, many of which are owned and operated by individuals, communities, and research institutions. This distributed model contributes to a dense, hyperlocal dataset of air quality information, which is then made publicly accessible via the PurpleAir Map.
The Purple Air system is designed for both general public use and technical integration. Developers and researchers can access the real-time and historical air quality data through the PurpleAir API. This API provides endpoints for retrieving sensor metadata, current readings, and historical data, making it suitable for applications that require granular environmental information. Use cases range from integrating air quality alerts into smart home systems to supporting academic studies on pollution patterns and public health impacts. The platform's emphasis on community-driven data collection enables a level of spatial resolution that complements larger, government-operated monitoring stations.
Purple Air's core products include the physical sensors, such as the PurpleAir Flex and PurpleAir Sky, which are designed for outdoor deployment and continuous operation. The data collected by these devices feeds into the PurpleAir Map and the API. The company aims to provide accessible and actionable air quality data, empowering individuals and organizations to make informed decisions regarding environmental exposure. The API requires an API key for most endpoints, ensuring controlled access while maintaining clear documentation for data retrieval and usage, which is detailed in the PurpleAir API reference.
Key features
- Real-time PM2.5 data: Access live particulate matter (PM2.5) readings from a global network of sensors, updated frequently.
- Historical data access: Retrieve past air quality data for specific sensors or regions, supporting trend analysis and research.
- Global sensor network: Utilize data from thousands of publicly and privately owned sensors worldwide, offering broad geographical coverage.
- Hyperlocal resolution: Leverage a dense network of sensors to obtain highly localized air quality information, often at a street or neighborhood level.
- Public API: Programmatically access sensor data for integration into custom applications, dashboards, and research projects, as described in the PurpleAir documentation.
- Interactive map visualization: View air quality data on a dynamic map interface, allowing for visual exploration of pollution levels.
- Sensor calibration options: Apply various calibration algorithms to raw sensor data to align with reference-grade monitors, as discussed in their calibration guide.
Pricing
Purple Air offers custom enterprise pricing for specialized or high-volume data access needs. Access to public sensor data through the PurpleAir Map and basic API usage is available without direct cost. For specific inquiries regarding custom data licenses or enterprise solutions, direct contact with Purple Air is required.
| Service/Product | Description | Pricing | As-of Date |
|---|---|---|---|
| Public Sensor Data Access (Map & Basic API) | Viewing data on the PurpleAir Map and standard API calls for public sensors. | Free | 2026-05-28 |
| Enterprise Data Access/Custom Solutions | Tailored data access, higher API rate limits, specialized support for commercial or research applications. | Custom enterprise pricing | 2026-05-28 |
| PurpleAir Flex Sensor | Indoor/outdoor air quality sensor for PM2.5. | Varies by retailer | 2026-05-28 |
| PurpleAir Sky Sensor | Outdoor air quality sensor for PM2.5 with additional environmental sensing. | Varies by retailer | 2026-05-28 |
For detailed pricing on physical sensors, refer to authorized resellers or the Purple Air website.
Common integrations
- Environmental monitoring systems: Integrate real-time PM2.5 data into larger environmental monitoring platforms for comprehensive air quality assessments.
- Smart home applications: Display local air quality information on smart displays or trigger air purification systems based on current PM2.5 levels.
- Research and academic projects: Utilize the API to gather extensive datasets for studies on air pollution, public health, and climate change, as demonstrated by organizations using similar data from IQAir's platforms.
- Public health dashboards: Incorporate hyperlocal air quality data into public-facing dashboards to inform communities about current conditions and potential health risks.
- Weather and climate applications: Combine air quality data with meteorological information to model pollution dispersion and forecast future conditions.
- GIS and mapping platforms: Overlay Purple Air data onto geographical information systems for spatial analysis and visualization of air quality patterns.
Alternatives
- BreezoMeter: Provides global, street-level air quality and pollen data, with a focus on health recommendations.
- IQAir: Offers air quality monitoring devices and a platform for global air quality data, including forecasts and historical data.
- Plume Labs (by AccuWeather): Delivers real-time air pollution forecasts and personalized health advice through a mobile app and API.
Getting started
To begin using the Purple Air API, you will need to obtain an API key from the PurpleAir developer portal. The following Python example demonstrates how to fetch data for a specific sensor.
import requests
import os
# Replace with your actual API key and sensor index
# Get your API key from https://docs.purpleair.com/purpleapi/getting-started/
API_KEY = os.environ.get("PURPLEAIR_API_KEY", "YOUR_PURPLEAIR_API_KEY")
SENSOR_INDEX = 123456 # Example sensor index
# API endpoint for a single sensor's data
url = f"https://api.purpleair.com/v1/sensors/{SENSOR_INDEX}"
headers = {
"X-API-KEY": API_KEY
}
params = {
"fields": "pm2.5_atm,humidity,temperature"
}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)
data = response.json()
print(f"Sensor Index: {SENSOR_INDEX}")
if "sensor" in data:
sensor_data = data["sensor"]
print(f"PM2.5 (ATM): {sensor_data.get('pm2.5_atm', 'N/A')} µg/m³")
print(f"Humidity: {sensor_data.get('humidity', 'N/A')}%")
print(f"Temperature: {sensor_data.get('temperature', 'N/A')}°C")
else:
print("Sensor data not found in response.")
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
except ValueError:
print("Failed to parse JSON response.")
This script sends a GET request to the Purple Air API for a specified sensor, requesting PM2.5, humidity, and temperature fields. Ensure you replace YOUR_PURPLEAIR_API_KEY with your actual API key and 123456 with a valid sensor index. You can find sensor indexes on the PurpleAir Map by clicking on a sensor and checking its details, or by using the /v1/sensors endpoint to list available sensors.