# Japan Weather Forecast (JMA) (`japan-opendata/japan-weather-forecast`) Actor

Get official Japan Meteorological Agency forecasts for any prefecture as clean, English-keyed JSON: daily weather, rain probability, min/max temperature, and the 7-day outlook.

- **URL**: https://apify.com/japan-opendata/japan-weather-forecast.md
- **Developed by:** [Japan Open Data](https://apify.com/japan-opendata) (community)
- **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 weather forecasts for every region of Japan, from the **Japan Meteorological Agency (JMA)**, returned as clean JSON with English keys.

JMA publishes its forecasts only in Japanese, in a nested format that changes by region. This Actor flattens it into **one row per area per day**, so you can drop it straight into a spreadsheet, a travel app, a logistics plan or an AI agent.

### What you get

- **Daily forecast** (today and the next 1–2 days) for each sub-area of a prefecture
  - weather code and a simple `condition` (`sunny` / `cloudy` / `rain` / `snow`)
  - the original Japanese forecast text, wind and waves
  - rain probability for each 6-hour block, plus the day's maximum
  - min / max temperature for each observation city
- **7-day outlook** (optional): condition, rain probability, JMA's reliability grade (A/B/C), min / max temperature
- When JMA issued the forecast (`reportedAt`) and the data source on every row

### Input

| Field | Example | Notes |
|---|---|---|
| `prefectures` | `["Tokyo", "Osaka", "京都府", "016000"]` | English name, Japanese name or JMA office code. Leave empty for all of Japan. |
| `includeWeekly` | `true` | Add the 7-day outlook. |

Unknown names are skipped with a warning, so one typo does not stop the run.

### Output example

```json
{
  "type": "daily",
  "office": "Tokyo",
  "areaJa": "東京地方",
  "date": "2026-10-22",
  "weatherCode": "101",
  "condition": "sunny",
  "weatherJa": "晴れ 朝晩 くもり",
  "rainChanceMaxPercent": 10,
  "cityTemperatures": [{ "cityJa": "東京", "tempMinC": 19, "tempMaxC": 25 }],
  "reportedAt": "2026-10-21T05:00:00+09:00",
  "source": "Japan Meteorological Agency (https://www.jma.go.jp/)"
}
```

### Notes

- JMA updates forecasts at about 05:00, 11:00 and 17:00 JST. Running more often returns the same data.
- On the day of issue, today's minimum temperature has already passed, so `tempMinC` is empty for today.
- Tokachi is published inside Kushiro/Nemuro, and Amami inside Kagoshima; asking for them returns those files.
- The whole of Japan (56 forecast files) takes about 30 seconds.

### Data source and terms

Source: Japan Meteorological Agency website (気象庁ホームページ). JMA content can be reused, including commercially, when the source is credited (JMA website terms of use, compatible with CC BY 4.0). Every row includes the `source` field so you can credit it. This Actor is not affiliated with JMA.

# Actor input Schema

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

English name (e.g. "Tokyo", "Osaka", "Okinawa Main Island"), Japanese name (e.g. "東京都") or JMA office code (e.g. "130000"). Leave empty to get all 58 JMA forecast offices.

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

Also return the weekly forecast (weather, rain probability, reliability, min/max temperature).

## Actor input object example

```json
{
  "prefectures": [
    "Tokyo",
    "Osaka",
    "Kyoto"
  ],
  "includeWeekly": true
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("japan-opendata/japan-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 = { "prefectures": [
        "Tokyo",
        "Osaka",
        "Kyoto",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("japan-opendata/japan-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 '{
  "prefectures": [
    "Tokyo",
    "Osaka",
    "Kyoto"
  ]
}' |
apify call japan-opendata/japan-weather-forecast --silent --output-dataset

```

## MCP server setup

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