USGS Earthquake Data Scraper (New Events JSON)
Pricing
from $1.50 / 1,000 earthquake delivereds
USGS Earthquake Data Scraper (New Events JSON)
Scrape USGS earthquakes from the official GeoJSON feeds: one validated JSON item per new event (event_id, magnitude, place, time, coordinates, depth, tsunami flag, event-page URL). Events are deduplicated by event_id, so no event is emitted or charged twice. No browser, no login, no API key.
Pricing
from $1.50 / 1,000 earthquake delivereds
Rating
0.0
(0)
Developer
Steadfetch
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 hours ago
Last modified
Share
Monitor earthquakes worldwide from the official, keyless USGS GeoJSON feeds. Choose a feed and a minimum magnitude, and get one structured dataset item per new event. No browser, no login, no API key.
What it does
The Actor reads one official USGS summary feed on each run and returns one dataset item per earthquake: event ID, magnitude and magnitude type, place, origin time, last update, coordinates and depth, contributing network, event type, review status, tsunami flag, and the official USGS event-page URL.
- Feeds:
1.0_day,2.5_day(default),4.5_day,all_day,all_weekandall_month, all underhttps://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/. - Magnitude filter:
minMagnitudeis applied locally after reading the feed, so you never download or pay for events below your threshold. - Monitor deduplication: every delivered
event_idis stored in a named key-value store that survives between runs (the default store is run-scoped in Apify). An event is emitted at most once, even if USGS later updates its magnitude or status; updates are not re-emitted or re-charged. - Budget:
maxEventscaps how many new events a run can deliver, keeping cost predictable. - Schema validation: every item is validated against
.actor/dataset_schema.jsonbefore it reaches the dataset. WithstrictSchema: true(the default) an invalid item fails the run instead of pushing malformed data. The item schema is strict (additionalProperties: false).
The data is public US government geophysical data. The Actor returns events only: no personal data and no contact fields. USGS provides the feeds for programmatic use and requires no login, API key or CAPTCHA.
Example output
{"url": "https://earthquake.usgs.gov/earthquakes/eventpage/nc75452606","event_id": "nc75452606","mag": 1.04,"mag_type": "md","place": "1 km SW of Anderson Springs, CA","time": "2026-10-20T17:02:30.890Z","updated": "2026-10-20T17:04:04.742Z","detail_url": "https://earthquake.usgs.gov/earthquakes/eventpage/nc75452606","coordinates": {"lon": -122.701667785645,"lat": 38.7693328857422,"depth_km": 1.4099999666214},"net": "nc","event_type": "earthquake","status": "automatic","tsunami": 0,"scrapedAt": "2026-10-20T17:20:00.000Z","source_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson"}
url is the mandatory Steadfetch envelope field and is identical to detail_url: both point at the official USGS event page. It is the only field added to the STE-99 example so every Steadfetch Actor satisfies the same dataset envelope enforced by the repository publish gate. source_url is the exact USGS feed used in the run. Records missing a required field are skipped and counted; the Actor never invents data.
Input
Minimal run (magnitude 2.5+ feed, no local magnitude filter, up to 1,000 new events):
{"feed": "2.5_day"}
A focused monitor:
{"feed": "all_week","minMagnitude": 4.5,"maxEvents": 200}
| Field | Type | Description |
|---|---|---|
feed | 1.0_day, 2.5_day, 4.5_day, all_day, all_week or all_month | USGS summary feed to read. Default 2.5_day (last 24 hours, magnitude 2.5+). |
minMagnitude | number | Only emit events with magnitude greater than or equal to this value. Default 0, range 0-10. |
maxEvents | integer | Maximum number of events saved to the dataset per run. Default 1000, range 1-5000. |
monitorMode | boolean | Default true: only event_ids not delivered by an earlier run are emitted (global dedupe). false re-delivers the selected feed up to maxEvents for a one-off backfill; the daily Store/QA probe uses false so it always has a small, non-empty deterministic input. |
strictSchema | boolean | Default true; fail the run on output-schema violations. |
The monitor state is global to the Actor: with monitorMode: true, an event_id already delivered is never emitted again, even if it appears in a wider feed later. That is what makes a scheduled monitor idempotent and cheap. Set monitorMode: false only for a deliberate backfill (it can re-deliver and charge events already seen by another run).
Project structure
.actor/actor.json Actor definition (payPerEvent, dataset schema, output schema).actor/input_schema.json INPUT options (feed, minMagnitude, maxEvents).actor/dataset_schema.json Strict item JSON Schema (fields) + table view for the Store.actor/pay_per_event.json PPE pricing (two synthetic platform events)src/usgs-client.ts USGS feed client: validated URL, retries, payload checkssrc/extract.ts Pure mapping, magnitude filter and deduplication (fixture-tested, no network)src/monitor-state.ts Pure monitor-state parse and merge rulessrc/main.ts Entry point: fetch, filter, validate, push, persist statesrc/validate-output.ts Ajv validator shared by the run and the teststest/ Offline GeoJSON fixtures and Vitest suites
Pay-per-event pricing
The Actor uses Apify pay-per-event pricing with the two synthetic platform events:
| Event | Charged when | Price |
|---|---|---|
apify-actor-start | a run starts (synthetic, automatic) | 0.00005 USD per run (Apify-recommended default; includes 5 seconds of free compute) |
apify-default-dataset-item | a new, validated event is saved to the dataset (synthetic, automatic) | 0.0015 USD per event = 1.50 USD per 1,000 events |
There is no custom per-item event and no Actor.charge() call: the platform already charges apify-default-dataset-item per pushed item, so adding another event would bill users twice. Empty results, feed errors, retries and events skipped by monitor deduplication are never charged.
The price sits 50% above the Store leader (1.00 USD per 1,000 events, 16 users and no ratings at the time of the STE-99 spec) and inside Steadfetch's 1-10 USD band. It is justified by the strict validated schema, cross-run monitor deduplication and daily QA, which the leader does not advertise.
Cost per 1,000 events
USGS charges nothing for the feeds. A 1,000-event run is one HTTP request (the all_month feed is about 7 MB), a few seconds of a 256 MB container and no proxy. Measured locally with the committed fixtures: 1,000 events fetched from memory, mapped, magnitude-filtered, schema-validated and serialized in under 0.2 seconds, using 256 MB. At Apify compute rates that is well below 0.02 USD per 1,000 events, so the gross margin at 1.50 USD per 1,000 is above 98%.
Development
npm installnpm test # lint + typecheck + offline Vitest suites (no credit)npm run publish:check # Steadfetch publish gatenpm run schemas:validate # apify-cli schema validationnpm run smoke # local Apify run against the live feed (no platform credit)
The default test suite runs against committed USGS GeoJSON fixtures and never touches the network or the Apify platform. It covers the real feed shape, the magnitude filter, maxEvents, monitor deduplication, malformed records and strict schema validation. A live feed check runs only with USGS_LIVE_TEST=1.
FAQ
Do I need a USGS API key? No. The summary feeds are keyless and public.
Does it need a browser? No. USGS returns structured GeoJSON; plain HTTP is cheaper and faster than a browser-based Actor.
How does monitor deduplication work?
Every delivered event_id is stored in a named key-value store that persists between runs (the default store is run-scoped in Apify). The next run filters those IDs out before applying maxEvents, so only new events are pushed and billed. The state keeps the 50,000 most recent event IDs, enough for several months of the all_month feed.
Does it return personal data? No. Only geophysical event fields and USGS URLs are returned. There are no personal names, email addresses or phone numbers in the output schema.
When am I charged?
Once per run start (apify-actor-start) and once per new event saved to the dataset (apify-default-dataset-item). Failed requests, retries, empty results and events already delivered by a previous monitor run are not charged.
Is the output schema stable? Yes. The strict schema is versioned with the Actor; new fields would be an additive, reviewed change and the required fields do not change silently.
Maintenance
This Actor is tested daily: automated runs check that the official USGS feeds are reachable and that the output still matches the published schema. Failures are reported as issues in the Steadfetch Actors repository.