# Japan Weather Forecast - JMA Official Data (`panda_studio/jma-weather-forecast`) Actor

Normalized 3-day and weekly weather forecasts for all 47 Japanese prefectures, straight from the Japan Meteorological Agency's official open data.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Weather Forecast (JMA Official Data)

Get clean, normalized **3-day and weekly weather forecasts for all 47 Japanese prefectures**, sourced directly from the **Japan Meteorological Agency (JMA / 気象庁)** — Japan's national weather service and the single most authoritative weather data source in the country.

JMA publishes its forecast data as free open JSON, but the raw feed is **undocumented, Japanese-only, and hard to parse**: values are spread across parallel arrays, temperatures arrive as strings (sometimes empty), area hierarchies are cryptic numeric codes, and the 3-day and weekly blocks use different structures. This Actor does all of that work for you and returns one tidy JSON item per prefecture.

### What you get

For each requested area (prefecture-level JMA forecast office):

- **3-day forecast** — weather text, weather (telop) codes, a machine-friendly `weatherCategory` (`sunny` / `cloudy` / `rain` / `snow`), wind, wave height, precipitation probability (%), and point temperatures, each attached to its ISO 8601 timestamp.
- **Weekly forecast** — daily weather codes, precipitation probability, reliability rank, and min/max temperatures with uncertainty ranges, plus climatological normals (`tempAverage`, `precipAverage`).
- **Text overview** (optional) — the human-written forecast discussion issued by JMA forecasters (Japanese).
- **Provenance on every item** — `fetchedAt` timestamp, `sourceUrls` of the exact JMA files used, official `reportDatetime`, and the attribution string required by JMA's terms.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `areaCodes` | array | `["130000"]` | JMA office codes (e.g. `130000` Tokyo, `270000` Osaka, `016000` Sapporo area, `471000` Okinawa). Full list in the `offices` object of [area.json](https://www.jma.go.jp/bosai/common/const/area.json). |
| `allAreas` | boolean | `false` | Fetch every forecast office (~55, covering all 47 prefectures). Overrides `areaCodes`. |
| `includeOverview` | boolean | `true` | Also fetch the written overview text. |
| `includeWeekly` | boolean | `true` | Include the 7-day forecast block. |
| `maxAreas` | integer | `47` | Safety cap per run (max 60). |
| `requestIntervalSecs` | integer | `1` | Polite delay between requests to the JMA server. |

### Output example (abbreviated)

```json
{
  "areaCode": "130000",
  "areaName": "東京都",
  "areaNameEn": "Tokyo",
  "publishingOffice": "気象庁",
  "reportDatetime": "2026-08-15T17:00:00+09:00",
  "forecastThreeDay": {
    "timeSeries": [
      [
        {
          "areaName": "東京地方",
          "areaCode": "130010",
          "entries": [
            {
              "time": "2026-08-15T17:00:00+09:00",
              "weather": "くもり　所により　雨",
              "weatherCode": "200",
              "weatherCategory": "cloudy",
              "wind": "東の風",
              "wave": "０．５メートル"
            }
          ]
        }
      ]
    ]
  },
  "forecastWeekly": { "...": "daily codes, pops, reliability, tempMin/tempMax with ranges" },
  "overview": {
    "targetArea": "東京都",
    "text": "千島近海の高気圧が..."
  },
  "sourceUrls": [
    "https://www.jma.go.jp/bosai/forecast/data/forecast/130000.json",
    "https://www.jma.go.jp/bosai/forecast/data/overview_forecast/130000.json"
  ],
  "attribution": "Source: Japan Meteorological Agency website (出典：気象庁ホームページ https://www.jma.go.jp/)",
  "fetchedAt": "2026-08-16T05:00:00+00:00",
  "errors": []
}
```

One dataset item = one prefecture-level area. Items with partial failures still come back — missing sections are `null` and the problem is listed in `errors`, so your pipeline never breaks.

### Use cases

