USGS Earthquake Catalog Search avatar

USGS Earthquake Catalog Search

Pricing

$0.80 / 1,000 earthquake records

Go to Apify Store
USGS Earthquake Catalog Search

USGS Earthquake Catalog Search

Query public USGS historical earthquake catalog records by dates, magnitude and bounding box. Returns event times, coordinates, depth and source links for research and human analysis. No alerts or emergency guarantees.

Pricing

$0.80 / 1,000 earthquake records

Rating

0.0

(0)

Developer

Atesen Software

Atesen Software

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Query public earthquake catalog metadata from the official U.S. Geological Survey FDSN Event API. Filter by UTC date range, magnitude and an optional bounding box. Export event IDs, origin times, magnitude, depth, coordinates, place, catalog review status, network and USGS event-page links for research and human analysis.

This Actor queries catalog data. Catalog entries can be preliminary, revised, deleted or delayed. It does not provide earthquake prediction, emergency alerts, safety instructions or guaranteed real-time coverage. For real-time display applications USGS recommends its dedicated GeoJSON feeds instead of repeated catalog queries.

Example

{"startDate":"2024-01-01","endDate":"2024-01-02","minMagnitude":5,"maxResults":1,"maxRequests":2}

Dates must be valid YYYY-MM-DD UTC dates with the end after the start, at most 366 days apart. Without dates the Actor queries the previous seven days up to midnight UTC today. USGS includes the start boundary and may include the exact end boundary. Magnitudes range from -2 to 10. To select an area, supply all four minLatitude, maxLatitude, minLongitude, maxLongitude numbers. Minimums must be strictly below maximums; split regions crossing the antimeridian into separate runs.

Bounds and completion

The Actor uses only https://earthquake.usgs.gov/fdsnws/event/1/query, requests earthquake events ordered by descending origin time, makes serial pages of at most 20 events, deduplicates by USGS event ID, and caps output at 100 events and external requests at five including retries. No login, API key, browser, proxy, attachments or follow-up event-detail downloads are used. It rejects arbitrary URLs and unknown input fields. Responses are limited to 2 MiB and requests to 20 seconds; redirects are rejected. Concurrent catalog revisions can affect offset pagination: results are a bounded query rather than a reproducible catalog snapshot.

429/503 receive at most one retry within the total request cap. A numeric or HTTP-date Retry-After greater than three seconds stops the run with a clear status instead of retrying early. Missing retry headers use a one-second delay. Network errors receive at most one retry. Other HTTP failures, malformed JSON/GeoJSON and unexpected storage errors never become a successful zero-event result. Only a validated empty collection or HTTP 204 means no matching events.

Dataset rows use recordType: "earthquake" for results and recordType: "status" for a free run summary. OUTPUT in the key-value store has status, resultRows, requests and message. Check it before treating a run as complete. request_limit, rate_limited, upstream_error, pagination_stalled or unexpected errors can leave partial rows and fail the run. Input errors and budget limits have explicit statuses. A genuine empty query completes with zero paid events.

Output and pricing

Each earthquake contains eventId, time (UTC ISO), magnitude (nullable if absent in USGS), magnitudeType, depthKm, latitude, longitude, place, status, network, updatedAt, sourceUrl, attribution and queriedAt. Negative depth values, where supplied by USGS, are preserved. status is the source catalog review status, not a safety assessment. Dataset and summary counters refer only to stored earthquake records.

Each saved earthquake record triggers one result event. See the Store pricing tab for the current rate. Status rows, no-match results and invalid inputs have no named result charge. Apify platform usage may apply separately. The Actor checks available result budget before making any external request and before storing each record. With zero result budget it makes no USGS request. The named result event's before/after counter is used because SDK 3.7.2 can aggregate a synthetic dataset event in chargedCount.

Local use

Requires Node.js 22 or later.

npm ci --ignore-scripts
npm test
LOCAL_MODE=1 OUTPUT_DIR=data INPUT_PATH=input.example.json npm start

PowerShell:

$env:LOCAL_MODE='1'; $env:OUTPUT_DIR='data'; npm start

Local mode writes dataset.json and OUTPUT.json without an Apify account and does not simulate cloud billing. npm test is deterministic and offline. Cloud SDK version is pinned to 3.7.2, with basic-ftp 6.2.3 override.

Sources and attribution

Source: U.S. Geological Survey, Earthquake Hazards Program. No endorsement by USGS is implied. Retain source links and attribution when using or redistributing records. Respect service availability and avoid repetitive catalog polling.

Use via API

One request runs the Actor, waits for it and returns the dataset items as JSON. Send your token in the Authorization header, not in the URL:

curl -X POST "https://api.apify.com/v2/acts/atesen-software~usgs-earthquake-search/run-sync-get-dataset-items?timeout=120" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startDate":"2024-01-01","endDate":"2024-01-07","minMagnitude":5,"maxResults":20}'

The synchronous endpoint waits up to 300 seconds. For longer jobs start a run with POST https://api.apify.com/v2/acts/atesen-software~usgs-earthquake-search/runs and read the dataset when it finishes.

JavaScript (npm install apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('atesen-software/usgs-earthquake-search').call({ startDate: "2024-01-01", endDate: "2024-01-07", minMagnitude: 5, maxResults: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Use with AI agents (MCP)

Claude Desktop, Cursor, VS Code and other MCP clients can call this Actor as a tool through the Apify MCP server. Load only this Actor with:

https://mcp.apify.com?tools=atesen-software/usgs-earthquake-search

Client config (sign in with Apify OAuth when the browser opens, or add an Authorization: Bearer <APIFY_TOKEN> header instead):

{
"mcpServers": {
"apify": { "url": "https://mcp.apify.com?tools=atesen-software/usgs-earthquake-search" }
}
}

Then ask in plain words, for example: "List earthquakes of magnitude 5 or more between 1 and 7 January 2024 with place, depth and time." The agent fills the same input fields you see on the Input tab, and runs are billed to your Apify account at the prices on the Pricing tab.