openSenseMap API

⭐ Beginner's Pick Weather / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

openSenseMap is an open-source platform that aggregates real-time sensor data from community-operated personal weather stations called senseBoxes, spread across the globe. No API key is required, so you can query live environmental measurements including temperature, humidity, air pressure, and air quality instantly. It is a great API for citizen science projects, smart city dashboards, and learning about IoT data.

💡

Beginner Tip

Use the bounding box (bbox) parameter to narrow results to a geographic area so you are not downloading every senseBox on the planet. The API returns GeoJSON, so results plug directly into mapping libraries like Leaflet or Mapbox.

Available Data

temperature
weather conditions
humidity
wind speed
forecast data
phone number validation

Example Response

JSON Response
{
  "location": "Tokyo",
  "temperature": {
    "current": 22,
    "feels_like": 24,
    "min": 18,
    "max": 26
  },
  "condition": "Partly Cloudy",
  "humidity": 65,
  "wind": {
    "speed": 12,
    "direction": "NE"
  },
  "forecast": [
    {
      "date": "2025-01-16",
      "high": 25,
      "low": 17,
      "condition": "Sunny"
    }
  ]
}

Field Reference

_id Unique identifier for the senseBox station.
name User-defined name of the senseBox set by its owner.
currentLocation.coordinates GeoJSON coordinates array [longitude, latitude] of the senseBox.
sensors Array of sensor objects, each with a title (e.g., Temperature), unit, and lastMeasurement value.
sensors[].lastMeasurement.value The most recent measurement value recorded by this sensor as a string.
exposure Deployment type of the senseBox: outdoor, indoor, or mobile.

Implementation Example

const url = "https://api.opensensemap.org/";
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

Very large response or timeout A global query without bbox or other filters returns thousands of senseBoxes.
Always filter with bbox (bounding box in decimal degrees) or near and maxDistance parameters to limit results to your area of interest.
Sensor data is stale or null Many community senseBoxes go offline or stop transmitting for extended periods.
Filter by lastMeasurementAt or use the exposure parameter to select only currently active boxes.
404 on specific box ID The senseBox with the given ID has been deleted or is no longer registered.
Search for active boxes using the /boxes endpoint and pick a currently listed ID rather than using a hardcoded one.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 2/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 3092ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Weather
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →