{
  "openapi": "3.0.1",
  "info": {
    "title": "Singapore HDB Resale Flat Prices Scraper",
    "description": "Scrape Singapore HDB resale flat prices and transactions from data.gov.sg, no API key. Filter by town, flat type, price, floor area and month (1990 to now). Get resale price, price per sqm and sqft, storey, lease and geocoded address. Export JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "2szjmtWPt4LAy7RfG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~singapore-hdb-resale-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-singapore-hdb-resale-prices-scraper",
        "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/scrapers_lat~singapore-hdb-resale-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-singapore-hdb-resale-prices-scraper",
        "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/scrapers_lat~singapore-hdb-resale-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-singapore-hdb-resale-prices-scraper",
        "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": {
          "maxTransactions": {
            "title": "Max transactions",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of resale transactions to collect. The portal rate-limits anonymous access, so very large pulls are paced automatically."
          },
          "town": {
            "title": "Town",
            "type": "string",
            "description": "Filter to one HDB town, exact match (for example \"ANG MO KIO\", \"TAMPINES\", \"BEDOK\", \"WOODLANDS\"). Case-insensitive. Leave empty for all towns."
          },
          "flatType": {
            "title": "Flat type",
            "type": "string",
            "description": "Filter to one flat type, exact match (for example \"3 ROOM\", \"4 ROOM\", \"5 ROOM\", \"EXECUTIVE\", \"MULTI-GENERATION\"). Case-insensitive. Leave empty for all flat types."
          },
          "flatModel": {
            "title": "Flat model",
            "type": "string",
            "description": "Filter to one HDB flat model, exact match (for example \"Improved\", \"New Generation\", \"Maisonette\", \"Model A\", \"Premium Apartment\"). Leave empty for all models."
          },
          "block": {
            "title": "Block",
            "type": "string",
            "description": "Filter to one block number, exact match (for example \"406\", \"605\"). Combine with town/street for a single address. Leave empty for all blocks."
          },
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "Free-text search across the transaction, for example a street name or block (\"ANG MO KIO AVE 10\", \"406\"). Leave empty to pull without a keyword filter."
          },
          "minPrice": {
            "title": "Minimum resale price (SGD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep transactions with a resale price of at least this amount in SGD. Optional."
          },
          "maxPrice": {
            "title": "Maximum resale price (SGD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep transactions with a resale price of at most this amount in SGD. Optional."
          },
          "minFloorAreaSqm": {
            "title": "Minimum floor area (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep transactions with a floor area of at least this many square metres. Optional."
          },
          "maxFloorAreaSqm": {
            "title": "Maximum floor area (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep transactions with a floor area of at most this many square metres. Optional."
          },
          "fromMonth": {
            "title": "From month (YYYY-MM)",
            "type": "string",
            "description": "Only keep transactions in or after this month, format YYYY-MM (for example \"2023-01\"). Optional."
          },
          "toMonth": {
            "title": "To month (YYYY-MM)",
            "type": "string",
            "description": "Only keep transactions in or before this month, format YYYY-MM (for example \"2024-12\"). Optional."
          },
          "datasetPeriod": {
            "title": "History period",
            "enum": [
              "all",
              "2017-present",
              "2015-2016",
              "2012-2014",
              "2000-2012",
              "1990-1999"
            ],
            "type": "string",
            "description": "Which official HDB resale dataset(s) to read. \"all\" spans 1990 to present (~986k transactions). Note: pre-2015 transactions do not carry a remaining-lease value at source.",
            "default": "all"
          },
          "sortByNewest": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Return the most recent transaction months first. Turn off to read in the source (oldest-first) order.",
            "default": true
          },
          "includeMarketStats": {
            "title": "Add market stats (paid add-on)",
            "type": "boolean",
            "description": "Paid add-on (paid Apify plans only). Enriches each transaction with its town + flat-type segment market context: median / average / min / max resale price, median / average price per sqm, and how this sale compares to the segment median. Billed as one \"Detail record\" event per enriched transaction, only when stats are produced. Leave off for the standard result.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}