# USGS Earthquakes — GeoJSON Extractor (`cynix_dev/usgs-earthquakes`) Actor

Pull live and historical earthquakes from the USGS FDSN event service as clean typed JSON: magnitude, place, time, lat/lon/depth, tsunami and alert flags. Query by bounding box, radius, or country preset. No API key required.

- **URL**: https://apify.com/cynix\_dev/usgs-earthquakes.md
- **Developed by:** [Cynix Dev](https://apify.com/cynix_dev) (community)
- **Categories:** News, Integrations, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 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

## USGS Earthquakes — GeoJSON Extractor

Live and historical **earthquake data from the USGS** — magnitude, place, origin time, latitude/longitude/depth, felt reports, tsunami and PAGER alert flags — as clean typed records. Official FDSN event service, no API key.

### What it does

The USGS publishes every catalogued seismic event through its FDSN event service as GeoJSON. This Actor queries that service and flattens the result: the nested `geometry` array becomes explicit `latitude`, `longitude` and `depth_km` fields, and all 29 event properties come through as top-level columns.

Three ways to define the area you care about:

- **`country_hint`** — a ready-made bounding box for a seismic region (`japan`, `usa`, `chile`, `indonesia`, `italy`, `new_zealand`, `turkey`, or `world`).
- **`bounding_box`** — your own rectangle via min/max latitude and longitude.
- **`radius`** — a circle around a point, in kilometres or degrees.

Layer magnitude and time filters on top and you have anything from "significant quakes worldwide today" to "every M2+ event within 200 km of this coordinate since 2020".

### Features

- **Official USGS FDSN service** — the authoritative catalogue, not a scraped mirror.
- **Three region modes** — country presets, custom bounding box, or radius around a point.
- **Magnitude window** — `minMagnitude` / `maxMagnitude` to isolate the band you study.
- **Time window** — `startTime` / `endTime` for historical research, or leave empty for recent activity.
- **Flattened coordinates** — `latitude`, `longitude` and `depth_km` as real fields, ready for mapping.
- **Impact fields included** — `felt`, `cdi`, `mmi`, `alert`, `sig` and `tsunami` for consequence analysis.
- **High ceiling** — up to 20,000 records per run for serious catalogue work.
- **No API key required.**

### What people use it for

- Hazard and risk analysis — build a local seismic history for a site or portfolio.
- Newsroom monitoring — schedule frequent runs and alert on significant events.
- Research datasets — pull decades of events for a region into one clean table.
- Insurance and reinsurance — quantify event frequency and severity by geography.
- Dashboards and maps — flattened lat/lon/depth drops straight into GIS or a mapping library.

### Reading the fields that matter

| Field | Meaning |
| --- | --- |
| `magnitude` / `magtype` | Size, and which scale produced it (`mww`, `mb`, `ml`, …) |
| `depth_km` | Depth below surface — shallow quakes do far more damage than deep ones |
| `sig` | USGS significance score, combining magnitude, felt reports and impact |
| `felt` / `cdi` | Number of "Did You Feel It?" reports and the resulting community intensity |
| `mmi` | Modified Mercalli shaking intensity from instruments |
| `alert` | PAGER alert level: `green`, `yellow`, `orange`, `red` |
| `tsunami` | `1` when the event is in a tsunami-relevant zone |
| `status` | `automatic` (machine solution) or `reviewed` (seismologist-checked) |

#### Time filtering

`startTime` and `endTime` accept `2026-01-01` or `2026-01-01T00:00:00`. Leave both empty for recent activity. Large historical windows combined with a low `minMagnitude` return enormous result sets — the world records thousands of small quakes weekly — so set `minMagnitude` deliberately and use `limit` as a guard.

### Input

Start with `mode`. Only the fields belonging to your chosen mode are read, so unused coordinate fields can be left at their defaults.

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `mode` | string | `country_hint` | bounding\_box = rectangle by lat/lon corners; radius = circle around a point; country\_hint = preset box for a region. Options: `bounding_box`, `radius`, `country_hint`. |
| `countryHint` | string | `japan` | Used when Region mode = Country preset. Options: `usa`, `japan`, `chile`, `indonesia`, `italy`, `new_zealand`, `turkey`, `world`. |
| `minLatitude` | number | — | Southern edge. Used when Region mode = Bounding box. |
| `minLongitude` | number | — | Western edge. Used when Region mode = Bounding box. |
| `maxLatitude` | number | — | Northern edge. Used when Region mode = Bounding box. |
| `maxLongitude` | number | — | Eastern edge. Used when Region mode = Bounding box. |
| `latitude` | number | `38.0` | Circle center latitude. Used when Region mode = Radius. |
| `longitude` | number | `142.0` | Circle center longitude. Used when Region mode = Radius. |
| `radiusKm` | number | `500` | Circle radius in kilometers. Used when Region mode = Radius. Ignored if Radius (deg) set. |
| `radiusDeg` | number | — | Circle radius in degrees (overrides km if set). Used when Region mode = Radius. |
| `minMagnitude` | number | — | Only quakes at or above this magnitude. Leave empty for all. |
| `maxMagnitude` | number | — | Only quakes at or below this magnitude. Leave empty for all. |
| `startTime` | string | — | Earliest origin time, e.g. 2026-01-01 or 2026-01-01T00:00:00. Leave empty for recent. |
| `endTime` | string | — | Latest origin time, e.g. 2026-02-01. Leave empty for now. |
| `orderBy` | string | `time` | Result ordering. Options: `time`, `magnitude`, `time-asc`, `magnitude-asc`. |
| `limit` | integer | `500` | Cap on records returned (1-20000). Range 1–20000. |
| `includeAllMagnitudes` | boolean | `false` | Return deleted/automatically deleted magnitude events too. |

#### Input example

```json
{
  "mode": "country_hint",
  "countryHint": "japan",
  "minMagnitude": 4.5,
  "limit": 20,
  "orderBy": "time",
  "latitude": 38,
  "longitude": 142,
  "radiusKm": 500,
  "includeAllMagnitudes": false
}
```

### Output

One record per seismic event. `time` and `updated` are epoch milliseconds (UTC); `magtype` tells you which magnitude scale was used; `status` distinguishes automatic from human-`reviewed` solutions.

Every dataset record contains: `id`, `title`, `magnitude`, `place`, `time`, `updated`, `tz`, `url`, `detail`, `felt`, `cdi`, `mmi`, `alert`, `status`, `tsunami`, `sig`, `net`, `code`, `ids`, `sources`, `types`, `nst`, `dmin`, `rms`, `gap`, `magtype`, `latitude`, `longitude`, `depth_km`.

#### Output example

A real record from a run of this Actor:

```json
{
  "id": "usd0015ecj",
  "title": "M 4.6 - 3 km NNE of Takatsuki, Japan",
  "magnitude": "4.6",
  "place": "3 km NNE of Takatsuki, Japan",
  "time": "1786952179104",
  "updated": "1787040363103",
  "tz": "",
  "url": "https://earthquake.usgs.gov/earthquakes/eventpage/usd0015ecj",
  "detail": "https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=usd0015ecj&format=geojson",
  "felt": "1",
  "cdi": "1",
  "mmi": "",
  "alert": "",
  "status": "reviewed",
  "tsunami": "0",
  "sig": "326",
  "net": "us",
  "code": "d0015ecj",
  "ids": ",usd0015ecj,",
  "sources": ",us,",
  "types": ",dyfi,origin,phase-data,",
  "nst": "128"
}
```

Export the dataset as JSON, CSV, Excel, XML or JSONL from the Console, or pull it programmatically through the Apify API and any of the official clients.

### How to use it

1. Click **Try for free** (or **Start** if you already have an Apify account).
2. Fill in the input fields described above — the defaults already produce a working run.
3. Press **Start** and watch the log; results stream into the dataset as they are found.
4. When the run finishes, open the **Output/Storage** tab and export as JSON, CSV or Excel.

Runs can be scheduled (hourly, daily, weekly) and wired into Slack, Google Sheets, Zapier, Make, webhooks or your own backend through Apify integrations. Everything the Console does is also available over the [Apify API](https://docs.apify.com/api/v2).

### Pricing

This Actor is billed on Apify's **pay-per-event** model: a small charge when a run starts, plus a charge for each result written to the dataset. You only pay for records you actually receive — a run that finds nothing costs only the start event. Current rates are always shown on the **Pricing** tab of this page, and the run log prints your usage as it goes.

Free-plan credits from Apify cover a large amount of light usage, so you can evaluate the Actor before committing to anything.

### FAQ

#### Is this real-time?

It queries the live USGS catalogue, so events appear as USGS publishes them — typically within minutes for automatic solutions. Schedule the Actor every few minutes for monitoring; note that early records are `automatic` and magnitudes get revised when a human reviews them.

#### Why do timestamps look like large integers?

USGS returns epoch milliseconds in UTC, and the Actor passes them through unchanged rather than guessing at your timezone. Convert with `datetime.utcfromtimestamp(time/1000)` in Python or `new Date(time)` in JavaScript.

#### How far back does the catalogue go?

Coverage extends to historical events, with completeness improving sharply from the 1970s onward as instrumentation spread. Small-magnitude completeness varies by region and era — mind that before computing long-run rates.

#### What magnitude should I filter on?

M4.5+ is a good default for globally newsworthy events, M2.5+ for regional monitoring, and no filter only for tight local boxes. Below M2.5 the catalogue is dominated by instrument-only microseismicity.

#### Can I get one specific event by ID?

This version is query-driven by region, magnitude and time. Every record includes `url` and `detail` links to the USGS event page and its GeoJSON, so a single event is one hop away.

### Other Actors by cynix\_dev

| Actor | What it does |
| --- | --- |
| [arXiv Papers Extractor](https://apify.com/cynix_dev/arxiv-papers) | Search arXiv and extract papers as clean typed records: title, abstract, authors, categories, DOI, and direct PDF links. |
| [CoinGecko Markets — Crypto Data API](https://apify.com/cynix_dev/coingecko-markets) | Live cryptocurrency market data from CoinGecko as clean typed JSON: price, market cap, volume, 24h change, ATH/ATL, … |
| [FX Rates & History](https://apify.com/cynix_dev/fx-rates-history) | Latest and historical foreign exchange rates (ECB reference data) as clean, typed dataset records. |
| [Launch Library 2 — Rocket Launch Tracker](https://apify.com/cynix_dev/launch-library-launches) | Upcoming, previous, and specific rocket launches from The Space Devs' Launch Library 2 API. |
| [Open Food Facts Extractor](https://apify.com/cynix_dev/open-food-facts) | Search and extract food-product data from Open Food Facts as clean typed JSON: name, brand, ingredients, allergens, nutrition … |
| [OpenStreetMap Geocoder](https://apify.com/cynix_dev/osm-geocoder) | Forward and reverse geocoding via the free Komoot Photon / OpenStreetMap service. No API key, no scraping, ODbL data. |
| [News & Press Release Monitor](https://apify.com/cynix_dev/news-press-monitor) | Watch company newsrooms, blogs, and press pages and get one clean record per article — with new-item detection between runs, so a … |

### Legal and responsible use

This Actor collects only publicly available information. You are responsible for how you use the data, including compliance with the target site's Terms of Service, robots directives, copyright, and data protection law such as GDPR and CCPA. Do not use it to gather personal data without a lawful basis.

### Support and feedback

Found a bug, hit a site change, or need an extra field? Open a ticket on the **Issues** tab of this Actor — issues are read and fixed. Feature requests and custom-scraper enquiries are welcome through the same channel.

# Actor input Schema

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

bounding\_box = rectangle by lat/lon corners; radius = circle around a point; country\_hint = preset box for a region.

## `countryHint` (type: `string`):

Used when Region mode = Country preset.

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

Southern edge. Used when Region mode = Bounding box.

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

Western edge. Used when Region mode = Bounding box.

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

Northern edge. Used when Region mode = Bounding box.

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

Eastern edge. Used when Region mode = Bounding box.

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

Circle center latitude. Used when Region mode = Radius.

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

Circle center longitude. Used when Region mode = Radius.

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

Circle radius in kilometers. Used when Region mode = Radius. Ignored if Radius (deg) set.

## `radiusDeg` (type: `number`):

Circle radius in degrees (overrides km if set). Used when Region mode = Radius.

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

Only quakes at or above this magnitude. Leave empty for all.

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

Only quakes at or below this magnitude. Leave empty for all.

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

Earliest origin time, e.g. 2026-01-01 or 2026-01-01T00:00:00. Leave empty for recent.

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

Latest origin time, e.g. 2026-02-01. Leave empty for now.

## `orderBy` (type: `string`):

Result ordering.

## `limit` (type: `integer`):

Cap on records returned (1-20000).

## `includeAllMagnitudes` (type: `boolean`):

Return deleted/automatically deleted magnitude events too.

## Actor input object example

```json
{
  "mode": "country_hint",
  "countryHint": "japan",
  "latitude": 38,
  "longitude": 142,
  "radiusKm": 500,
  "orderBy": "time",
  "limit": 500,
  "includeAllMagnitudes": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

One record per earthquake: id, magnitude, place, time, lat/lon/depth, tsunami flag, alert level, and USGS source URL.

# 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("cynix_dev/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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cynix_dev/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/e6kz8LP4PUYJxfgFy/builds/ybNc4qDOU1HJjav4t/openapi.json
