openSenseMap API

Beginner's Pick Weather / No Auth Required Beginner HTTPS CORS
Free to Use
70 B
Measured Score 0 50 100 Speed 11/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 4/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.opensensemap.org/boxes?bbox=8.6,49.7,10.2,50.4&format=json
Result
HTTP 200 · application/json · 334,687 bytes
Response time
309 ms (median of 3)
Transport
TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
Caddy
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
_id string 579e683668b4a21200661a6d
createdAt string (date) 2022-03-30T11:25:43.225Z
updatedAt string (date) 2026-08-10T19:55:02.515Z
name string Lengfeld Hintergasse 11
exposure string outdoor
model string homeWifi
sensors array [1 item]
description string Die Wetterstation steht in Otzberg, Ortsteil …
currentLocation object {3 fields}
lastMeasurementAt string (date) 2026-08-10T19:55:02.498Z
grouptag array [1 item]

Captured Response

Captured from a real request to https://api.opensensemap.org/boxes?bbox=8.6,49.7,10.2,50.4&format=json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "_id": "579e683668b4a21200661a6d",
    "createdAt": "2022-03-30T11:25:43.225Z",
    "updatedAt": "2026-08-10T19:55:02.515Z",
    "name": "Lengfeld Hintergasse 11",
    "exposure": "outdoor",
    "model": "homeWifi",
    "sensors": [
      {
        "…": "(5 more fields)"
      }
    ],
    "description": "Die Wetterstation steht in Otzberg, Ortsteil Lengfeld. Die senseBox basiert auf einem Arduino UNO Microcontroller-Board.",
    "currentLocation": {
      "coordinates": [
        8.90362
      ],
      "type": "Point",
      "timestamp": "2016-07-31T21:05:58.000Z"
    },
    "lastMeasurementAt": "2026-08-10T19:55:02.498Z",
    "grouptag": [
      ""
    ]
  }
]

Field Reference

_id Unique identifier for the senseBox station.
name User-defined name of the senseBox set by its owner.
sensors Array of sensor objects, each with a title (e.g., Temperature), unit, and lastMeasurement value.
exposure Deployment type of the senseBox: outdoor, indoor, or mobile.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.opensensemap.org/boxes?bbox=8.6,49.7,10.2,50.4&format=json";
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.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 422 Requesting a path that does not exist application/json
{
  "code": "UnprocessableEntity",
  "message": "Parameter boxId is not parseable as datatype id"
}
HTTP 422 Sending an invalid value for "bbox" application/json
{
  "code": "UnprocessableEntity",
  "message": "Illegal value for parameter bbox. Supplied values can not be parsed as floats."
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 11/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 4/15
Endpoint Response Time 309ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Weather
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →