{
  "openapi": "3.0.1",
  "info": {
    "title": "Taiwan Property Price Stats by District (實價登錄) — MOI Data",
    "description": "Quarterly Taiwan housing price statistics per district and building type from the official MOI actual-price registration data: transaction count, price per ping (excl. parking) median, mean, P25, P75, median total price.",
    "version": "0.0",
    "x-build-id": "70qYJpjfE1e4XdRz2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/waisuan~taiwan-property-district-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-waisuan-taiwan-property-district-stats",
        "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/waisuan~taiwan-property-district-stats/runs": {
      "post": {
        "operationId": "runs-sync-waisuan-taiwan-property-district-stats",
        "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/waisuan~taiwan-property-district-stats/run-sync": {
      "post": {
        "operationId": "run-sync-waisuan-taiwan-property-district-stats",
        "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": {
          "seasons": {
            "title": "Seasons (ROC year + S + quarter)",
            "type": "array",
            "description": "e.g. 115S2 = 2026 Q2 (ROC year 115 = 2026). Leave empty to use the latest published season automatically.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties / cities",
            "type": "array",
            "description": "Counties/cities (MOI letter codes, e.g. A = Taipei, F = New Taipei, H = Taoyuan). One download per county per season per transaction type.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G",
                "H",
                "I",
                "J",
                "K",
                "M",
                "N",
                "O",
                "P",
                "Q",
                "T",
                "U",
                "V",
                "W",
                "X",
                "Z"
              ],
              "enumTitles": [
                "Taipei 臺北市",
                "Taichung 臺中市",
                "Keelung 基隆市",
                "Tainan 臺南市",
                "Kaohsiung 高雄市",
                "New Taipei 新北市",
                "Yilan 宜蘭縣",
                "Taoyuan 桃園市",
                "Chiayi City 嘉義市",
                "Hsinchu County 新竹縣",
                "Miaoli 苗栗縣",
                "Nantou 南投縣",
                "Changhua 彰化縣",
                "Hsinchu City 新竹市",
                "Yunlin 雲林縣",
                "Chiayi County 嘉義縣",
                "Pingtung 屏東縣",
                "Hualien 花蓮縣",
                "Taitung 臺東縣",
                "Kinmen 金門縣",
                "Penghu 澎湖縣",
                "Lienchiang 連江縣"
              ]
            },
            "default": [
              "A"
            ]
          },
          "transactionTypes": {
            "title": "Transaction types",
            "type": "array",
            "description": "sale = existing homes (買賣), presale = pre-sale contracts (預售屋), lease = rentals (租賃; unit price is then monthly rent per ping).",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "presale",
                "lease"
              ],
              "enumTitles": [
                "Sale 買賣",
                "Presale 預售屋",
                "Lease 租賃"
              ]
            },
            "default": [
              "sale"
            ]
          },
          "buildingTypes": {
            "title": "Building types",
            "type": "array",
            "description": "Building types (建物型態) to include. Empty = all types. Land-only and parking-only transactions are always excluded.",
            "items": {
              "type": "string",
              "enum": [
                "highRiseResidential",
                "midRiseResidential",
                "walkUpApartment",
                "townhouse",
                "studio",
                "shop",
                "officeBuilding",
                "factoryOffice",
                "factory",
                "warehouse",
                "farmhouse",
                "other"
              ],
              "enumTitles": [
                "Residential high-rise (11+ floors, elevator) 住宅大樓",
                "Mid-rise residential (≤10 floors, elevator) 華廈",
                "Walk-up apartment (≤5 floors, no elevator) 公寓",
                "Townhouse / detached house 透天厝",
                "Studio (1 bedroom, 1 living room, 1 bath) 套房",
                "Shop / storefront 店面",
                "Office / commercial building 辦公商業大樓",
                "Factory-office 廠辦",
                "Factory 工廠",
                "Warehouse 倉庫",
                "Farmhouse 農舍",
                "Other 其他"
              ]
            },
            "default": []
          },
          "districts": {
            "title": "Districts (Chinese, exact)",
            "type": "array",
            "description": "Only these districts/townships, e.g. 大安區, 板橋區. Empty = all districts of the selected counties.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeSpecialRelations": {
            "title": "Exclude related-party deals",
            "type": "boolean",
            "description": "Drop transactions whose official note mentions relatives, employees, co-owners or other special relations (these distort prices).",
            "default": true
          },
          "minTransactions": {
            "title": "Min transactions per row",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Skip district × building-type groups with fewer transactions than this (small groups give unstable medians).",
            "default": 1
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of statistics rows to output (each row is one billable result).",
            "default": 1000
          },
          "requestDelayMs": {
            "title": "Delay between downloads (ms)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Pause before each download from the MOI server.",
            "default": 1500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}