# Japan Real Estate Transaction Prices (Tokyo 23 Wards) (`reverenced_garnet/apify-jp-realestate-prices`) Actor

Tokyo 23-ward property transaction prices from Japan's official MLIT Real Estate Information Library API, cleaned and aggregated to district-level median/quartile price per sqm.

- **URL**: https://apify.com/reverenced\_garnet/apify-jp-realestate-prices.md
- **Developed by:** [オレンジ Tb](https://apify.com/reverenced_garnet) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 district summaries

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?

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

### What does Japan Real Estate Transaction Prices do?

**Purpose-built for Tokyo's 23 wards**: this Actor turns raw government transaction records into district-level median/quartile price per m² that's ready to drop into a spreadsheet or dashboard — not 29 raw string columns you have to clean yourself. Data comes directly from Japan's official government source, the [Real Estate Information Library](https://www.reinfolib.mlit.go.jp/) (不動産情報ライブラリ), operated by the Ministry of Land, Infrastructure, Transport and Tourism (MLIT). You get every disclosed transaction (price, floor area, price per sqm, building year, structure, land use) for the wards, years and quarters you choose, either as **individual records** or **pre-aggregated per-district statistics** (median, 25th/75th percentile price per sqm, and a year-by-year trend).

The raw government API is free, but it's Japanese-only, undocumented in English, split into one call per municipality × year × quarter, and returns unlabeled string fields with no price-per-sqm or district-level statistics. This Actor removes that friction and adds the aggregation layer on top, running on Apify's infrastructure with scheduling, API access, and export built in.

### Why use this Actor?

- **Market research for foreign buyers and investors** — Tokyo real estate (including the growing interest in *akiya*/vacant homes and central-ward condos) is a frequent target for international buyers who can't easily read Japanese government portals.
- **PropTech and analytics products** — drop clean, ward/district-level price statistics into your own app or dashboard without building a scraper or reverse-engineering the MLIT API.
- **Due diligence** — sanity-check a listing price against the actual disclosed transaction history for its district.

### How to use Japan Real Estate Transaction Prices

1. Get a **free API key** from MLIT at [reinfolib.mlit.go.jp](https://www.reinfolib.mlit.go.jp/help/apiManual/). It's free, but goes through an application review — MLIT doesn't publish a guaranteed turnaround time, so apply before you need the data rather than expecting same-day access.
2. Paste the key into the **MLIT reinfolib API key** input field.
3. Pick one or more of Tokyo's 23 wards (by Japanese name, e.g. `渋谷区`) and a year range.
4. Click **Start** and download the results as JSON, CSV, or Excel from the Dataset tab.

### Input

| Field | Type | Description |
|---|---|---|
| `apiKey` | string | Your free MLIT reinfolib API key (kept secret in the input form) |
| `municipalities` | array | Tokyo ward names (e.g. `渋谷区`) or 5-digit MLIT municipality codes |
| `yearFrom` / `yearTo` | integer | Year range (data available from 2005) |
| `quarters` | array | Which quarters (1-4) to include; default all four |
| `priceClassification` | string | `01` = transaction prices (default), `02` = agent-reported contracted prices |
| `aggregate` | boolean | `true` (default) = one row per district with median/quartile stats; `false` = every individual record |
| `maxRequests` | integer | Safety cap on API calls per run (default 200) |

Example input:

```json
{
  "apiKey": "your-mlit-reinfolib-api-key",
  "municipalities": ["千代田区", "港区", "渋谷区"],
  "yearFrom": 2022,
  "yearTo": 2025,
  "aggregate": true
}
```

### Output

Aggregated mode (default) — one row per municipality + district:

```json
{
  "municipalityCode": "13101",
  "municipality": "千代田区",
  "district": "一番町",
  "transactionCount": 6,
  "priceComputableCount": 6,
  "yearRange": [2022, 2025],
  "medianPricePerSqmJpy": 2986842,
  "p25PricePerSqmJpy": 2125000,
  "p75PricePerSqmJpy": 3939850,
  "yearlyBreakdown": [{ "year": 2024, "count": 6, "medianPricePerSqmJpy": 2986842 }],
  "source": "MLIT Real Estate Information Library (reinfolib.mlit.go.jp) XIT001",
  "credit": "このサービスは、国土交通省の不動産情報ライブラリのAPI機能を使用していますが…"
}
```

Raw mode (`aggregate: false`) — one row per disclosed transaction, with `municipalityCode`, `district`, `period`, `type`, `tradePriceJpy`, `areaSqm`, `pricePerSqmJpy`, `buildingYear`, `structure`, `use`, `source`, and `credit` fields.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data table

Aggregated mode (default) — one row per municipality + district:

| Field | Type | Description |
|---|---|---|
| `municipalityCode` | string | 5-digit MLIT municipality code (e.g. `13101`) |
| `municipality` / `district` | string | Ward and district name |
| `transactionCount` | number | Number of disclosed transactions in the requested period |
| `priceComputableCount` | number | Of those, how many had both a price and an area so a price-per-sqm could be computed (used for the stats below) |
| `yearRange` | array | `[minYear, maxYear]` covered by this district's transactions |
| `medianPricePerSqmJpy` / `p25PricePerSqmJpy` / `p75PricePerSqmJpy` | number | Median and quartile price per sqm (JPY) |
| `yearlyBreakdown` | array | Per-year count and median price per sqm |
| `credit` | string | Required MLIT attribution/disclaimer notice (see Legal section below) |

Raw mode (`aggregate: false`) — one row per transaction:

| Field | Type | Description |
|---|---|---|
| `municipalityCode` | string | 5-digit MLIT municipality code |
| `district` | string | District name |
| `period` | string | Reporting period as given by MLIT (e.g. `2024年第4四半期`) |
| `type` | string | Transaction type as reported by MLIT (e.g. land, land and building) |
| `tradePriceJpy` | number | Disclosed transaction price (JPY) |
| `areaSqm` | number | Floor/land area (sqm) |
| `pricePerSqmJpy` | number | Computed price per sqm |
| `buildingYear` / `structure` / `use` | string | Building attributes as reported by MLIT |
| `source` | string | Data source citation |
| `credit` | string | Required MLIT attribution/disclaimer notice (see Legal section below) |

### Pricing / cost estimation

This Actor uses **Pay-Per-Event** pricing: a small flat fee when a run starts, plus a per-result fee for each district-summary row or raw record returned. There is no charge for the underlying MLIT API itself — it's free — you're paying for the aggregation, cleaning, and Apify infrastructure (scheduling, storage, export).

### Tips

- Start with a narrow year range and a couple of wards to check the shape of the data before running a large multi-year, all-23-ward pull.
- Use `aggregate: true` (default) for market research and dashboards — it's far cheaper and faster than pulling every raw record.
- `maxRequests` caps the number of (ward × year × quarter) API calls in a single run — raise it if you need multi-year, multi-ward coverage in one go.

### FAQ, disclaimers and support

- All data originates from MLIT's official Real Estate Information Library under Japan's PDL 1.0 open data license — see the Legal section below for the full attribution requirements.
- **Limitations**: Currently supports Tokyo's 23 special wards only; other Japanese municipalities can be queried with a raw 5-digit MLIT municipality code but are not yet name-mapped. Nationwide coverage (name-mapping for all Japanese municipalities) is on the roadmap.
- Found an issue or need coverage for another prefecture? Use the Issues tab on this Actor's page.

### Source, attribution and disclaimer

出典：国土交通省 不動産情報ライブラリ (Source: Real Estate Information Library, Ministry of Land, Infrastructure, Transport and Tourism of Japan). This Actor's output is created by the Actor author by editing and aggregating data from the Real Estate Information Library; it is not published or endorsed by MLIT. The data is provided under Japan's Public Data License v1.0 (PDL1.0), which permits commercial use with attribution.

As required by the Library's API terms, every result row carries this notice in its `credit` field: "This service uses the API function of the Real Estate Information Library of Japan's MLIT, but the latest information, accuracy, and completeness of the provided data are not guaranteed." If you display or redistribute the data, keep the attribution and this notice with it.

This data is for reference only and is not investment, legal, or tax advice. Verify against official records before any purchase, sale, or investment decision.

Your MLIT API key is entered as a secret input, is used only to call the Library API on your behalf during your own runs, and is never logged or stored by this Actor. Under the Library's terms you are responsible for keeping your key private.

# Actor input Schema

## `apiKey` (type: `string`):

Your own free API key from reinfolib.mlit.go.jp (Real Estate Information Library, Japan's Ministry of Land, Infrastructure, Transport and Tourism). Apply at https://www.reinfolib.mlit.go.jp/help/apiManual/ — free, but subject to an application review (MLIT does not publish a guaranteed turnaround time; do not assume same-day approval).

## `municipalities` (type: `array`):

Tokyo 23 ward names in Japanese (e.g. "渋谷区", "世田谷区") or 5-digit MLIT municipality codes (e.g. "13113").

## `yearFrom` (type: `integer`):

First year to include (transaction-price data is available from 2005 onward).

## `yearTo` (type: `integer`):

Last year to include (inclusive).

## `quarters` (type: `array`):

Which calendar quarters to include (1-4). Default: all four.

## `priceClassification` (type: `string`):

01 = transaction price information (登記に基づく取引価格). 02 = contracted price information from real-estate agents (成約価格情報, limited coverage).

## `aggregate` (type: `boolean`):

If ON (default), output one row per municipality+district with count, median and quartile price per sqm, and a yearly breakdown. If OFF, output every individual cleaned transaction record.

## `maxRequests` (type: `integer`):

Safety cap on the number of (municipality x year x quarter) API calls in a single run, to bound run time and cost.

## Actor input object example

```json
{
  "municipalities": [
    "千代田区",
    "港区",
    "渋谷区"
  ],
  "yearFrom": 2022,
  "yearTo": 2025,
  "quarters": [
    1,
    2,
    3,
    4
  ],
  "priceClassification": "01",
  "aggregate": true,
  "maxRequests": 200
}
```

# 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 = {
    "municipalities": [
        "千代田区",
        "港区",
        "渋谷区"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("reverenced_garnet/apify-jp-realestate-prices").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 = { "municipalities": [
        "千代田区",
        "港区",
        "渋谷区",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("reverenced_garnet/apify-jp-realestate-prices").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 '{
  "municipalities": [
    "千代田区",
    "港区",
    "渋谷区"
  ]
}' |
apify call reverenced_garnet/apify-jp-realestate-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reverenced_garnet/apify-jp-realestate-prices"
        }
    }
}

```

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/1KoMSjASYBetReFtd/builds/YvoE43EkrmQl0JSPT/openapi.json
