L logiover
data · Jul 9, 2026 · 7 min read

How to Scrape USGS Earthquake Data & Seismic Events in 2026

Pull global earthquake events from the USGS public API: magnitude, depth, coordinates, tsunami flag, PAGER alert and felt reports. Filter by time. No API key.

Earthquake data is one of the cleanest public datasets on the internet — real-time, global, government-maintained, and fully public domain. The USGS publishes it through an official FDSN Web Service that returns GeoJSON, but the raw feed hands you a nested FeatureCollection, caps responses at 20,000 events, and does nothing to flatten the properties into rows. If you want a month of global M 2.5+ activity, or every quake inside a bounding box around a fault zone, you still have to parse the GeoJSON, manage the cap, and reshape it. This guide covers what the USGS API exposes, how the endpoint is structured, and how to pull clean seismic rows at scale.

What’s worth extracting

Each earthquake resolves to a flat record. The core fields — about 15 of them, plus supplementary scientific measures — group like this:

  • Identity & timingid (USGS event ID, e.g. us7000mwak), time (origin time, ISO 8601 UTC, millisecond precision), updated, and title (e.g. “M 5.1 - 42 km SSE of Haines, Alaska”).
  • Locationplace (human-readable), longitude, latitude (WGS-84 decimal degrees), and depth in kilometers.
  • Magnitudemagnitude (preferred value) and magType (the scale: ml, mb, mw, mww, etc.).
  • Impact signalstsunami (1 if a tsunami message was issued), felt (“Did You Feel It?” response count), cdi (max community-sourced intensity), mmi (max instrumental intensity), alert (PAGER level: green/yellow/orange/red), and sig (a 0–1000 significance score).
  • Provenance & qualitystatus (automatic vs reviewed), type (earthquake, quarry blast, ice quake, etc.), net, code, and the url to the USGS event page.
  • Location-quality metricsnst (stations used), gap (largest azimuthal gap), rms (travel-time residual), and dmin (distance to nearest station).

The impact and quality fields are what separate a raw feed from an analysis-ready one: alert and sig let you triage significant events, while status, gap, and rms let seismologists filter for location accuracy.

How the source actually works

The scraper queries the USGS Earthquake Hazards Program’s FDSN Web Service at earthquake.usgs.gov/fdsnws/event/1/query — a free, keyless REST endpoint providing real-time and historical seismic data for the entire planet. You supply a time window and optional filters; the API returns a GeoJSON FeatureCollection, and the actor parses every feature into a row.

A typical global run — all significant (M 4.0+) quakes in a month — looks like:

{
  "mode": "query",
  "startTime": "2026-06-01",
  "endTime": "2026-07-01",
  "minMagnitude": 4.0,
  "maxResults": 20000
}

For regional studies, four bounding-box parameters scope the query to a country or fault zone. A Japan-focused pull adds latitude/longitude corners:

{
  "mode": "query",
  "startTime": "2026-06-01",
  "endTime": "2026-07-01",
  "minMagnitude": 4.0,
  "minLatitude": 30,
  "maxLatitude": 47,
  "minLongitude": 129,
  "maxLongitude": 146
}

There are two modes. query returns full event records. count returns a single row with just a count and USGS metadata — useful for checking how many events match before committing to a full extraction:

{
  "mode": "count",
  "startTime": "2025-07-01",
  "endTime": "2026-07-01",
  "minMagnitude": 6.0
}

The other inputs are minMagnitude (default 2.5), maxMagnitude (optional), maxResults (default and hard-capped at 20,000), and a proxy object — datacenter is sufficient for USGS.

Magnitude threshold is the main lever on both volume and meaning. At M 2.5+ a 30-day global window returns roughly 8,000–15,000 events — comprehensive but noisy with small regional tremors. At M 4.0+ the same month returns a few hundred events, which is the “significant global activity” band most dashboards and newsrooms actually want. Raising the floor is also how you keep a long historical span under the 20,000-event cap without splitting it into windows.

Open the USGS Earthquake Scraper on Apify — one run turns a time range and magnitude threshold into thousands of structured seismic rows with magnitude, depth, coordinates and alert level. No key, no login. Export to CSV, JSON or Excel.

The access reality

