# USGS Earthquake Event Search Export (`automation-lab/usgs-earthquake-events-search`) Actor

Export official USGS earthquake event IDs, magnitude, timestamps, coordinates and depth by date, magnitude and circular region.

- **URL**: https://apify.com/automation-lab/usgs-earthquake-events-search.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.48 / 1,000 item extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## USGS Earthquake Event Search Export

Search official **USGS earthquake events** by UTC date, magnitude and optional circular region. Export stable event IDs, magnitude, origin time, epicenter coordinates, hypocenter depth and source links to a dataset that can be downloaded as CSV or JSON. Results are ordered newest first.

### Who is this for?

Seismic researchers, emergency-planning teams and geospatial analysts can schedule bounded searches, compare event IDs and update times between runs, and feed results to a map or spreadsheet. This Actor does not provide alerts, forecasts or a continuously running stream.

### Why use this Actor?

The official FDSN GeoJSON API returns structured observations without browser automation or a paid proxy. Each output row includes source provenance and stable ID, making deduplication across scheduled runs practical. Magnitude and radius filters are sent directly to USGS rather than guessed from location names.

### Extracted data

| Field | Meaning |
| --- | --- |
| `eventId` | Stable USGS event identifier |
| `magnitude` | Reported magnitude; may be null |
| `time`, `updated` | UTC origin and last-updated timestamps |
| `latitude`, `longitude`, `depthKm` | Hypocenter coordinates and depth |
| `place`, `eventType` | USGS text and classification |
| `sourceUrl` | Official event page |

### Getting started

1. Enter a `startDate` and `endDate` in UTC (`YYYY-MM-DD`); use a narrow window for repeatable exports.
2. Choose a minimum magnitude and optional maximum.
3. To limit the region, supply **all three** of `latitude`, `longitude` and `radiusKm`.
4. Set `maxItems` (up to 10,000) and run. Download the default dataset in JSON, CSV or Excel.

### Input example

```json
{"startDate":"2026-09-01","endDate":"2026-09-02","minMagnitude":4,"maxItems":20}
```

Dates use UTC. Omitted dates use USGS defaults. The radius is kilometers from the center, not a city-name lookup. A missing optional maximum magnitude does not restrict the upper range. Invalid dates, magnitude bounds or incomplete coordinates fail before a network request.

### Output example

This record is from a local query for September 1, 2026 (the other fields may change when USGS revises an event):

```json
{"eventId":"us7000tfwm","magnitude":4.6,"time":"2026-09-01T23:46:31.673Z","longitude":-179.6367,"latitude":-25.2674,"depthKm":534.033,"place":"south of the Fiji Islands","sourceUrl":"https://earthquake.usgs.gov/earthquakes/eventpage/us7000tfwm"}
```

Some optional source attributes may be null when USGS has not supplied them. Billing uses one `item` event for each saved row; individual attributes have no separate charges.

### How much does it cost to export USGS earthquake events?

Pay-per-event pricing includes one `start` charge of **$0.001 per run** plus one `item` charge per saved earthquake event. The item price depends on the user's Apify monthly Store-spend tier: FREE $0.00092, BRONZE $0.0008, SILVER $0.000624, and GOLD/PLATINUM/DIAMOND $0.00048 per event. Higher tiers are discounts based on monthly Store spend, **not** the number of events in this run. An empty search incurs the start charge but no item charges. Your Apify platform usage and limits may also apply. Check the current Pricing tab before scheduling high-volume runs.

For example, at BRONZE 5 saved events cost approximately **$0.005** (one $0.001 start plus 5 × $0.0008); 100 saved events cost about **$0.081**. These are estimates, not guaranteed invoices. A smaller result cap can reduce item charges; rejected and duplicate source features have no item charge. Revenue/payout figures are estimates subject to refunds, fraud, disputes, taxes, corrections and contractual clawbacks.

### Integrations

Schedule a daily run with a rolling date range, then join datasets by `eventId` and compare `updated` to detect revisions. Use Apify integrations to send new rows to Google Sheets, webhooks, or a GIS ingestion job. Export via the dataset API for analysis in Python. This Actor itself does not persist cross-run state or send alerts.

### Using the Apify API

Replace `YOUR_TOKEN` with your Apify token. JSON input is sent to the Actor run endpoint; the synchronous endpoint returns dataset items:

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~usgs-earthquake-events-search/run-sync-get-dataset-items?token=YOUR_TOKEN' -H 'Content-Type: application/json' -d '{"startDate":"2026-09-01","endDate":"2026-09-02","minMagnitude":4,"maxItems":5}'
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/usgs-earthquake-events-search').call({ startDate: '2026-09-01', endDate: '2026-09-02', minMagnitude: 4, maxItems: 5 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Python:

