# USGS Earthquake Data Scraper by Birds Nest Data (`birds-nest-data/usgs-earthquakes`) Actor

Export earthquake data from the USGS catalog as JSON or CSV: time, magnitude, location, depth and alert level. Filter by region, date and magnitude. No API key needed.

- **URL**: https://apify.com/birds-nest-data/usgs-earthquakes.md
- **Developed by:** [Birds Nest Data](https://apify.com/birds-nest-data) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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 Data Scraper by Birds Nest Data

Export earthquake data from the USGS catalog as JSON or CSV: time, magnitude, location, depth and alert level. Filter by region, date and magnitude. No API key needed.

> Unofficial tool. Not affiliated with or endorsed by the U.S. Geological Survey (USGS). Data provided as-is from https://earthquake.usgs.gov.

> Not for emergency response or earthquake early warning; use official USGS/ShakeAlert channels.

### What it does

Returns earthquake events from the USGS catalog, newest first, as one flat row per event with time, magnitude, place, coordinates, depth, alert level and tsunami flag. Built for insurers and risk analysts, logistics and facilities teams, and researchers or newsrooms.

### What you get

| Field | Type | Example |
|---|---|---|
| event_id | string | `"aka2026upynvp"` |
| time | string | `"2026-10-18T04:05:46.635Z"` |
| updated | string | `"2026-10-18T04:27:24.040Z"` |
| magnitude | number | `2.8` |
| magnitude_type | string | `"ml"` |
| place | string | `"21 km N of Larsen Bay, Alaska"` |
| latitude | number | `57.73` |
| longitude | number | `-153.987` |
| depth_km | number | `28.7` |
| event_type | string | `"earthquake"` |
| status | string | `"automatic"` |
| alert_level | string or null | `null` |
| tsunami_flag | boolean | `false` |
| significance | number | `121` |
| felt_reports | number | `3` |
| network | string | `"ak"` |
| url | string | `"https://earthquake.usgs.gov/earthquakes/eventpage/aka202...` |
| source | string | `"USGS Earthquake Hazards Program (earthquake.usgs.gov)"` |
| credit | string | `"Credit: U.S. Geological Survey"` |

### Use cases

- List recent earthquakes near your sites, warehouses or insured properties.
- Build a history of earthquakes above a magnitude in a region for risk analysis.
- Send new earthquake events to a spreadsheet or alert through the Apify API.
- Get clean earthquake data for research, teaching or a newsroom map.

### How to use

1. Leave the defaults to get the 50 newest magnitude 2.5+ earthquakes worldwide from the last 7 days, or pick a region, dates and minimum magnitude.
2. Click **Run**.
3. Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Input example

```json
{
  "region": "WORLD",
  "minMagnitude": "2.5",
  "maxResults": 50
}
```

### Output example

Two records from a real run on 2026-10-17 (PT) with the default input:

```json
[
 {
  "event_id": "aka2026upynvp",
  "time": "2026-10-18T04:05:46.635Z",
  "updated": "2026-10-18T04:27:24.040Z",
  "magnitude": 2.8,
  "magnitude_type": "ml",
  "place": "21 km N of Larsen Bay, Alaska",
  "latitude": 57.73,
  "longitude": -153.987,
  "depth_km": 28.7,
  "event_type": "earthquake",
  "status": "automatic",
  "alert_level": null,
  "tsunami_flag": false,
  "significance": 121,
  "felt_reports": null,
  "network": "ak",
  "url": "https://earthquake.usgs.gov/earthquakes/eventpage/aka2026upynvp",
  "source": "USGS Earthquake Hazards Program (earthquake.usgs.gov)",
  "credit": "Credit: U.S. Geological Survey"
 },
 {
  "event_id": "ok2026ujzg",
  "time": "2026-10-18T01:41:24.579Z",
  "updated": "2026-10-18T03:22:53.853Z",
  "magnitude": 2.75,
  "magnitude_type": "ml",
  "place": "2 km NW of Ratliff City, Oklahoma",
  "latitude": 34.46,
  "longitude": -97.52683333,
  "depth_km": 6,
  "event_type": "earthquake",
  "status": "reviewed",
  "alert_level": null,
  "tsunami_flag": false,
  "significance": 118,
  "felt_reports": 3,
  "network": "ok",
  "url": "https://earthquake.usgs.gov/earthquakes/eventpage/ok2026ujzg",
  "source": "USGS Earthquake Hazards Program (earthquake.usgs.gov)",
  "credit": "Credit: U.S. Geological Survey"
 }
]
```

### Pricing (pay-per-event)

- **Result:** $1.00 per 1,000 results ($0.001 for each earthquake event saved to the dataset).
- No start fee. Runs that save nothing are not charged for results.
- Estimate: the default run (50 events) costs about $0.05 in result fees.

### Limits

- At most about 1 request per second, no proxies.
- Up to 20,000 events per run (the service's per-query limit).
- Recent events start as `automatic` and can be revised to `reviewed`; check `updated`.
- If the source refuses access (HTTP 403 or a block page), the run stops with a clear message. It never changes its identity, uses proxies, or retries from other IP addresses.

### Data source & legality note

> This actor reads public data from the U.S. Geological Survey (USGS) (https://earthquake.usgs.gov) via its public API. It does not log in, bypass access controls, or collect personal data; person/contact fields are dropped at parse time. Not affiliated with or endorsed by the U.S. Geological Survey (USGS). Output is provided as-is, without warranty; it may be incomplete or delayed, so verify against the U.S. Geological Survey (USGS) before relying on it. Not legal, medical, or safety advice. You are responsible for how you use the output and for complying with applicable laws and the source's terms.

Credit: U.S. Geological Survey

The USGS identifier/logo is not used.

### Support

birds.nest.apify@gmail.com, or open an issue in the Issues tab.

# Actor input Schema

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

Area to search (rectangular box).

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

Earliest event date (YYYY-MM-DD, UTC). Leave empty for the last 7 days.

## `endDate` (type: `string`):

Latest event date (YYYY-MM-DD, UTC). Leave empty for now.

## `minMagnitude` (type: `string`):

Smallest magnitude to include.

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

Maximum events to return, newest first (1 to 20,000). Each event is one billable result.

## Actor input object example

```json
{
  "region": "WORLD",
  "minMagnitude": "2.5",
  "maxResults": 50
}
```

# Actor output Schema

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

Earthquakes saved to the default dataset (Overview view).

# 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 = {
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("birds-nest-data/usgs-earthquakes").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 = { "maxResults": 50 }

# Run the Actor and wait for it to finish
run = client.actor("birds-nest-data/usgs-earthquakes").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 '{
  "maxResults": 50
}' |
apify call birds-nest-data/usgs-earthquakes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,birds-nest-data/usgs-earthquakes"
        }
    }
}
```

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/QbgKKlX8LdfWsITQ8/builds/tBsZJxWCxJnRK1VtJ/openapi.json
