# 🌍 USGS Earthquake Intelligence - Live Seismic Data (`benthepythondev/earthquake-intelligence`) Actor

Real-time earthquake data from USGS. Get magnitude, location, depth, tsunami warnings, and shake intensity for recent seismic events worldwide. Filter by region, magnitude, and time period. Perfect for researchers, emergency services, insurance, and news organizations.

- **URL**: https://apify.com/benthepythondev/earthquake-intelligence.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Other, News, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 results

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 Intelligence

**Extract real-time earthquake data worldwide from USGS. Get magnitude, location, depth, tsunami warnings, and alert levels. Filter by region, magnitude, or proximity to any location.**

### What you get

- **32 structured fields per record** — `alert`, `cdi`, `code`, `depth_km`, `detail_url`, `distance_to_nearest_station`, `event_ids`, `event_type`…
- **Clean, validated JSON** ready for your pipeline
- **Pre-built dataset Overview** in the Apify Console for instant inspection
- **Reliable & maintained** — patched whenever the source changes

### Why this actor (vs. alternatives)

| | Build your own | Generic scraper | **This actor** |
|---|---|---|---|
| Maintenance | You patch every change | Often broken | Patched continuously |
| Structured output | Manual parsing | Inconsistent | Validated schema |
| Setup time | Days | Hours | Minutes |
| Pay only for results | N/A | Varies | Yes (pay-per-use) |

### Input

| Field | Type | Description |
|---|---|---|
| `mode` **(required)** | `string` | How to query earthquake data Options: `recent`, `significant`, `by_location`, `by_region` |
| `daysBack` | `integer` | How many days of earthquake data to fetch |
| `period` | `string` | Time period for significant earthquakes Options: `hour`, `day`, `week`, `month` |
| `minMagnitude` | `number` | Filter earthquakes by minimum magnitude (0-10 Richter scale) |
| `maxMagnitude` | `number` | Filter earthquakes by maximum magnitude |
| `latitude` | `number` | Center latitude for location-based search (-90 to 90) |
| `longitude` | `number` | Center longitude for location-based search (-180 to 180) |
| `radiusKm` | `number` | Search radius in kilometers from center point |
| `region` | `string` | Predefined seismic regions Options: `california`, `japan`, `indonesia`, `chile`, `alaska`, `mediterranean` |
| `alertLevel` | `string` | Filter by PAGER alert level Options: `green`, `yellow`, `orange`, `red` |
| `maxResults` | `integer` | Maximum number of earthquakes to return |

### Example Input

```json
{
  "mode": "recent",
  "daysBack": 7,
  "period": "week",
  "radiusKm": 500,
  "maxResults": 100
}
```

### Output (sample)

```json
{
  "id": "av94211738",
  "magnitude": 1.73,
  "magnitude_type": "ml",
  "severity": "minor",
  "place": "Rat Islands, Aleutian Islands, Alaska",
  "time": "2026-05-27T23:50:27.020000+00:00",
  "updated": "2026-05-28T00:29:00.350000+00:00",
  "timezone_offset": null,
  "longitude": 178.402666666667,
  "latitude": 52.0071666666667,
  "depth_km": 2.72,
  "url": "https://earthquake.usgs.gov/earthquakes/eventpage/av94211738",
  "detail_url": "https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=av94211738&format=ge...",
  "felt_reports": null,
  "cdi": null,
  "mmi": null,
  "alert": null,
  "status": "reviewed"
}
```

### Use cases

- **News aggregators** — auto-update with the latest events
- **Educational platforms** — teach with real scientific data
- **Dashboards** — visualize trends and events
- **Alerting / safety** — trigger on significant events
- **Research** — analyze patterns over time

### Pricing

**Pay-Per-Event:**

- $0.001 per result
- $0.00005 actor-start fee

#### Example runs

| Use case | Results | Cost |
|---|---|---|
| Quick scan | 100 | **$0.10** |
| Standard run | 500 | **$0.50** |
| Bulk dataset | 2,000 | **$2.00** |

### FAQ

**Q: How fresh is the data?**\
A: Real-time — every run fetches live from the source.

**Q: Do I pay for failed or empty runs?**\
A: You pay per result returned, plus a tiny actor-start fee.

**Q: Can I schedule recurring runs?**\
A: Yes — use the Apify Console scheduler for daily/weekly automation.

**Q: Can I export the data?**\
A: Yes — JSON, CSV, Excel, and API access are all supported by Apify.

### Related actors

- **[nasa-space-intelligence](https://apify.com/benthepythondev/nasa-space-intelligence)** — NASA space data
- **[noaa-weather-alerts-intelligence](https://apify.com/benthepythondev/noaa-weather-alerts-intelligence)** — NOAA weather alerts
- **[open-brewery-db-business-intelligence](https://apify.com/benthepythondev/open-brewery-db-business-intelligence)** — brewery data

### Legal & compliance

This actor retrieves publicly accessible data only. You are responsible for respecting the source's Terms of Service, honoring robots.txt, and complying with GDPR / applicable regulations for any personal data.

### Support & feature requests

Open an issue on the Actor page or contact via Apify Console messaging. Custom features welcome.

# Actor input Schema

## `mode` (type: `string`):

How to query earthquake data

## `daysBack` (type: `integer`):

How many days of earthquake data to fetch

## `period` (type: `string`):

Time period for significant earthquakes

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

Filter earthquakes by minimum magnitude (0-10 Richter scale)

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

Filter earthquakes by maximum magnitude

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

Center latitude for location-based search (-90 to 90)

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

Center longitude for location-based search (-180 to 180)

## `radiusKm` (type: `number`):

Search radius in kilometers from center point

## `region` (type: `string`):

Predefined seismic regions

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

Filter by PAGER alert level

## `maxResults` (type: `integer`):

Maximum number of earthquakes to return

## Actor input object example

```json
{
  "mode": "recent",
  "daysBack": 7,
  "period": "week",
  "radiusKm": 500,
  "maxResults": 100
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/earthquake-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/earthquake-intelligence").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 '{}' |
apify call benthepythondev/earthquake-intelligence --silent --output-dataset

```

## MCP server setup

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

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/P7ZnRYmFO4IboHcGm/builds/Xfy79PKERGTY2SemE/openapi.json