```python
from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/usgs-earthquake-events-search').call(run_input={'startDate': '2026-09-01', 'endDate': '2026-09-02', 'minMagnitude': 4, 'maxItems': 5})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

### MCP use

Connect Claude Code to the Actor-specific Apify MCP endpoint:

```bash
claude mcp add --transport http apify 'https://mcp.apify.com?tools=automation-lab/usgs-earthquake-events-search'
```

For Claude Desktop, Cursor, or VS Code, use this MCP JSON configuration and authenticate following Apify MCP instructions:

````json
{"mcpServers":{"apify":{"type":"http","url":"https://mcp.apify.com?tools=automation-lab/usgs-earthquake-events-search"}}}
``` Example prompt: “Export up to 20 USGS earthquakes above magnitude 4 for September 1, 2026, and plot their depths.”

### Limits and troubleshooting

USGS catalog data can be revised; rerun old intervals when authoritative changes matter. The Actor pages through at most 10,000 results. An empty dataset may mean the filters genuinely match nothing: widen the dates or lower the magnitude. On USGS rate limiting or temporary server failure, the Actor retries twice before failing rather than silently returning an incomplete export. Large historical windows can take longer; narrow the date range and schedule multiple runs when needed.

### Legality and responsible use

Records are public official USGS data. Cite USGS when redistributing them, follow the [USGS earthquake data terms](https://earthquake.usgs.gov/fdsnws/event/1/) and avoid interpreting preliminary observations as verified predictions. The Actor does not collect personal information.

### Data freshness

USGS can revise magnitude, location, and origin data as analysts review an event. The exported update timestamp helps you detect that a previously seen event changed. For recurring monitoring, overlap your date windows instead of assuming events never change after their first appearance. This is a snapshot export, not an official emergency notification service.

### FAQ

**Can I search by city name?** No. Supply a center latitude, longitude and radius in kilometers.

**Why did the run return no events?** Check UTC dates, minimum magnitude and geographic radius. The Actor does not synthesize events when USGS returns none.

**Will it notify me of a new earthquake?** No; schedule the Actor and compare event IDs downstream. USGS timestamps and event values can be updated after initial publication.

### Related automation-lab Actors

For other official USGS data workflows, see [USGS River Gauge Levels Export](https://apify.com/automation-lab/usgs-river-gauge-levels) for hydrological observations and [USGS LiDAR Dataset Catalog Exporter](https://apify.com/automation-lab/public-lidar-dataset-catalog-exporter) for terrain catalog metadata. Neither is an earthquake event feed.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/usgs-earthquake-events-search/changelog.md

# Actor input Schema

## `startDate` (type: `string`):

UTC start date, inclusive (YYYY-MM-DD). Omit to use the USGS default window.
## `endDate` (type: `string`):

UTC end date (YYYY-MM-DD). Omit for current events.
## `minMagnitude` (type: `number`):

Minimum reported magnitude; negative values are supported by USGS.
## `maxMagnitude` (type: `number`):

Optional maximum reported magnitude.
## `latitude` (type: `number`):

Latitude for circular region; provide longitude and radiusKm as well.
## `longitude` (type: `number`):

Longitude for circular region; provide latitude and radiusKm as well.
## `radiusKm` (type: `number`):

Circular search radius around center coordinates, in kilometers.
## `maxItems` (type: `integer`):

Maximum earthquake records to export, newest first. Pages are fetched until the limit or catalog exhaustion.

## Actor input object example

```json
{
  "startDate": "2026-09-01",
  "endDate": "2026-09-02",
  "minMagnitude": 4,
  "maxItems": 20
}
````

# Actor output Schema

## `overview` (type: `string`):

Earthquake event IDs, times, magnitudes, coordinates and depths in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startDate": "2026-09-01",
    "endDate": "2026-09-02",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/usgs-earthquake-events-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startDate": "2026-09-01",
    "endDate": "2026-09-02",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/usgs-earthquake-events-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startDate": "2026-09-01",
  "endDate": "2026-09-02",
  "maxItems": 20
}' |
apify call automation-lab/usgs-earthquake-events-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/usgs-earthquake-events-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/K8cXzS3MHmRUgWlEL/builds/lOdTBMdEd0ZT7rO3x/openapi.json
