{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Real Estate Prices — Bulk Dataset (MLIT Official)",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "4U26kSM1ZfE2Iw5aB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asuka-muse~japan-real-estate-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asuka-muse-japan-real-estate-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/asuka-muse~japan-real-estate-prices/runs": {
      "post": {
        "operationId": "runs-sync-asuka-muse-japan-real-estate-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/asuka-muse~japan-real-estate-prices/run-sync": {
      "post": {
        "operationId": "run-sync-asuka-muse-japan-real-estate-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "apiKey": {
            "title": "MLIT API key (leave empty for demo mode)",
            "type": "string",
            "description": "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": {
            "title": "Municipality codes (cityCodes)",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "endYear": {
            "title": "End year",
            "minimum": 2005,
            "maximum": 2100,
            "type": "integer",
            "description": "Last transaction year to fetch (inclusive). Transaction price data is available from 2005 (Q3 onwards), contract price data from 2021.",
            "default": 2024
          },
          "language": {
            "title": "Value language",
            "enum": [
              "en",
              "ja"
            ],
            "type": "string",
            "description": "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).",
            "default": "en"
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap. The run stops after this many records have been written to the dataset.",
            "default": 100000
          },
          "prefectureCodes": {
            "title": "Prefecture codes",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "priceClassification": {
            "title": "Price classification",
            "enum": [
              "01",
              "02",
              "both"
            ],
            "type": "string",
            "description": "01 = transaction prices (survey-based, from 2005), 02 = contract prices (from 2021), both = no filter.",
            "default": "01"
          },
          "quarters": {
            "title": "Quarters",
            "type": "array",
            "description": "Calendar quarters to fetch for each year (1 = Jan-Mar, 2 = Apr-Jun, 3 = Jul-Sep, 4 = Oct-Dec).",
            "items": {
              "maximum": 4,
              "minimum": 1,
              "type": "integer"
            },
            "default": [
              1,
              2,
              3,
              4
            ]
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "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.",
            "default": 600
          },
          "startYear": {
            "title": "Start year",
            "minimum": 2005,
            "maximum": 2100,
            "type": "integer",
            "description": "First transaction year to fetch (inclusive).",
            "default": 2023
          },
          "usdJpyRate": {
            "title": "USD/JPY rate for optional USD conversion",
            "type": "number",
            "description": "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."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}