# USGS Earthquake Risk Brief (`jpmarketdata/usgs-earthquake-risk-brief`) Actor

Summarize official USGS earthquake activity for bounded coordinates, dates, radius and magnitude. Get counts, magnitude bands, closest event and limited evidence.

- **URL**: https://apify.com/jpmarketdata/usgs-earthquake-risk-brief.md
- **Developed by:** [h ichi](https://apify.com/jpmarketdata) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 earthquake brief createds

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 Risk Brief

**Price:** $0.05 per usable location earthquake risk brief.

Create bounded operational earthquake briefs around coordinates using the official USGS FDSN Event API.

### Input

Provide `locations` with 1–5 objects containing opaque `locationId`, latitude and longitude, plus ISO `startDate` and exclusive `endDate`. `locationId` must match `[A-Za-z0-9][A-Za-z0-9_-]{0,39}`; spaces and free text are rejected. Date ranges are capped at 31 days. `radiusKm` is 1–2,000, `minMagnitude` is -2–10, `maxEvents` is 1–200 and `maxItems` defaults to one. Duplicate coordinates are analyzed once.

### Output

Each report contains the opaque location ID, coordinates, radius and period; status and event count; magnitude bands; maximum and closest event summaries; tsunami and reviewed counts; up to 25 allowlisted event evidence rows; the exact query-bearing official source URL; reason; and fetch time. Evidence contains only event ID, magnitude, time, depth, computed distance, public USGS place label, tsunami flag, alert and review status. A verified empty GeoJSON response returns `no_events`; it does not assert that the location is safe.

### Pricing

$0.05 per usable location report, charged exactly once as `earthquake-brief-created` by its atomic dataset push. A verified no-event report is usable and billable. Invalid coordinates or location IDs, identity inconsistency, truncation, authentication, rate-limit, timeout, redirect, response-size and GeoJSON structure failures emit no report and incur no event charge.

### Limits

At most five sequential requests, one per selected location, with at least two seconds between requests, 200 source events, 25 evidence rows, a 4 MB response cap, 20 second HTTP timeout and 180 second run timeout. Reaching the configured event limit fails as `truncated`. Redirects are rejected. HTTP 401/403/451, 429, metadata disagreement, malformed features and invalid numbers fail explicitly. Runs use 256 MB without a browser or paid API.

### Privacy

Only coordinates, an opaque 1–40 character `locationId` without spaces or free text, and public USGS event facts are processed. Street addresses, facility names, people, contacts, device data and raw source payloads are not accepted or retained. USGS-created data is public domain; USGS is attributed and does not endorse this independent product.

# Actor input Schema

## `locations` (type: `array`):

One to five objects with an opaque locationId, latitude and longitude. locationId allows ASCII letters, digits, underscores and hyphens only.

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

Inclusive UTC start date in YYYY-MM-DD format.

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

Exclusive UTC end date in YYYY-MM-DD format; range cannot exceed 31 days.

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

Search radius around every coordinate, from 1 to 2,000 km.

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

Minimum published earthquake magnitude.

## `maxEvents` (type: `integer`):

Hard response limit; reaching it fails as truncated instead of returning partial results.

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

Maximum reports, bounded by the available event budget before requests.

## Actor input object example

```json
{
  "locations": [
    {
      "locationId": "tokyo_region",
      "latitude": 35.6762,
      "longitude": 139.6503
    }
  ],
  "startDate": "2026-09-13",
  "endDate": "2026-09-20",
  "radiusKm": 500,
  "minMagnitude": 4,
  "maxEvents": 200,
  "maxItems": 1
}
```

# Actor output Schema

## `reports` (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 = {
    "locations": [
        {
            "locationId": "tokyo_region",
            "latitude": 35.6762,
            "longitude": 139.6503
        }
    ],
    "startDate": "2026-09-13",
    "endDate": "2026-09-20"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpmarketdata/usgs-earthquake-risk-brief").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 = {
    "locations": [{
            "locationId": "tokyo_region",
            "latitude": 35.6762,
            "longitude": 139.6503,
        }],
    "startDate": "2026-09-13",
    "endDate": "2026-09-20",
}

# Run the Actor and wait for it to finish
run = client.actor("jpmarketdata/usgs-earthquake-risk-brief").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 '{
  "locations": [
    {
      "locationId": "tokyo_region",
      "latitude": 35.6762,
      "longitude": 139.6503
    }
  ],
  "startDate": "2026-09-13",
  "endDate": "2026-09-20"
}' |
apify call jpmarketdata/usgs-earthquake-risk-brief --silent --output-dataset

```

## MCP server setup

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

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/e62lnbabRwNaIzfDW/builds/B3Hvv2nxnTpB3cUTZ/openapi.json
