TL;DR
OpenSenseMap is the open data platform for senseBox citizen science weather stations. Thousands of stations worldwide — built by students, hobbyists, and researchers — continuously upload environmental measurements. The API provides access to station metadata, live sensor readings (temperature, humidity, pressure, UV, PM, noise), and time series data. Particularly dense in Europe and Germany where the senseBox educational project originated. No API key needed, JSON format.
Quick start: https://api.opensensemap.org/boxes/57000b8745fd40c8196ad04c?format=json
No API key needed — just make a request!
How to Use This API
1. Get Station Details
https://api.opensensemap.org/boxes/57000b8745fd40c8196ad04c?format=json
2. Find Nearby Stations
https://api.opensensemap.org/boxes?near=52.0,8.0&maxDistance=10000
3. JavaScript — Find Local PM2.5 Stations
fetch('https://api.opensensemap.org/boxes?near=51.5,-0.1&maxDistance=50000')
.then(r => r.json())
.then(boxes => {
boxes.forEach(box => {
console.log(`${box.name}: ${box.location?.coordinates}`);
box.sensors?.forEach(s => {
if (s.title?.includes('PM2.5')) {
console.log(` PM2.5: ${s.lastMeasurement?.value} µg/m³`);
}
});
});
});
4. Python — Get Temperature Readings
import requests
box_id = '57000b8745fd40c8196ad04c'
data = requests.get(
f'https://api.opensensemap.org/boxes/{box_id}',
params={'format': 'json'}
).json()
print(f"Station: {data['name']}")
for sensor in data['sensors']:
if sensor['unit'] == '°C':
print(f"Temp: {sensor['lastMeasurement']['value']}°C")
elif sensor['unit'] == '%':
print(f"Humidity: {sensor['lastMeasurement']['value']}%")
https://api.opensensemap.org/boxes/57000b8745fd40c8196ad04c?format=json
Frequently Asked Questions
- What types of sensors do senseBoxes have?
- Common sensors: temperature, humidity, barometric pressure, illuminance, UV index, PM2.5/PM10, noise level, wind speed, soil moisture, and GPS.
- How many stations are there?
- OpenSenseMap hosts thousands of active stations globally, with the highest concentration in Germany, Austria, and Switzerland due to the senseBox educational program.
- Can I get historical time series?
- Yes. Use
/boxes/{id}/data/{sensorId}withfrom-dateandto-dateparameters to retrieve historical readings for a specific sensor. - How do I find specific sensors in a station?
- Each station's JSON includes a
sensorsarray with_id,title,unit,sensorType, andlastMeasurement. Use the sensor ID for data queries. - What format does the API return?
- Use
?format=jsonfor JSON output. The API also supports GeoJSON format for mapping applications via?format=geojson. - Is the data free for commercial use?
- Yes, OpenSenseMap data is published as open data (ODbL license). Commercial use is permitted with attribution to the community.
API Details
- API URL
https://api.opensensemap.org/boxes- Documentation
- docs.opensensemap.org
- Category
- Weather
- Authentication
- Not Required
- Geographic Coverage
- Global — concentrated in Europe
What You Can Build
- Citizen science dashboard visualizing community weather data on a map
- Educational tool showing students how their senseBox compares to others
- Urban heat island mapper using temperature readings from dense station clusters
- Air quality monitor aggregating PM sensor readings by neighborhood
- Weather alert system using hyperlocal readings from nearby citizen stations