USGS Earthquake API
Free USGS earthquake API with no key: live global seismic events as GeoJSON, filterable by magnitude, time and location. Tested curl example and live response.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the USGS Earthquake API?
The USGS Earthquake API provides free real-time and historical earthquake data as GeoJSON. It covers global seismic events with filtering by magnitude, date range, location and depth, and requires no API key.
This is authoritative open government data from the United States Geological Survey, updated within minutes of an event being detected. It is not an aggregator or a scrape — it is the primary source that news organisations use.
The response is standard GeoJSON, which means it drops directly into Leaflet, Mapbox or any mapping library with no transformation. One detail worth noting: GeoJSON coordinates are ordered `[longitude, latitude, depth]`, which is the reverse of the lat/lon order most people expect.
Quick facts
- Base URL
https://earthquake.usgs.gov/fdsnws/event/1- Authentication
- No key required.
- Rate limit
- No published hard limit; USGS asks that you avoid excessive polling and use date filters.
- Pricing
- Free public domain government data.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the USGS Earthquake API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Fetch the most recent earthquake
GET https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time
curl 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time'const res = await fetch("https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time", timeout=20)
res.raise_for_status()
print(res.json()){
"type": "FeatureCollection",
"metadata": {
"generated": 1787144815000,
"url": "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time",
"title": "USGS Earthquakes",
"status": 200,
"api": "2.7.0",
"limit": 1,
"offset": 1
},
"features": [
{
"type": "Feature",
"properties": {
"mag": 1.79,
"place": "23 km SE of Naalehu, Hawaii",
"time": 1787143340800,
"updated": 1787143562450,
"tz": null,
"url": "https://earthquake.usgs.gov/earthquakes/eventpage/hv75020732",
"detail": "https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=hv75020732&format=geojson",
"felt": null,
"cdi": null,
"mmi": null,
"alert": null,
"status": "automatic",
"tsunami": 0,
"sig": 49,
"net": "hv",
"code": "75020732",
"ids": ",hv75020732,",
"sources": ",hv,",
"types": ",origin,phase-data,",
"nst": 12,
"dmin": 0.2264,
"rms": 0.109999999,
"gap": 259,
"magType": "md",
"type": "earthquake",
"title": "M 1.8 - 23 km SE of Naalehu, Hawaii"
},
"geometry": {
"type": "Point",
"coordinates": [
-155.446166992188,
18.8939990997314,
29.6000003814697
]
},
"id": "hv75020732"
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | Required | Use `geojson` for map-ready output. geojson |
limit | integer | Optional | Maximum number of events. 10 |
minmagnitude | float | Optional | Only return events at or above this magnitude. 4.5 |
starttime / endtime | string | Optional | ISO dates bounding the query. 2026-01-01 |
latitude / longitude / maxradiuskm | float | Optional | Restrict to a circular region. 31.5 |
orderby | string | Optional | time, time-asc, magnitude or magnitude-asc. magnitude |
Response fields
featuresarray- GeoJSON features, one per earthquake.
features[].properties.magfloat- Magnitude of the event.
features[].properties.placestring- Human-readable location description.
features[].properties.timeinteger- Event time as Unix milliseconds, not seconds.
features[].geometry.coordinatesarray- [longitude, latitude, depth in km] — note the order.
metadata.countinteger- Number of events returned.
What you can build with the USGS Earthquake API
- Plot live earthquakes on an interactive map
- Alert users to significant seismic events near a location
- Research historical seismic activity over date ranges
- Build data visualisations and educational science resources
Common errors and how to fix them
400
Invalid parameter combination or malformed date.
Fix: Use ISO 8601 dates and check that minmagnitude is numeric.
Markers plotted in the wrong place
GeoJSON orders coordinates as [longitude, latitude].
Fix: Swap them — most mapping code expects latitude first.
Timestamps far in the future
`time` is Unix milliseconds, not seconds.
Fix: Do not multiply by 1000 again; pass it straight to a Date constructor.
USGS Earthquake API — frequently asked questions
Is the USGS earthquake API free?
Yes, completely free with no API key. It is public domain US government data, updated within minutes of detection.
What format does the USGS API return?
Several, but GeoJSON is the most useful — it drops straight into Leaflet, Mapbox or any standard mapping library without transformation.
Why are my earthquake markers in the wrong location?
GeoJSON stores coordinates as [longitude, latitude, depth], which is the opposite order to what most mapping code expects. Swap the first two values.
How do I get only significant earthquakes?
Use `minmagnitude` — 4.5 and above captures events that are typically newsworthy, while the default returns everything including tiny tremors.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Unit Converter
Convert between units of length, weight, temperature, area, volume, speed, time and data storage instantly, with a swap button and common conversion tables.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
USGS Earthquake is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.