# Singapore HDB Resale Transactions Scraper (`singaporedata/singapore-hdb-resale-transactions`) Actor

Search official Singapore HDB resale transactions and export clean comparable-sale data for property research, valuation support, and market analysis.

- **URL**: https://apify.com/singaporedata/singapore-hdb-resale-transactions.md
- **Developed by:** [Singapore Data](https://apify.com/singaporedata) (community)
- **Categories:** Real estate
- **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/platform/actors/running/actors-in-store#pay-per-usage

## 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

## Singapore HDB Resale Transactions

> **Unofficial:** This Actor is independently published by Singapore Data. It is not affiliated with or endorsed by the Singapore Government or any source agency.

Search and export official Singapore HDB resale transaction records. Get clean comparable-sale data for property research, valuation support, mortgage analysis, neighbourhood studies, and market monitoring.

### Why use this Actor?

- Search official transaction records by HDB town and flat type.
- Find addresses or blocks with an optional text search.
- Control the exact number of results and source page size.
- Export normalized JSON, CSV, Excel, XML, or RSS from Apify.
- Receive a structured run summary without mixing control rows into the transaction dataset.

### Input

| Field | Purpose | Default |
| --- | --- | --- |
| `town` | One HDB town, or all towns when empty | `ANG MO KIO` |
| `flatType` | One flat type, or all types when empty | `3 ROOM` |
| `query` | Optional search text such as a street or block | Empty |
| `maxItems` | Exact maximum number of unique records | `10` |
| `pageSize` | Rows requested per official API call | `5` |
| `startOffset` | Number of matching source rows to skip | `0` |
| `failOnNoResults` | Fail instead of returning a valid empty result | `false` |
| `dataGovApiKey` | Optional secret key for higher official API limits | Empty |

#### Example

```json
{
  "town": "ANG MO KIO",
  "flatType": "3 ROOM",
  "maxItems": 10,
  "pageSize": 5,
  "failOnNoResults": false
}
```

### Output

Each dataset row represents one valid transaction and includes the transaction month, town, flat type, block, street, storey range, floor area, flat model, lease details, resale price in SGD, official source link, source identifier, and collection timestamp.

```json
{
  "status": "success",
  "source": "Housing & Development Board — Resale Flat Prices",
  "sourceUrl": "https://data.gov.sg/datasets/d_8b84c4ee58e3cfc0ece0d773c8ca6abc/view",
  "sourceId": "d_8b84c4ee58e3cfc0ece0d773c8ca6abc:2",
  "country": "SG",
  "month": "2017-01",
  "town": "ANG MO KIO",
  "flatType": "3 ROOM",
  "block": "108",
  "streetName": "ANG MO KIO AVE 4",
  "storeyRange": "01 TO 03",
  "floorAreaSqm": 67,
  "flatModel": "New Generation",
  "leaseCommenceYear": 1978,
  "remainingLease": "60 years 07 months",
  "resalePrice": 250000,
  "currency": "SGD",
  "scrapedAt": "2026-08-02T12:00:00Z"
}
```

### Data source and responsible use

The Actor uses the official HDB Resale Flat Prices dataset published on data.gov.sg under the Singapore Open Data Licence. Singapore Data is an independent publisher and is not affiliated with, endorsed by, or acting on behalf of HDB or the Singapore Government.

The records are historical, informational, and subject to source corrections or update delays. They are not a property valuation, financial recommendation, or guarantee of a future transaction price. Verify important decisions against the official source.

### Performance

The Actor uses direct HTTP requests to the official API and does not launch a browser or proxy. It fetches only the pages needed to meet `maxItems`, respects public API limits, removes duplicate source rows, and stops as soon as the requested limit is reached.

### Empty results and errors

A valid search with no matching transactions returns an empty dataset and a `no_results` run summary unless `failOnNoResults` is enabled. Source rate limiting and contract errors are reported separately; the Actor never fabricates fallback records.

### SEO summary

Singapore HDB resale transaction scraper for official flat prices, comparable sales, towns, floor area, lease details, and historical property market research.

# Actor input Schema

## `town` (type: `string`):

Return transactions from one HDB town. Leave empty to include every town.

## `flatType` (type: `string`):

Return one flat type. Leave empty to include every type.

## `query` (type: `string`):

Optional text to search across the source fields, such as a street name or block number.

## `maxItems` (type: `integer`):

Stop after this many unique transactions. The limit is applied exactly.

## `pageSize` (type: `integer`):

Number of source rows requested at a time. Smaller pages are useful for tests; larger pages reduce API calls.

## `startOffset` (type: `integer`):

Skip this many matching source rows before collecting results.

## `failOnNoResults` (type: `boolean`):

When enabled, an empty valid search ends the run as failed instead of returning a no-results summary.

## `dataGovApiKey` (type: `string`):

Optional production API key for higher official API rate limits. Testing works without a key.

## Actor input object example

```json
{
  "town": "ANG MO KIO",
  "flatType": "3 ROOM",
  "maxItems": 10,
  "pageSize": 5,
  "startOffset": 0,
  "failOnNoResults": false
}
```

# Actor output Schema

## `results` (type: `string`):

Clean official transaction records ready for JSON, CSV, Excel, XML, or API use.

## `summary` (type: `string`):

Counts, source coverage, completion status, and the termination reason.

# 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("singaporedata/singapore-hdb-resale-transactions").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("singaporedata/singapore-hdb-resale-transactions").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 singaporedata/singapore-hdb-resale-transactions --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,singaporedata/singapore-hdb-resale-transactions"
        }
    }
}

```

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/GsMF3FKNa2cqEcpH4/builds/srxJUOAaWQcQwpjo7/openapi.json
