# Earthquakes Scraper (`scrapers_lat/usgs-earthquakes-scraper`) Actor

Scrape recent earthquakes worldwide: magnitude, place, depth, coordinates, time, tsunami flag and event link. Filter by minimum magnitude. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/usgs-earthquakes-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** News, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Earthquakes Scraper

> Pull recent earthquakes worldwide with magnitude, location, depth, coordinates and tsunami flag. One clean record per event, ready for alerting, mapping, research and dashboards.

**📥 [Input](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Seismic](https://img.shields.io/badge/Data-Earthquakes-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)

<table><tr>
<td align="center"><strong>Worldwide events</strong><br>most recent first</td>
<td align="center"><strong>Magnitude & depth</strong><br>plus coordinates</td>
<td align="center"><strong>JSON / CSV / Excel</strong><br>output formats</td>
</tr></table>

<br>

### Who is it for

| Use case | Who benefits |
|---|---|
| Alerting | Teams notifying on quakes above a magnitude threshold |
| Mapping | Builders plotting epicenters and depth on a map |
| Research | Analysts studying seismic activity over regions and time |
| Newsrooms | Reporters citing recent significant earthquakes |

### How to use it

1. Set the **minimum magnitude** (for example 2.5 for broad coverage, 4.5 for larger quakes).
2. Set **Max Items** to cap how many recent events to return.
3. Run it. Export as JSON, CSV or Excel, or pull it through the Apify API.

### Frequently Asked Questions

**How are results ordered?**
Earthquakes are returned most recent first, so the latest activity is always at the top.

**What does the tsunami flag mean?**
It marks events flagged for possible tsunami relevance. It does not by itself mean a tsunami occurred.

**Can I get only larger earthquakes?**
Yes. Raise the minimum magnitude, for example to 4.5 or 6, to keep only stronger events.

**How fresh is the data?**
Events are read live at run time, so each record reflects the latest catalog at the moment of the run (see observedAt).

### Example use cases

Ready-to-run example tasks, each preconfigured for a common scenario. Open one and press run, or use it as a template:

- [Scrape recent earthquakes (M2.5+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-recent-quakes): Collect recent earthquakes of magnitude 2.5 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape moderate earthquakes (M4.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-moderate-quakes): Collect moderate earthquakes of magnitude 4.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape strong earthquakes (M5.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-strong-quakes): Collect strong earthquakes of magnitude 5.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape major earthquakes (M6.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-major-quakes): Collect major earthquakes of magnitude 6.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape light earthquakes (M3.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-light-quakes): Collect light earthquakes of magnitude 3.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape noticeable earthquakes (M4.5+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-noticeable-quakes): Collect noticeable earthquakes of magnitude 4.5 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape significant earthquakes (M5.5+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-significant-quakes): Collect significant earthquakes of magnitude 5.5 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape minor earthquakes (M2.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-minor-quakes): Collect minor earthquakes of magnitude 2.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape great earthquakes (M7.0+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-great-quakes): Collect great earthquakes of magnitude 7.0 and above with location, depth, time and coordinates for monitoring and research.
- [Scrape small earthquakes (M3.5+)](https://apify.com/scrapers_lat/usgs-earthquakes-scraper/examples/quake-small-quakes): Collect small earthquakes of magnitude 3.5 and above with location, depth, time and coordinates for monitoring and research.

### Related scrapers

- [Weather Forecast Scraper](https://apify.com/scrapers_lat/open-meteo-weather-scraper)
- [Google News Scraper](https://apify.com/scrapers_lat/google-news-scraper)
- [Crypto Prices & Market Cap Scraper](https://apify.com/scrapers_lat/coingecko-crypto-scraper)

### More scrapers at scrapers.lat

This actor is built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for public platforms: finance, news, real estate, jobs, e-commerce and government data. Browse the full catalog or ask us for a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> This actor is an independent tool and has no affiliation with the USGS. It only accesses publicly available earthquake data. Use the results in accordance with the source's terms.

# Actor input Schema

## `maxEarthquakes` (type: `integer`):

Maximum number of earthquakes to collect, most recent first.

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

Only return earthquakes at or above this magnitude, for example 2.5, 4.5 or 6.

## `maxMagnitude` (type: `string`):

Optional. Only return earthquakes at or below this magnitude.

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

Optional. Earliest event time, for example 2026-01-01 or 2026-01-01T00:00:00. Query a historical window.

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

Optional. Latest event time, for example 2026-02-01 or 2026-02-01T00:00:00.

## Actor input object example

```json
{
  "maxEarthquakes": 50,
  "minMagnitude": "2.5"
}
```

# 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 = {
    "maxEarthquakes": 50,
    "minMagnitude": "2.5"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/usgs-earthquakes-scraper").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 = {
    "maxEarthquakes": 50,
    "minMagnitude": "2.5",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/usgs-earthquakes-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxEarthquakes": 50,
  "minMagnitude": "2.5"
}' |
apify call scrapers_lat/usgs-earthquakes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapers_lat/usgs-earthquakes-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/9pytIVBGlbcpeuE64/builds/TfEyZezh1x8pUqfFQ/openapi.json
