# USGS Earthquake Monitor & Catalog Search (`brightish_ascent/usgs-earthquake-monitor`) Actor

Unofficial; not affiliated with USGS. Search and monitor earthquakes from the official USGS catalog: magnitude, region, radius, depth, PAGER alert. Only-new results plus revisions (magnitude, status, alert changes) for scheduled runs.

- **URL**: https://apify.com/brightish_ascent/usgs-earthquake-monitor.md
- **Developed by:** [Michael Rice](https://apify.com/brightish_ascent) (community)
- **Categories:** Business, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 earthquake event rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Monitor & Catalog Search

**Unofficial.** Not affiliated with or endorsed by the U.S. Geological Survey (USGS) or the U.S. Department of the Interior. Data comes from the official [USGS Earthquake Catalog API](https://earthquake.usgs.gov/fdsnws/event/1/) (ANSS Comprehensive Catalog, ComCat). USGS-authored data is in the U.S. Public Domain ([USGS copyrights and credits](https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits)). Credit: U.S. Geological Survey.

Search earthquakes worldwide by magnitude, time, region (circle or bounding box), depth, USGS PAGER alert level and review status. Put it on a schedule with **Only new or changed since last run** to get just new events, plus events USGS has since revised.

### What you get

One row per event (`eventId`), newest first: magnitude and type, place, time (UTC), latitude, longitude, depth, event type, review status (automatic / reviewed), PAGER alert level, tsunami flag, significance, felt-report count, CDI/MMI intensity, network, all catalog ids, station/gap/rms quality values, USGS event page and detail links.
Rows also carry `updateType` (`new` / `changed` in monitor mode, otherwise `null`) and `changeHash`. `compact` output keeps the key fields, including `updateType` and `changeHash`.

### Input

| Field | Notes |
|---|---|
| minMagnitude / maxMagnitude | e.g. 4.5. Empty = any magnitude (many tiny events) |
| startTime / endTime | UTC, YYYY-MM-DD or ISO date-time. If both are empty, the last 7 days are used |
| latitude + longitude + maxRadiusKm | circle search |
| min/max latitude and longitude | bounding-box search (not together with a circle) |
| minDepthKm / maxDepthKm | depth filter |
| alertLevel | PAGER green, yellow, orange or red |
| reviewStatus | any, automatic or reviewed |
| earthquakesOnly | default true (excludes quarry blasts, explosions, etc.) |
| maxItems | rows per run, default 25, max 5000 |
| onlyNewSinceLastRun, lookbackDays | monitor mode, see below |
| outputFormat | full or compact |

Example: M4.5+ within 300 km of Los Angeles, only new or revised:

```json
{ "minMagnitude": 4.5, "latitude": 34.05, "longitude": -118.25, "maxRadiusKm": 300, "onlyNewSinceLastRun": true }
```

### Only new or changed since last run

The first run with a set of filters is a baseline: normal results, then a watermark is saved in a named key-value store in **your** Apify account (`usgs-earthquake-monitor-state`). Later runs with the same filters ask USGS only for events updated since the previous complete run, within `lookbackDays` (default 7) of the newest event delivered, and return:

- `new`: events not delivered before;
- `changed`: delivered events whose magnitude (to 0.1), magnitude type, review status, PAGER alert, tsunami flag, event type, location (to 0.01°) or depth (to 1 km) was revised.

Updates that touch only other fields (for example felt-report counts) are not re-sent. Revisions to events older than the lookback window are not re-sent. Changed rows are charged like any other row. If a run is cut short (maxItems or your cost limit), the rest arrive on the next run. If a baseline run is cut short, older matching events are not delivered later; run once without monitor mode to get them.

### Run summary

The `OUTPUT` record has `count`, `chargedCount`, the USGS request URL, `returnedByApi`, `truncated` (true only when more matching rows exist beyond `maxItems` or the cost limit, including on a cut-short monitor baseline, where `olderMatchesSkipped` is also true), monitor details (`newCount` and `changedCount`, counted from pushed rows, plus `skippedUnchanged`, the watermark and the cursor) and request stats.

### Limits and notes

- One USGS request per run in normal use. The Actor waits at least 250 ms between requests (retries included) and makes at most 20 per run. USGS returns at most 20,000 events per query; narrow the time or magnitude range for larger pulls.
- USGS automatic solutions are preliminary and are often revised; reviewed events can still change.
- This is not an early-warning or emergency tool. Do not use it for life-safety decisions; use official USGS/NOAA warnings.
- Deleted events are not reported: USGS omits deleted events from these queries, so an event that USGS later deletes simply stops appearing (no "deleted" row is sent).
- USGS sometimes re-associates an event under a new preferred id. In monitor mode that event shows up as a `new` row with the new `eventId`; its `allIds` list includes the older id(s), so you can match it to the earlier row.
- The catalog includes events contributed by ANSS regional networks and other contributors through USGS ComCat.

### Support

Questions or problems: digitalpromohub.support@gmail.com

# Actor input Schema

## `minMagnitude` (type: `number`):

e.g. 2.5 or 4.5. Empty = any (many small events).

## `maxMagnitude` (type: `number`):

Optional.

## `startTime` (type: `string`):

YYYY-MM-DD or ISO date-time in UTC. If start and end are empty, the last 7 days are used.

## `endTime` (type: `string`):

YYYY-MM-DD or ISO date-time in UTC.

## `latitude` (type: `number`):

Use with longitude and maxRadiusKm. Do not combine with a bounding box.

## `longitude` (type: `number`):

Center longitude in degrees (-180 to 180), e.g. -118.25. Use with latitude and maxRadiusKm.

## `maxRadiusKm` (type: `number`):

Radius around the center in kilometers, e.g. 300. Use with latitude and longitude.

## `minLatitude` (type: `number`):

Southern edge of the box in degrees (-90 to 90). Do not combine with a circle.

## `maxLatitude` (type: `number`):

Northern edge of the box in degrees (-90 to 90).

## `minLongitude` (type: `number`):

Western edge of the box in degrees. Values -360 to 360 allow boxes that cross the date line.

## `maxLongitude` (type: `number`):

Eastern edge of the box in degrees (-360 to 360).

## `minDepthKm` (type: `number`):

Shallowest hypocenter depth in km (negative = above sea level), e.g. 0.

## `maxDepthKm` (type: `number`):

Deepest hypocenter depth in km, e.g. 70 for shallow events only.

## `alertLevel` (type: `string`):

Only events with this USGS PAGER alert level. Empty = any (most events have no alert).

## `reviewStatus` (type: `string`):

automatic = preliminary solutions; reviewed = checked by a seismologist.

## `earthquakesOnly` (type: `boolean`):

Exclude quarry blasts, explosions and other event types.

## `maxItems` (type: `integer`):

Maximum rows per run (you pay per row). Default 25.

## `onlyNewSinceLastRun` (type: `boolean`):

For schedules: return events not delivered before with the same filters, plus delivered events whose magnitude, magnitude type, review status, PAGER alert, tsunami flag, type, location or depth was revised (updateType "changed"), while the event is within lookbackDays. First run is a baseline.

## `lookbackDays` (type: `integer`):

How far before the newest delivered event to keep watching for revisions and late-added events.

## `outputFormat` (type: `string`):

compact = key fields only.

## Actor input object example

```json
{
  "minMagnitude": 4.5,
  "reviewStatus": "any",
  "earthquakesOnly": true,
  "maxItems": 20,
  "onlyNewSinceLastRun": false,
  "lookbackDays": 7,
  "outputFormat": "full"
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset. full rows: eventId, title, magnitude, magnitudeType, place, time, eventDate, updated, latitude, longitude, depthKm, eventType, reviewStatus, alertLevel, tsunamiFlag, significance, feltReports, cdi, mmi, network, allIds, stations, gapDeg, rms, dminDeg, url, detailUrl, updateType (monitor mode: new | changed; otherwise null), changeHash, source. compact rows: a subset incl. updateType and changeHash.

## `runSummary` (type: `string`):

count, chargedCount, requestUrl, returnedByApi, truncated, incomplete, truncationNote, autoWindow, monitor-mode info (newCount, changedCount from pushed rows, skippedUnchanged, watermark, cursor), USGS request stats.

# 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 = {
    "minMagnitude": 4.5,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightish_ascent/usgs-earthquake-monitor").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 = {
    "minMagnitude": 4.5,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("brightish_ascent/usgs-earthquake-monitor").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 '{
  "minMagnitude": 4.5,
  "maxItems": 20
}' |
apify call brightish_ascent/usgs-earthquake-monitor --silent --output-dataset

```

## MCP server setup

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

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/CcgXAAdmQhHijp9hS/builds/yw5zFpNv2G0XDPEhF/openapi.json
