Find an API

Search public APIs with auth details & Postman guides

← All APIs

openSenseMap API

api.opensensemap.org · Science

Science No Auth Free & Open IoT Environment Sensors

Open environmental sensor network — air quality, temperature, humidity, UV index, and more from citizen science stations worldwide. All data is open. No API key required.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Get nearby sensor boxes

Find environmental sensor stations near Münster, Germany.

https://api.opensensemap.org/boxes?near=51.97,7.62&format=json&maxDistance=5000

Hover any highlighted part to learn what it does

curl -X GET "https://api.opensensemap.org/boxes?near=51.97%2C7.62&format=json&maxDistance=5000"
import requests
params = {
    "near": "51.97,7.62",
    "format": "json",
    "maxDistance": "5000"
}
response = requests.get(
    "https://api.opensensemap.org/boxes",
    params=params,
)
print(response.json())
const url = new URL('https://api.opensensemap.org/boxes');
url.searchParams.set('near', '51.97,7.62');
url.searchParams.set('format', 'json');
url.searchParams.set('maxDistance', '5000');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.opensensemap.org/boxes")
	q := baseURL.Query()
	q.Set("near", "51.97,7.62")
	q.Set("format", "json")
	q.Set("maxDistance", "5000")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.opensensemap.org/boxes")
uri.query = URI.encode_www_form({
  "near" => "51.97,7.62",
  "format" => "json",
  "maxDistance" => "5000"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.opensensemap.org/boxes?" . http_build_query([
    "near" => "51.97,7.62",
    "format" => "json",
    "maxDistance" => "5000"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get sensor stats

Get global network statistics.

https://api.opensensemap.org/stats

Hover any highlighted part to learn what it does

curl -X GET "https://api.opensensemap.org/stats"
import requests
response = requests.get(
    "https://api.opensensemap.org/stats",
)
print(response.json())
const url = 'https://api.opensensemap.org/stats';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "https://api.opensensemap.org/stats"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.opensensemap.org/stats")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.opensensemap.org/stats";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. Find nearby stations: GET /boxes?near={lat},{lon}&maxDistance=10000
  3. Get station data: GET /boxes/{senseBoxId}
  4. Latest measurements: GET /boxes/{id}/sensors
  5. All data is open under PDDL license

What can you build with openSenseMap API?

openSenseMap API is a Science API. Developers commonly use science APIs for:

  • accessing research datasets and scientific literature
  • powering academic and R&D applications
  • running scientific calculations and simulations
  • visualising experimental and observational data
  • integrating with research and reference databases

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. openSenseMap API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