# Japan Earthquake, Tsunami & Weather Warning Alerts (JMA) (`panda_studio/japan-disaster-alerts`) Actor

Japan disaster alerts from the JMA's official XML feeds: earthquakes (intensity, magnitude, epicenter), tsunami warnings, heavy rain / typhoon / snow warnings by municipality, volcanic eruptions. English fields, prefecture filter, only-new mode for schedules.

- **URL**: https://apify.com/panda\_studio/japan-disaster-alerts.md
- **Developed by:** [panda studio](https://apify.com/panda_studio) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 disaster alerts

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

## Japan Earthquake, Tsunami & Weather Warning Alerts (JMA Official Feed)

Get **Japan disaster alerts as clean JSON** straight from the **Japan Meteorological Agency (JMA)**'s official disaster-prevention XML feeds (気象庁防災情報XML) – earthquakes, tsunami warnings, weather warnings by municipality and volcanic eruptions – with English field names, prefecture filters and an **only-new mode** for scheduled monitoring.

- **Earthquakes** – origin time, epicenter, latitude / longitude, depth, magnitude, maximum JMA seismic intensity (shindo, with English labels such as "5 Lower"), intensity per prefecture, tsunami risk message
- **Tsunami** – major tsunami warning / tsunami warning / advisory / forecast per coastal area, expected arrival time and maximum height
- **Weather warnings** – heavy rain, flood, landslide, storm, snowstorm, heavy snow, high waves, storm surge… per **municipality**, with level (emergency / danger / warning / advisory) and English names, including the new 危険警報 (danger warning) level
- **Volcanoes** – eruption observations (plume height, crater) and Volcanic Alert Level changes
- **Only new alerts**: remembers what it already returned, so a schedule every 5–10 minutes gives you just the new earthquakes and the municipalities whose warnings changed
- Official feeds only – no scraping, no API key, runs in seconds

### Typical uses

- **Logistics & supply chain** – know which prefectures and factories are under heavy-rain or snow warnings, or were shaken by an earthquake, and trigger a check.
- **Travel & hospitality** – alert guests and staff; add a disaster banner for affected areas.
- **Insurance & risk** – log every earthquake with intensity ≥ 4 or every emergency warning for claims triage and exposure reports.
- **Business continuity (BCP)** – send Slack / Teams / email alerts via Apify integrations or webhooks when your sites are affected.
- **Apps, dashboards and AI agents** – a clean English JSON layer over the Japanese-only JMA XML.

### Input

```json
{
  "alertTypes": ["earthquake", "tsunami", "weather-warning"],
  "lookbackHours": 1,
  "prefectures": ["Tokyo", "Kanagawa", "Osaka"],
  "minIntensity": "3",
  "warningLevels": ["emergency", "danger", "warning"],
  "onlyNew": true
}
```

- **Schedule**: create an Apify schedule every 5–10 minutes with `lookbackHours: 1` and `onlyNew: true`, and connect a Slack / email / webhook integration to the run's dataset.
- **Reports / backfill**: `lookbackHours` up to 168 (about 7 days, the length of the JMA long-term feed).

### Output

Earthquake:

```json
{
  "type": "earthquake",
  "reportType": "hypocenter-and-intensity",
  "eventId": "20260926170527",
  "originTime": "2026-09-26T17:05:00+09:00",
  "epicenterJa": "熊本県天草・芦北地方",
  "epicenterPrefectureEn": "Kumamoto",
  "latitude": 32.3, "longitude": 130.4, "depthKm": 0,
  "magnitude": 2.1,
  "maxIntensity": "1", "maxIntensityLabel": "1", "maxIntensityJa": "震度1",
  "tsunamiRisk": "none",
  "prefectures": [{ "prefectureEn": "Kumamoto", "maxIntensity": "1" }],
  "jmaXmlUrl": "https://www.data.jma.go.jp/developer/xml/data/..._VXSE53_270000.xml"
}
```

Weather warning (one row per municipality):

```json
{
  "type": "weather-warning",
  "reportTime": "2026-09-26T09:41:00+09:00",
  "prefectureEn": "Hokkaido",
  "municipalityJa": "釧路市釧路",
  "municipalityCode": "0120601",
  "highestLevel": "warning",
  "warningsEn": "Heavy rain Warning",
  "activeWarnings": [{ "nameJa": "大雨警報", "nameEn": "Heavy rain Warning", "level": "warning", "status": "issued" }],
  "office": "釧路地方気象台"
}
```

Tsunami rows list `areas` with `level` (`major-tsunami-warning`, `tsunami-warning`, `tsunami-advisory`, `tsunami-forecast`), `firstArrival` and `maxHeightM`. Volcano rows have `volcanoJa`, `alertLevel`, `kindJa`, `plumeHeightAboveCraterM`.

### Notes

- Earthquake reports for one event (intensity flash → hypocenter → details) are merged into one row with the most complete data.
- Weather-warning reports are issued per forecast area and always contain the full current state; the Actor keeps only the latest one per area.
- Place names are in Japanese as published by the JMA; prefectures are also given in English.
- **This is not an official warning service.** Feed delivery can be delayed or stopped for maintenance. For life-safety decisions follow the JMA, local governments and broadcast warnings.

### Pricing

Pay per event: **$0.002 per alert row** plus the tiny Apify start fee. A 10-minute schedule for a few prefectures usually returns only a handful of rows per day.

### Source & license

Source: Japan Meteorological Agency, disaster-prevention information XML (気象庁防災情報XML, https://xml.kishou.go.jp/), obtained from the public PULL-type Atom feeds and used under the JMA website terms of use (compatible with the Public Data License v1.0 / CC BY 4.0). Processed by panda studio (parsing, merging, English labels, filtering). Not provided or endorsed by the JMA.

### Related Actors by panda studio

- [JMA Weather Forecast](https://apify.com/panda_studio/jma-weather-forecast) – official Japanese weather forecasts
- [Japan Holidays & Business Days Calculator](https://apify.com/panda_studio/japan-business-days)
- [Japan Company Registry Search](https://apify.com/panda_studio/japan-company-registry-search)

# Actor input Schema

## `alertTypes` (type: `array`):

Which JMA reports to include.

## `lookbackHours` (type: `integer`):

Reports published in the last N hours (max 168 = about 7 days, the length of the JMA long-term feed). For schedules every few minutes use 1: only the small high-frequency feeds are read.

## `prefectures` (type: `array`):

Only alerts affecting these prefectures, e.g. "Tokyo", "Osaka", "13", "北海道". Earthquakes match any prefecture where shaking was observed. Empty = all of Japan.

## `minIntensity` (type: `string`):

Only earthquakes whose maximum observed intensity is at least this. JMA scale 1-7 (5-/5+ = 5 Lower/Upper).

## `minMagnitude` (type: `integer`):

Leave empty for no magnitude filter.

## `warningLevels` (type: `array`):

Emergency = 特別警報, Danger = 危険警報, Warning = 警報, Advisory = 注意報 (many, e.g. thunder and dry-air advisories).

## `volcanoMinAlertLevel` (type: `integer`):

Volcano status / warning reports are included from this Volcanic Alert Level (1-5). Eruption reports are always included when volcanoes are selected.

## `includeCancellations` (type: `boolean`):

Also output lifted warnings and cancelled reports.

## `onlyNew` (type: `boolean`):

Remember what was already output (per filter set) and return only new earthquakes / reports and municipalities whose warnings changed. Turn on when running this Actor on a schedule and sending results to Slack, email or a webhook.

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

Stop after this many rows.

## Actor input object example

```json
{
  "alertTypes": [
    "earthquake",
    "tsunami",
    "weather-warning"
  ],
  "lookbackHours": 6,
  "prefectures": [],
  "minIntensity": "3",
  "warningLevels": [
    "emergency",
    "danger",
    "warning"
  ],
  "volcanoMinAlertLevel": 2,
  "includeCancellations": false,
  "onlyNew": false,
  "maxItems": 500
}
```

# Actor output Schema

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

All alerts produced by this run, stored in the default dataset.

# 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 = {
    "prefectures": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("panda_studio/japan-disaster-alerts").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 = { "prefectures": [] }

# Run the Actor and wait for it to finish
run = client.actor("panda_studio/japan-disaster-alerts").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 '{
  "prefectures": []
}' |
apify call panda_studio/japan-disaster-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,panda_studio/japan-disaster-alerts"
        }
    }
}
```

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/O6U8hwJeWzsILGzEj/builds/fSv3bFS1RKa84cMb8/openapi.json
