# Japan Real Estate Prices — Bulk Dataset (MLIT Official) (`asuka-muse/japan-real-estate-prices`) Actor

Bulk-downloads official Japanese real estate transaction prices from the MLIT Real Estate Information Library API: every record for a prefecture and period in one run, with all fields mapped to English keys. For market research, proptech and data pipelines.

- **URL**: https://apify.com/asuka-muse/japan-real-estate-prices.md
- **Developed by:** [Asuka Muse](https://apify.com/asuka-muse) (community)
- **Features:** Limited permissions
- **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 Real Estate Transaction Prices — Bulk Dataset (MLIT Official)

Download **bulk Japanese real estate transaction prices** by prefecture / municipality and period, normalized into clean, analysis-ready records with **English field names and explicit units**.

Unlike one-by-one lookup tools, this Actor is built for **batch work**: pick an area and a period, and get the complete set of official transaction records as a dataset (JSON / CSV / Excel via Apify export) — ready for investment analysis, market research, or machine-learning training data.

### Data source

All data comes from the official **Real Estate Information Library** operated by Japan's **Ministry of Land, Infrastructure, Transport and Tourism (MLIT)** — API **XIT001** ("Real estate price (transaction price / contract price) information API"):

- Transaction prices (survey-based, collected under MLIT's transaction price information program): **2005 Q3 onwards**, ~5.4 million records nationwide.
- Contract prices: **2021 Q1 onwards**.
- Municipalities are resolved with the official **XIT002** API.

Japan is one of the few countries that publishes actual closed transaction prices as open government data. This Actor simply makes that data usable for non-Japanese speakers: it calls the official API with **your own API key** and reformats the response.

> **Attribution (required):** Source: MLIT Real Estate Information Library (不動産情報ライブラリ), Ministry of Land, Infrastructure, Transport and Tourism, Japan. Every output record carries a `DataSource` field with this attribution.

### Who is it for?

- **Real estate investors** screening Japanese markets with real closed prices (not asking prices).
- **Proptech / data teams** building valuation, AVM, or market-monitoring pipelines.
- **Researchers and analysts** who need area × period bulk extracts instead of per-property lookups.
- **AI / ML practitioners** who need large, structured Japanese transaction datasets.

### How to use

1. **Get a free MLIT API key.** Apply on the Real Estate Information Library site (API利用申請 / "API use application" at reinfolib.mlit.go.jp). The application is free; after review (typically a few business days) you receive a subscription key. The key is personal to the registrant — see *Terms* below.
2. **Run this Actor** and paste your key into the `apiKey` input.
3. **Choose the area**: either `prefectureCodes` (2-digit, e.g. `13` = Tokyo — expanded to all municipalities automatically) or `cityCodes` (5-digit municipality codes, e.g. `13102` = Chuo City, Tokyo).
4. **Choose the period**: `startYear`, `endYear`, `quarters`, and `priceClassification` (`01` transaction prices / `02` contract prices / both).
5. Download the dataset from the **Dataset** tab (JSON, CSV, Excel, …).

#### No key yet? Try demo mode

Leave `apiKey` empty and the Actor runs in **demo mode**: the complete pipeline runs on built-in mock data that replicates the exact API response format, so you can preview the output schema for free. Demo records are flagged `"DemoMode": true` and are **not** real transactions.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `apiKey` | string (secret) | `""` | Your MLIT API subscription key. Used only to call the official API during the run; never stored. Empty = demo mode. |
| `prefectureCodes` | string\[] | `[]` | 2-digit prefecture codes (e.g. `13` Tokyo, `27` Osaka). Expanded to all municipalities via XIT002. |
| `cityCodes` | string\[] | `[]` | 5-digit municipality codes (e.g. `13102`). Either this or `prefectureCodes` is required. |
| `startYear` / `endYear` | integer | 2023 / 2024 | Inclusive transaction-year range. |
| `quarters` | integer\[] | `[1,2,3,4]` | Calendar quarters to fetch per year. |
| `priceClassification` | select | `01` | `01` transaction prices, `02` contract prices, `both`. |
| `language` | select | `en` | Language of categorical values (`en` / `ja`). Field names are always English. |
| `usdJpyRate` | number | — | Optional. If set (e.g. `155`), each record also gets `PriceUSD = PriceJPY / rate`. Rates are not fetched automatically. |
| `maxRecords` | integer | 100000 | Safety cap on records written. |
| `requestDelayMs` | integer | 600 | Delay between API requests (the MLIT terms ask users not to fire requests in rapid succession). |

### Output

One dataset item per transaction record. All values that the API returns as strings are converted to proper types; empty API fields become `null`.

| Field | Unit / type | Meaning |
|---|---|---|
| `PriceCategory` | string | Transaction price information / Contract price information |
| `TransactionType` | string | e.g. "Residential land (land and building)", "Land only", "Pre-owned condominium" (with `language=en`) |
| `RegionType` | string | Residential / commercial / industrial area |
| `Prefecture`, `Municipality` | string | Prefecture and municipality names |
| `MunicipalityCode` | string | 5-digit local government code |
| `DistrictName`, `DistrictCode` | string | District (town) name and code. Codes may change between data updates. |
| `PriceJPY` | JPY (number) | **Total transaction price.** Note: MLIT rounds prices to 2 significant digits. |
| `PricePerSqmJPY` | JPY/m² | Transaction price per square meter |
| `PricePerTsuboJPY` | JPY/tsubo | Price per tsubo (1 tsubo ≈ 3.30579 m²); may be `null` |
| `PriceUSD` | USD | Only when `usdJpyRate` is provided |
| `AreaSqm` | m² | Land area (or exclusive floor area for condominiums) |
| `TotalFloorAreaSqm` | m² | Total floor area of the building |
| `FrontageMeters` | m | Lot frontage |
| `FrontRoadWidthMeters` | m | Width of the front road |
| `FloorPlan` | string | Layout, e.g. "3LDK" |
| `LandShape` | string | Lot shape |
| `BuildingStructure` | string | e.g. RC, SRC, wooden |
| `BuildingUse`, `FutureUsePurpose` | string | Current / intended use |
| `BuildingYear` | year (number) | Parsed from the raw value; `null` for non-numeric labels (e.g. "pre-war") |
| `FrontRoadDirection`, `FrontRoadType` | string | Front road orientation and type |
| `ZoningDistrict` | string | City-planning zoning, e.g. "Commercial district" |
| `BuildingCoverageRatioPercent` | % | Building coverage ratio |
| `FloorAreaRatioPercent` | % | Floor-area ratio |
| `Period` | string | Transaction period as returned by the API |
| `PeriodYear`, `PeriodQuarter` | number | Parsed year / quarter |
| `Renovation`, `Remarks` | string | Renovation status / transaction notes |
| `DataSource` | string | Attribution (see above) |
| `DemoMode` | boolean | Present (`true`) only in demo mode |

#### Example output record

```json
{
  "PriceCategory": "Transaction price information",
  "TransactionType": "Residential land (land and building)",
  "RegionType": "Commercial area",
  "Prefecture": "Tokyo",
  "Municipality": "Chuo City",
  "MunicipalityCode": "13102",
  "DistrictName": "Nihonbashi-Koamicho",
  "PriceJPY": 85000000,
  "PricePerSqmJPY": 1062500,
  "PricePerTsuboJPY": 3510000,
  "AreaSqm": 80,
  "TotalFloorAreaSqm": 240,
  "BuildingYear": 1972,
  "ZoningDistrict": "Commercial district",
  "BuildingCoverageRatioPercent": 80,
  "FloorAreaRatioPercent": 500,
  "PeriodYear": 2024,
  "PeriodQuarter": 1,
  "DataSource": "MLIT Real Estate Information Library (Ministry of Land, Infrastructure, Transport and Tourism, Japan) — API XIT001"
}
```

### Pricing

This Actor is priced **pay-per-event at $0.002–$0.005 per record** written to the dataset (final price as shown on the Actor page). A one-year extract for a single Tokyo ward typically contains a few thousand records; a full prefecture-year can contain tens of thousands — use `maxRecords` to cap a run.

### Terms, licensing & redistribution — please read

- **Data terms.** The underlying data is Japanese government open data provided by the MLIT Real Estate Information Library. Its use is governed by the Library's **API Terms of Use** (API利用規約) and the Government of Japan Standard Terms of Use, which permit reuse including commercial use **with attribution**. The required attribution is included in every record (`DataSource`) and must be preserved when redistributing derived datasets.
- **Your own API key is required.** The MLIT API key is issued to an individual registrant after application and review. This Actor does **not** ship with, share, or redistribute any API key: each user supplies their own key via the `apiKey` input, and the key is used only from within that user's run. Do not use a key registered to someone else.
- **Data caveats.** Transaction prices are collected by questionnaire survey and do **not** cover every transaction; totals are rounded to 2 significant digits by MLIT. District codes/names may change between data updates, so joins across extracts taken at different times should use municipality code + district name. Records contain no personal information (officially anonymized data; locations are district-level).
- **Not investment advice.** This Actor provides raw official data only; it does not provide valuations, recommendations, or investment advice.

### Support & development

Issues and feature requests are welcome via the Actor's Issues tab. The Actor is maintained against the official MLIT API specification; if MLIT changes the API, the Actor is updated accordingly.

# Actor input Schema

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

Your MLIT Real Estate Information Library API subscription key (issued after a free application at reinfolib.mlit.go.jp). The key is only used to call the official API from this Actor run and is never stored by the Actor. Leave empty to run in DEMO MODE: the full pipeline runs on built-in mock data in the exact API response format, so you can preview the output schema at no cost.

## `cityCodes` (type: `array`):

5-digit Japanese municipality codes (e.g. 13102 = Chuo City, Tokyo; 13113 = Setagaya City, Tokyo). If provided, these are fetched directly. Either cityCodes or prefectureCodes is required (in demo mode, Chuo City and Setagaya City are used when both are empty).

## `endYear` (type: `integer`):

Last transaction year to fetch (inclusive). Transaction price data is available from 2005 (Q3 onwards), contract price data from 2021.

## `language` (type: `string`):

Language of categorical values returned by the MLIT API. Field names in the output dataset are always English; this controls the values (e.g. Prefecture, zoning, structure).

## `maxRecords` (type: `integer`):

Safety cap. The run stops after this many records have been written to the dataset.

## `prefectureCodes` (type: `array`):

2-digit prefecture codes (e.g. 13 = Tokyo, 27 = Osaka). Each prefecture is expanded to all of its municipalities via the official XIT002 API, and every municipality is fetched. Either prefectureCodes or cityCodes is required.

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

01 = transaction prices (survey-based, from 2005), 02 = contract prices (from 2021), both = no filter.

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

Calendar quarters to fetch for each year (1 = Jan-Mar, 2 = Apr-Jun, 3 = Jul-Sep, 4 = Oct-Dec).

## `requestDelayMs` (type: `integer`):

Delay between API requests in milliseconds. The MLIT API terms ask users not to send requests in rapid succession; keep this at 300 or above.

## `startYear` (type: `integer`):

First transaction year to fetch (inclusive).

## `usdJpyRate` (type: `number`):

Optional USD/JPY exchange rate (JPY per 1 USD, e.g. 155). When set, each record also includes PriceUSD = PriceJPY / rate. The MLIT API does not provide exchange rates, so the rate is supplied by you and is not fetched automatically.

## Actor input object example

```json
{
  "cityCodes": [],
  "endYear": 2024,
  "language": "en",
  "maxRecords": 100000,
  "prefectureCodes": [],
  "priceClassification": "01",
  "quarters": [
    1,
    2,
    3,
    4
  ],
  "requestDelayMs": 600,
  "startYear": 2023
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all results

## `keyValueStore` (type: `string`):

Key-value store with the run summary record

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("asuka-muse/japan-real-estate-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("asuka-muse/japan-real-estate-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 '{}' |
apify call asuka-muse/japan-real-estate-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,asuka-muse/japan-real-estate-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/XpFdplU1fVetHHaQP/builds/4U26kSM1ZfE2Iw5aB/openapi.json
