Find an API

Search public APIs with auth details & Postman guides

← All APIs

OpenAQ

openaq · Location

Location No Auth Free & Open location

API for OpenAQ LCS

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Provides a simple listing of cities within the platform

Provides a simple listing of cities within the platform

https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities?city=London&page=1&sort=asc&limit=100&entity=example&offset=0&country=US&order_by=city&country_id=example

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities?city=London&page=1&sort=asc&limit=100&entity=example&offset=0&country=US&order_by=city&country_id=example"
import requests
params = {
    "city": "London",
    "page": "1",
    "sort": "asc",
    "limit": "100",
    "entity": "example",
    "offset": "0",
    "country": "US",
    "order_by": "city",
    "country_id": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities');
url.searchParams.set('city', 'London');
url.searchParams.set('page', '1');
url.searchParams.set('sort', 'asc');
url.searchParams.set('limit', '100');
url.searchParams.set('entity', 'example');
url.searchParams.set('offset', '0');
url.searchParams.set('country', 'US');
url.searchParams.set('order_by', 'city');
url.searchParams.set('country_id', 'example');

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities")
	q := baseURL.Query()
	q.Set("city", "London")
	q.Set("page", "1")
	q.Set("sort", "asc")
	q.Set("limit", "100")
	q.Set("entity", "example")
	q.Set("offset", "0")
	q.Set("country", "US")
	q.Set("order_by", "city")
	q.Set("country_id", "example")
	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.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities")
uri.query = URI.encode_www_form({
  "city" => "London",
  "page" => "1",
  "sort" => "asc",
  "limit" => "100",
  "entity" => "example",
  "offset" => "0",
  "country" => "US",
  "order_by" => "city",
  "country_id" => "example"
})

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/cities?" . http_build_query([
    "city" => "London",
    "page" => "1",
    "sort" => "asc",
    "limit" => "100",
    "entity" => "example",
    "offset" => "0",
    "country" => "US",
    "order_by" => "city",
    "country_id" => "example"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Countries Getv1

Countries Getv1

https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries?page=1&sort=asc&limit=200&offset=0&country=US&order_by=country&country_id=example

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries?page=1&sort=asc&limit=200&offset=0&country=US&order_by=country&country_id=example"
import requests
params = {
    "page": "1",
    "sort": "asc",
    "limit": "200",
    "offset": "0",
    "country": "US",
    "order_by": "country",
    "country_id": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries');
url.searchParams.set('page', '1');
url.searchParams.set('sort', 'asc');
url.searchParams.set('limit', '200');
url.searchParams.set('offset', '0');
url.searchParams.set('country', 'US');
url.searchParams.set('order_by', 'country');
url.searchParams.set('country_id', 'example');

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries")
	q := baseURL.Query()
	q.Set("page", "1")
	q.Set("sort", "asc")
	q.Set("limit", "200")
	q.Set("offset", "0")
	q.Set("country", "US")
	q.Set("order_by", "country")
	q.Set("country_id", "example")
	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.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries")
uri.query = URI.encode_www_form({
  "page" => "1",
  "sort" => "asc",
  "limit" => "200",
  "offset" => "0",
  "country" => "US",
  "order_by" => "country",
  "country_id" => "example"
})

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/countries?" . http_build_query([
    "page" => "1",
    "sort" => "asc",
    "limit" => "200",
    "offset" => "0",
    "country" => "US",
    "order_by" => "country",
    "country_id" => "example"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Latest V1 Get

Latest V1 Get

https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest?city=London&page=1&sort=desc&unit=example&limit=100&entity=example&offset=0&radius=1000&country=US&dumpRaw=false&has_geo=true&isMobile=true&location=example&order_by=lastUpdated&modelName=example&parameter=example&country_id=example&isAnalysis=true&sensorType=example&sourceName=example&coordinates=example&location_id=1&parameter_id=1&manufacturerName=example

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest?city=London&page=1&sort=desc&unit=example&limit=100&entity=example&offset=0&radius=1000&country=US&dumpRaw=false&has_geo=true&isMobile=true&location=example&order_by=lastUpdated&modelName=example&parameter=example&country_id=example&isAnalysis=true&sensorType=example&sourceName=example&coordinates=example&location_id=1&parameter_id=1&manufacturerName=example"
import requests
params = {
    "city": "London",
    "page": "1",
    "sort": "desc",
    "unit": "example",
    "limit": "100",
    "entity": "example",
    "offset": "0",
    "radius": "1000",
    "country": "US",
    "dumpRaw": "false",
    "has_geo": "true",
    "isMobile": "true",
    "location": "example",
    "order_by": "lastUpdated",
    "modelName": "example",
    "parameter": "example",
    "country_id": "example",
    "isAnalysis": "true",
    "sensorType": "example",
    "sourceName": "example",
    "coordinates": "example",
    "location_id": "1",
    "parameter_id": "1",
    "manufacturerName": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest');
url.searchParams.set('city', 'London');
url.searchParams.set('page', '1');
url.searchParams.set('sort', 'desc');
url.searchParams.set('unit', 'example');
url.searchParams.set('limit', '100');
url.searchParams.set('entity', 'example');
url.searchParams.set('offset', '0');
url.searchParams.set('radius', '1000');
url.searchParams.set('country', 'US');
url.searchParams.set('dumpRaw', 'false');
url.searchParams.set('has_geo', 'true');
url.searchParams.set('isMobile', 'true');
url.searchParams.set('location', 'example');
url.searchParams.set('order_by', 'lastUpdated');
url.searchParams.set('modelName', 'example');
url.searchParams.set('parameter', 'example');
url.searchParams.set('country_id', 'example');
url.searchParams.set('isAnalysis', 'true');
url.searchParams.set('sensorType', 'example');
url.searchParams.set('sourceName', 'example');
url.searchParams.set('coordinates', 'example');
url.searchParams.set('location_id', '1');
url.searchParams.set('parameter_id', '1');
url.searchParams.set('manufacturerName', 'example');

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest")
	q := baseURL.Query()
	q.Set("city", "London")
	q.Set("page", "1")
	q.Set("sort", "desc")
	q.Set("unit", "example")
	q.Set("limit", "100")
	q.Set("entity", "example")
	q.Set("offset", "0")
	q.Set("radius", "1000")
	q.Set("country", "US")
	q.Set("dumpRaw", "false")
	q.Set("has_geo", "true")
	q.Set("isMobile", "true")
	q.Set("location", "example")
	q.Set("order_by", "lastUpdated")
	q.Set("modelName", "example")
	q.Set("parameter", "example")
	q.Set("country_id", "example")
	q.Set("isAnalysis", "true")
	q.Set("sensorType", "example")
	q.Set("sourceName", "example")
	q.Set("coordinates", "example")
	q.Set("location_id", "1")
	q.Set("parameter_id", "1")
	q.Set("manufacturerName", "example")
	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.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest")
uri.query = URI.encode_www_form({
  "city" => "London",
  "page" => "1",
  "sort" => "desc",
  "unit" => "example",
  "limit" => "100",
  "entity" => "example",
  "offset" => "0",
  "radius" => "1000",
  "country" => "US",
  "dumpRaw" => "false",
  "has_geo" => "true",
  "isMobile" => "true",
  "location" => "example",
  "order_by" => "lastUpdated",
  "modelName" => "example",
  "parameter" => "example",
  "country_id" => "example",
  "isAnalysis" => "true",
  "sensorType" => "example",
  "sourceName" => "example",
  "coordinates" => "example",
  "location_id" => "1",
  "parameter_id" => "1",
  "manufacturerName" => "example"
})

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.apis.guru/v2/specs/openaq.local/2.0.0/v1/latest?" . http_build_query([
    "city" => "London",
    "page" => "1",
    "sort" => "desc",
    "unit" => "example",
    "limit" => "100",
    "entity" => "example",
    "offset" => "0",
    "radius" => "1000",
    "country" => "US",
    "dumpRaw" => "false",
    "has_geo" => "true",
    "isMobile" => "true",
    "location" => "example",
    "order_by" => "lastUpdated",
    "modelName" => "example",
    "parameter" => "example",
    "country_id" => "example",
    "isAnalysis" => "true",
    "sensorType" => "example",
    "sourceName" => "example",
    "coordinates" => "example",
    "location_id" => "1",
    "parameter_id" => "1",
    "manufacturerName" => "example"
]);
$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. See official documentation for authentication and setup.

What can you build with OpenAQ?

OpenAQ is a Location API. Developers commonly use location APIs for:

  • tracking assets and vehicles in real time
  • building delivery and logistics apps
  • finding nearby businesses or services
  • geo-fencing and location-based notifications
  • address validation and autocomplete

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

New to APIs? Read our beginner's guide

Open documentation ↗