Earthquake data by API: what USGS gives you and how to use it
The main earthquake API is the US Geological Survey's: free, no key, public domain, with ready GeoJSON feeds (for example all magnitude 4.5+ quakes of the past week) and a query service that filters by time, magnitude and distance. A query returns at most 20,000 events. If you want a short, flat list for an app or AI agent, our Recent Earthquakes API wraps the same USGS data for $0.003 per call.
Try it free Earthquake API — recent quakes worldwide or near a point, $0.003 · $0.003 / call
Two ways to read USGS data
| Summary feeds | FDSN query service | |
|---|---|---|
| URL | earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson | earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&... |
| Filters | Fixed sets: past hour, day, week, month by magnitude band | Any time range, magnitude, radius, depth, order |
| Best for | Dashboards that refresh every minute | Searches and history |
| Limit | Whole feed each time | Up to 20,000 events per query |
Quakes near a point, from USGS directly
import requests
r = requests.get("https://earthquake.usgs.gov/fdsnws/event/1/query", params={
"format": "geojson", "starttime": "2026-11-25", "minmagnitude": 3,
"latitude": 35.68, "longitude": 139.69, "maxradiuskm": 300,
}, timeout=15)
for f in r.json()["features"]:
p = f["properties"]
print(p["mag"], p["place"], p["time"]) # time is milliseconds since 1970
Reading the fields correctly
- tsunami = 1 means USGS published tsunami information for the event. It is not a warning; check official tsunami centres for that.
- alert is the PAGER level (green, yellow, orange, red) for expected impact, and is empty for most events.
- Depth is the third coordinate, in kilometres. Shallow quakes of the same magnitude are usually felt more.
- USGS covers small quakes well inside the United States. Elsewhere it reliably lists bigger events but can miss small ones; regional agencies such as EMSC or national institutes fill that gap.
The pay-per-call version
Our API asks USGS for you and returns a flat list: magnitude, type, place, ISO time, coordinates, depth, tsunami flag, alert, felt reports and the event link, plus the id of the largest one. Pick a window (hour, day, week or month), a minimum magnitude, and optionally a point and radius (500 km by default). Up to 200 events per call; results refresh about every minute.
curl -i -X POST https://iamai.markets/api/x402/services/kHP-nWEYUBPF \
-H "Content-Type: application/json" \
-d '{"min_magnitude": 4.5, "window": "week"}'
# $0.003 per call; near a point: add "lat", "lon" and "radius_km"
The product
Questions
Is the USGS earthquake API free?
Yes, with no key. USGS-produced data is in the US public domain.
Can I get older earthquakes from your API?
No, only the past hour, day, week or month. For history, use the USGS query service with a start and end date.
Is this an early warning system?
No. Both USGS feeds and our API report quakes after they happen. Use official alert systems for warnings.
Related
Updated 2026-12-02