The USGS endpoint is a public government data service, so there’s no anti-bot layer — the constraints are the API’s own limits and the nature of seismic data:

  • 20,000 events per request, hard cap. This is the FDSN API’s own limit, not the actor’s. A 30-day window at M 2.5+ globally yields roughly 8,000–15,000 events, so it usually fits. For lower thresholds or longer spans that would exceed 20,000, split into shorter time windows and merge the datasets.
  • Keyless and unrestricted. No signup, no API key, no credits. USGS provides the FDSN service explicitly for automated retrieval by researchers, developers, and the public.
  • Near-real-time freshness. New automatic detections typically appear within 5–15 minutes of an event; reviewed events are updated within hours to days depending on significance.
  • Optional fields are sparse for small events. felt, cdi, mmi, and alert populate only for significant earthquakes that triggered PAGER reports or received DYFI responses. alert is null for the majority of small events — expected, not an error.
  • Fast. A single request returns up to 20,000 events in one HTTP call, so total run time is typically 30–90 seconds including startup and dataset push.

Example output

One event record:

{
  "id": "us7000mwak",
  "time": "2026-06-15T03:22:41.820Z",
  "place": "42 km SSE of Haines, Alaska",
  "magnitude": 5.1,
  "magType": "mww",
  "longitude": -135.1432,
  "latitude": 59.0871,
  "depth": 10.0,
  "tsunami": 0,
  "felt": 234,
  "cdi": 4.8,
  "mmi": 5.2,
  "alert": "green",
  "status": "reviewed",
  "type": "earthquake",
  "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us7000mwak",
  "title": "M 5.1 - 42 km SSE of Haines, Alaska",
  "sig": 400,
  "nst": 87,
  "gap": 34,
  "rms": 0.71
}

Typical use cases

  • Global earthquake feed — pull all M 2.5+ quakes from the past 30 days and refresh a public dashboard or newsletter automatically.
  • Regional hazard analysis — filter by bounding box (Japan, Turkey, California) to build a time-series of local seismicity for research.
  • Tsunami-risk monitoring — post-filter tsunami === 1 to identify quakes that triggered tsunami messages over a historical period.
  • Felt-report analysis — collect events with high felt counts to study public-impact patterns for urban resilience work.
  • ML training data — produce labeled datasets (magnitude, depth, location, alert level) for earthquake-classification or early-warning models.
  • Insurance & reinsurance — assess seismic exposure and historical loss accumulation for a portfolio of locations.

Build it yourself vs. use the actor

The USGS API is free and documented, so a direct fetch is a one-liner. The maintenance is in the handling: parsing the nested GeoJSON FeatureCollection into flat rows, managing the 20,000-event cap by splitting time windows, ISO-converting the millisecond timestamps, and dealing with the many optional properties that are null on small events. It’s a small parser you’d own.

The actor is that parser, packaged, with count mode included so you can size a query first. Pricing is pay-per-result — a small fraction of a cent per event plus a negligible start fee — and the USGS data is free and public domain. For a month of global M 4.0+ (a few hundred events) that’s a trivial cost, and the GeoJSON flattening is solved.

Common pitfalls

Specific gotchas with USGS seismic data:

  • Watch the 20,000 cap. Low magnitude thresholds over long spans blow past it silently — you’d get a truncated dataset. Use count mode first, then split into shorter windows if the count is high.
  • Bounding-box order matters. Coordinates must satisfy minLat below maxLat and minLon below maxLon. Reversed corners return zero results.
  • automatic vs reviewed. Machine-processed (automatic) events can have slightly less accurate locations. For scientific work, filter to status === "reviewed".
  • Null alert is the norm. Most small events have no PAGER alert. Don’t treat a null alert as missing data — it means the event wasn’t significant enough to trigger one.
  • Depth affects surface impact. Shallow quakes (depth under 70 km) generally cause more surface damage than deep ones at the same magnitude. Filter on depth for structural-engineering analysis.
  • Event type isn’t just earthquakes. The type field includes quarry blast, explosion, ice quake, and sonic boom. There’s no input filter for type, so post-filter on the output if you want earthquakes only.

Wrapping up

USGS earthquake data is a model public dataset, but the raw FDSN feed hands you nested GeoJSON and a 20,000-event ceiling, not rows. If you need a one-off pull, the endpoint is open and worth scripting. If you need a refreshed seismic feed on a schedule — a live monitoring dashboard, a rolling regional catalog — let the actor own the GeoJSON parsing, the cap management, and the timestamp conversion and hand you clean rows.

Run the USGS Earthquake Scraper on Apify — reads the USGS FDSN Web Service directly: magnitude, depth, coordinates, tsunami flag, PAGER alert and felt reports, up to 20,000 events per query. No API key, no login. Start on Apify’s free monthly credit.

Related guides