- Weather widgets and dashboards for apps serving Japan
- Travel and logistics planning (typhoon season monitoring across prefectures)
- E-commerce demand forecasting (weather-sensitive products)
- Feeding Japanese weather context into LLM agents via the Apify API/MCP
- Research datasets — daily snapshots of official forecasts and their accuracy

### Pricing

This Actor uses usage-based pricing: **one billable result per area processed**. A full-country snapshot (all 47 prefectures) is a single small run — typically well under a minute of compute. Run it daily on a schedule for a continuously updated national forecast dataset at a predictable cost.

### Data source, terms, and attribution

- Data: Japan Meteorological Agency, https://www.jma.go.jp/bosai/forecast/
- JMA's website terms of use (https://www.jma.go.jp/jma/kishou/info/coment.html) follow Japan's **Public Data License v1.0**, which permits copying, modification, and redistribution, including commercial use, **with attribution**.
- Every output item carries the required attribution string. **If you republish this data, keep the attribution** ("出典：気象庁ホームページ" / "Source: Japan Meteorological Agency website") and do not present modified data as if issued by the Government of Japan.
- This Actor is **not affiliated with or endorsed by JMA**. It contains no personal data.

### Fair use of the JMA servers

The Actor fetches a small number of static JSON files over a single connection with a minimum 0.5 s delay between requests and a hard cap of 60 areas per run. A full run performs at most ~121 lightweight requests.

### Limitations

- Forecast text (weather descriptions, overview) is in Japanese as issued by JMA; `weatherCategory` and the numeric fields are language-independent.
- JMA updates forecasts a few times per day (typically 05:00, 11:00, 17:00 JST); polling more often than that returns unchanged data.
- Amber/warning-level information (advisories, typhoon tracks) is out of scope for this Actor.

### Important: scope of this Actor

This Actor **relays the Japan Meteorological Agency's own published forecasts**.
It does not generate original predictions, probabilities, indices, or warnings of any kind.
Values and wording are passed through unmodified, with the JMA attribution attached to every record.

Under Japan's Meteorological Service Act (Articles 17 and 23), producing original forecasts
or issuing warnings requires a licence from the JMA. This Actor is designed to stay outside
that scope by never adding interpretation of its own. If you build on top of this data,
that responsibility becomes yours.

# Actor input Schema

## `areaCodes` (type: `array`):

JMA forecast office codes, one per prefecture-level area. Examples: <code>130000</code> = Tokyo, <code>270000</code> = Osaka, <code>016000</code> = Ishikari/Sorachi (Sapporo), <code>471000</code> = Okinawa Main Island. Full list: https://www.jma.go.jp/bosai/common/const/area.json (see the <code>offices</code> object). Ignored when 'Fetch all areas' is enabled.

## `allAreas` (type: `boolean`):

Fetch every JMA forecast office (roughly one per prefecture, ~55 offices). Overrides the area codes list above.

## `includeOverview` (type: `boolean`):

Also fetch the human-written forecast overview text (Japanese) for each area.

## `includeWeekly` (type: `boolean`):

Include the 7-day forecast block in addition to the 3-day forecast.

## `maxAreas` (type: `integer`):

Safety cap on the number of areas processed in one run.

## `requestIntervalSecs` (type: `integer`):

Pause between consecutive requests to the JMA server. Minimum enforced internally is 0.5 s to keep the load on the public server polite.

## Actor input object example

```json
{
  "areaCodes": [
    "130000"
  ],
  "allAreas": false,
  "includeOverview": true,
  "includeWeekly": true,
  "maxAreas": 47,
  "requestIntervalSecs": 1
}
```

# Actor output Schema

## `forecasts` (type: `string`):

All normalized forecast items 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 = {
    "areaCodes": [
        "130000"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("panda_studio/jma-weather-forecast").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 = { "areaCodes": ["130000"] }

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

```

## MCP server setup

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

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/Sib0VGlYai6TW1kXI/builds/ehr1u7NqMRrI0Hwfz/openapi.json
