USGS Earthquakes

Weather API · Earthquakes · Seismic data · USGS · Real-time GeoJSON

TL;DR

The USGS Earthquake API provides real-time seismic event data from monitoring stations worldwide. Query earthquakes by minimum magnitude, time range, and geographic region. Multiple feed options: 2.5_day (M2.5+ past day), all_day (all magnitudes past day), significant_week (notable events past week), and more. Returns GeoJSON with magnitude, location, depth, time, tsunami alert status, and detailed event URLs. No API key required.

Quick start: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson

No API key needed — free USGS earthquake data!

How to Use This API

1. Get M2.5+ Earthquakes (Past Day)

Returns all earthquakes of magnitude 2.5 or greater in the last 24 hours:

https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson

2. Get All Earthquakes (Past Day)

https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson

3. Significant Earthquakes (Past Week)

https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_week.geojson

4. JavaScript — Map Recent Quakes

fetch('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson')
  .then(r => r.json())
  .then(data => {
    console.log(`Earthquakes in last 24h: ${data.metadata.count}`);
    data.features.forEach(eq => {
      const props = eq.properties;
      const [lon, lat, depth] = eq.geometry.coordinates;
      console.log(`M ${props.mag} — ${props.place}`);
      console.log(`  ${new Date(props.time).toLocaleString()}`);
      console.log(`  Depth: ${depth}km, Tsunami: ${props.tsunami ? 'YES' : 'No'}`);
      console.log(`  URL: ${props.url}`);
    });
  });

5. Python — Filter by Magnitude

import requests

data = requests.get(
    'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson'
).json()

large = [f for f in data['features'] if f['properties']['mag'] >= 4.5]
print(f"Large quakes (M4.5+) today: {len(large)}")
for eq in sorted(large, key=lambda x: x['properties']['mag'], reverse=True):
    p = eq['properties']
    print(f"  M{p['mag']} — {p['place']} ({p['depth']}km deep)")
M2.5+ past day: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson

Frequently Asked Questions

What earthquake feeds are available?
Available feeds: 2.5_day, 2.5_week, 2.5_month, all_day, all_week, all_month, significant_day, significant_week, significant_month, and 4.5_day. Also available by geographic region (US, Alaska, Hawaii, etc.).
What does the GeoJSON response contain?
Each feature includes: mag (magnitude), place (location description), time (epoch ms), updated, url (USGS event page), detail (detailed feed URL), tsunami (0/1 alert), magType, depth, and coordinate array [lon, lat, depth].
How recent is the data?
Real-time — earthquake data is available within minutes of detection. The USGS monitors seismic networks worldwide and updates feeds continuously as events are recorded and verified.
Can I query historical earthquakes?
Yes — use the USGS Search API at https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson with parameters for start/end time, min/max magnitude, region, and more.
What other formats are supported?
In addition to GeoJSON, the API supports CSV, KML, and XML formats. Change the file extension or use the query API's format parameter.
Does it include tsunami alerts?
Yes — the tsunami field indicates if a tsunami warning was issued (1 = warning/ watch/ advisory). The detailed event page includes further tsunami information.

API Details

API URL
https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/
Documentation
USGS GeoJSON Feed
Category
Weather
Authentication
Not Required
Update Frequency
Real-time (typically within minutes)

What You Can Build