Events and earthquakes
/v1/events lists what is happening around a point, or in a box, during a time range: earthquakes, air episodes (runs of hours when a station's readings sat at the level a city's alert programme acts on), and ticketed events where a ticketing feed is loaded. Each answer names every feed it searched, with its release and licence.
curl -G "https://api.oslew.com/v1/events" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'at=36.6777,-121.6555' \
--data-urlencode 'radius_m=50000' \
--data-urlencode 'category=quake' \
--data-urlencode 'order=newest' \
--data-urlencode 'from=1795046400' \
--data-urlencode 'to=1795478400' \
--data-urlencode 'limit=3'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.events(
at="36.6777,-121.6555",
radius_m=50000,
from_=1795046400,
to=1795478400,
category="quake",
order="newest",
limit=3,
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.events({
at: "36.6777,-121.6555",
radius_m: 50000,
from: 1795046400,
to: 1795478400,
category: "quake",
order: "newest",
limit: 3,
});HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1
{
"at": [
36.6777,
-121.6555
],
"radius_m": 50000,
"bbox": null,
"from": 1795046400,
"to": 1795478400,
"order": "newest",
"total": 23,
"results": [
{
"id": "usgs:nc75471082",
"title": "M 2.9 - 9 km NW of Pinnacles, CA",
"category": "quake",
"start": 1795428066,
"lat": 36.587833404541,
"lon": -121.219497680664,
"venue": "9 km NW of Pinnacles, CA",
"url": "https://earthquake.usgs.gov/earthquakes/eventpage/nc75471082",
"details": {
"depth_km": 7.30000019073486,
"felt": 2,
"intensity": 2.2,
"magnitude": 2.91,
"magnitude_type": "md",
"status": "automatic",
"tsunami": 0,
"type": "earthquake",
"updated_ms": 1795448804348
},
"distance_m": 40168,
"feed": "usgs-quakes"
},
{
"id": "usgs:nc75470917",
"title": "M 2.5 - 15 km NW of Pinnacles, CA",
"category": "quake",
"start": 1795400744,
"lat": 36.6218338012695,
"lon": -121.266830444336,
"venue": "15 km NW of Pinnacles, CA",
"url": "https://earthquake.usgs.gov/earthquakes/eventpage/nc75470917",
"details": {
"depth_km": 11.3500003814697,
"magnitude": 2.51,
"magnitude_type": "md",
"status": "automatic",
"tsunami": 0,
"type": "earthquake",
"updated_ms": 1795402344059
},
"distance_m": 35226,
"feed": "usgs-quakes"
},
{
"id": "usgs:nc75470822",
"title": "M 2.8 - 9 km NW of Pinnacles, CA",
"category": "quake",
"start": 1795390256,
"lat": 36.59033203125,
"lon": -121.210334777832,
"venue": "9 km NW of Pinnacles, CA",
"url": "https://earthquake.usgs.gov/earthquakes/eventpage/nc75470822",
"details": {
"depth_km": 5.98000001907349,
"felt": 3,
"intensity": 2.2,
"magnitude": 2.8,
"magnitude_type": "md",
"status": "automatic",
"tsunami": 0,
"type": "earthquake",
"updated_ms": 1795419831201
},
"distance_m": 40893,
"feed": "usgs-quakes"
}
],
"sources": [
{
"name": "usgs-quakes",
"release": "2026-11-23T21:38Z",
"license": "USGS Earthquake Hazards Program, public domain"
},
{
"name": "air-cdmx",
"release": "2026-11-23T21:38Z",
"license": "Derived from SEDEMA Ciudad de México (SIMAT), CC BY 4.0"
},
{
"name": "air-us",
"release": "2026-11-23T21:38Z",
"license": "Derived from AirNow (US EPA and partners), public domain"
}
],
"took_us": 58
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Above, the newest three of the 23 earthquakes within 50 km of Salinas, California, in the week asked for: a run of small quakes near Pinnacles, about 40 km away. total is how many matched before limit.
Asking
| Parameter | Default | Is |
|---|---|---|
at | — | lat,lon: events within radius_m of a point. |
bbox | — | lng_lo,lat_lo,lng_hi,lat_hi, longitude first, instead of at. |
radius_m | 25,000 | Metres around at, at most 500,000. |
from | a day ago | Unix seconds. An event matches when it overlaps from–to: it started by to and had not ended before from. |
to | thirty days ahead | Unix seconds. |
category | everything | Comma-separated: music, sports, arts, film, family, other, quake, air. |
q | — | Text the title contains, in any case. |
order | soonest | soonest, newest or nearest. |
limit | 20 | At most 100. |
- Give
atorbbox; neither is a400,at or bbox is required. An unknown category is refused with the list of known ones. - The defaults suit "what is on": what started in the last day and what starts in the next month. For earthquakes, which are news rather than plans, ask for the week with
fromandorder=newest, as above. distance_mis in each result for anatsearch and absent for a box.
An event
| Field | Is |
|---|---|
id | <feed>:<the provider's id>, stable across refreshes: usgs:nc75471082. |
title, category | As the provider titled it, and one of the categories above. |
start, end | Unix seconds. A quake has no end. A ticketed event announced with a date but no time has time_tba and starts at local midnight of that date. |
lat, lon | The venue, the epicentre, or the station with the highest reading. |
venue, city, country, timezone | Where, when the feed says. For a quake, venue is the USGS's description of where. |
url | The provider's page: tickets, or the quake's event page. |
details | What is particular to the feed, listed in the reference: magnitude, depth and felt reports for a quake; parameter, level, peak and who declares for an air episode; prices and sale status for a ticketed event. |
feed | Which entry of sources it came from. |
Air episodes are readings, not declarations
An air episode is derived here, from the station series this API already holds: hours when a station's readings sat above a programme's threshold, with stations close together merged into one event at the station with the peak. Two programmes are applied:
- Mexico City's contingency programme (PCAA, Gaceta Oficial de la Ciudad de México, 28 May 2019, table 2): phase 1 above 154 ppb of ozone in an hour, 97.4 µg/m³ of PM2.5 or 214 µg/m³ of PM10; phase 2 above 204 ppb, 150.4 µg/m³ and 354 µg/m³. Particles are compared as a 12-hour NowCast.
- The US Air Quality Index's unhealthy band and above, for AirNow's stations: PM2.5 above 55.4 µg/m³ (NowCast) and ozone above 85 ppb over eight hours, sustained for at least three hours, so that a single station's spike is not an episode.
curl -G "https://api.oslew.com/v1/events" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'at=28.6139,77.209' \
--data-urlencode 'radius_m=25000' \
--data-urlencode 'category=air' \
--data-urlencode 'from=1794960000' \
--data-urlencode 'to=1795132800'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.events(
at="28.6139,77.209",
radius_m=25000,
from_=1794960000,
to=1795132800,
category="air",
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.events({
at: "28.6139,77.209",
radius_m: 25000,
from: 1794960000,
to: 1795132800,
category: "air",
});HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 298
ratelimit-reset: 1
{
"at": [
28.6139,
77.209
],
"radius_m": 25000,
"bbox": null,
"from": 1794960000,
"to": 1795132800,
"order": "soonest",
"total": 1,
"results": [
{
"id": "air:airnow:pm25:very_unhealthy:DS1010001:1794992400",
"title": "PM2.5 at very unhealthy level",
"category": "air",
"start": 1794992400,
"end": 1795053600,
"lat": 28.63576,
"lon": 77.22445,
"venue": "New Delhi",
"details": {
"declared_by": "Readings at this level; a contingency or action day is declared by the local air agency (AirNow action day).",
"level": "very_unhealthy",
"parameter": "pm25",
"peak": 279.1,
"peak_at": 1795028400,
"programme": "us_aqi",
"station": "DS1010001",
"stations": 1,
"threshold": 125.4,
"unit": "µg/m³"
},
"distance_m": 2860,
"feed": "air-us"
}
],
"sources": [
{
"name": "usgs-quakes",
"release": "2026-11-23T21:38Z",
"license": "USGS Earthquake Hazards Program, public domain"
},
{
"name": "air-cdmx",
"release": "2026-11-23T21:38Z",
"license": "Derived from SEDEMA Ciudad de México (SIMAT), CC BY 4.0"
},
{
"name": "air-us",
"release": "2026-11-23T21:38Z",
"license": "Derived from AirNow (US EPA and partners), public domain"
}
],
"took_us": 19
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
That is the station at New Delhi's US embassy reading PM2.5 at the US AQI's very unhealthy level for most of a day.
from oslew import Client
client = Client(base_url="https://api.oslew.com", api_key="…")
week = client.events(at="36.6777,-121.6555", radius_m=50_000, category="quake",
order="newest", from_=1_795_046_400, to=1_795_478_400)
for q in week["results"]:
print(q["details"]["magnitude"], q["venue"], round(q["distance_m"] / 1000), "km away")import { Client } from "@oslew/client";
const client = new Client({ baseUrl: "https://api.oslew.com", apiKey: "…" });
const week = await client.events({ at: "36.6777,-121.6555", radius_m: 50_000, category: "quake",
order: "newest", from: 1_795_046_400, to: 1_795_478_400 });
for (const q of week.results) console.log(q.details.magnitude, q.venue, Math.round(q.distance_m / 1000), "km away");Licences
Each feed keeps its own terms, named in sources: the USGS's earthquakes are public domain; an air episode carries the licence of the station data it was derived from. Seedata and licensing.
Endpoints
/v1/eventsplatformEvents near a point or in a box overlapping a time range: ticketed events, earthquakes, and hours when air readings reached a city's alert level.