# Singapore Open Data Studio

Singapore Open Data Studio pulls datasets from the official data.gov.sg API and joins them into one flat table per run, for example hdb_units_managed and hdb_units_completed by financial year. Presets cover housing, demography, labour, vehicles and COE, education and health, plus custom joins. It costs $0.02 per joined pull, $0.01 for a raw extract, and delivers JSON, CSV or XLSX with licence attribution.

## Key facts

- Price: from $0.02 per joined pull, $20.00 per 1,000
- Pricing model: Pay per event
- Output: JSON, CSV, Excel, XML, RSS via Apify datasets
- Access: Apify Console, REST API, Python and JS clients
- Version: Updated Nov 2026, build 0.2.8
- Usage: 100.0% successful runs (30 days)
- Actor: subimpact/sg-open-data-studio

## Who it is for

- Property and housing analysts tracking HDB supply
- Economists building Singapore labour and COE views
- Public sector and consultancy teams needing one clean table
- Data teams packaging Singapore statistics for a model

## Use cases

### HDB supply by financial year

The hdb-housing preset is the default and returns 14 rows from financial year 2008 to 2021, with hdb_units_managed and hdb_units_completed. Subtract completions year on year to get net additions, and chart the gap against units under management to show how fast the stock grew. Export as csv and it opens straight in Sheets.

### COE quotas next to vehicle counts

The vehicles-coe preset joins COE quotas with cars by engine capacity, which is the comparison a motor dealer or a leasing analyst usually assembles by hand. Keep customJoinType at inner for only matching years, or switch to left to keep every quota year even where the vehicle table has a gap. customAgg set to sum collapses duplicate capacity bands.

### Labour market in one row per year

labour-market brings female labour force participation rate, employment rate and long-term unemployment together, so a single row is a labour dashboard row. That is useful for a quarterly commentary where you want three indicators aligned on the same year without re-deriving them from separate downloads, and the verification file records the year range that was actually covered.

### Health and education side by side

Run the health preset for hospital admissions, doctors and life expectancy, then the education preset for primary and secondary enrolment plus teacher counts. Because both deliver the same flat shape, the two files stack into one table keyed on year. Set webhookUrl to have each file POSTed to your storage after a scheduled run.

### A custom join with your own ids

Set preset to custom, put two to six data.gov.sg dataset ids starting with d_ in customDatasets, and choose key columns in customKey, with year as the usual key. customParams passes extra API filters such as a sex filter as JSON. That is how you build a table the six presets do not cover without touching the source portal.

## Price events

- Joined pull (`joined-pull`): $0.02, lowest tier $0.02. One cross-dataset join delivered as flat CSV/JSON/XLSX (studio mode).
- Data extraction (`extract-pull`): $0.01, lowest tier $0.01. One raw dataset pull (1-5 datasets by ID, no join).

Prices from the Apify Store. Apify shows the final price before each run.

## How it compares with other Apify actors

Price per 1,000 pulls at Apify Store list prices, checked 20 Nov 2026.

| Actor | Price per 1,000 pulls (Free plan) | Higher plans (Gold) | Start fee per run | Platform usage | Users | Rating | Last build |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Singapore Open Data Studio — Gov Data Joins (this API) | $20.00 | $20.00 | None | Included | 2 | No reviews yet | 18 Nov 2026 |
| [Malaysia & Singapore Open Data API (OpenDOSM, BNM, data.gov.sg)](https://apify.com/thriving_adder/sea-open-data) | Charges per record returned, plus a small start fee per run. | Same unit, see the first price column | $0.00005 | Included | 2 | No reviews yet | 29 Oct 2026 |
| [Singapore Open Data Scraper](https://apify.com/parseforge/singapore-data-gov-sg-scraper) | Charges per result row scraped from a data.gov.sg resource. | Same unit, see the first price column | None | Included | 2 | No reviews yet | 30 Sep 2026 |

### Where Malaysia & Singapore Open Data API (OpenDOSM, BNM, data.gov.sg) is stronger

- Covers Malaysia as well as Singapore, including OpenDOSM and central bank series
- Licence attribution and update frequency stored on every record
- Flattens nested fields on request

### Where this API is stronger

- Cross dataset joins across housing, labour, health and other Singapore series
- One joined pull per delivery instead of paying per record
- CSV, JSON and XLSX files plus webhook delivery from the same run

### Where Singapore Open Data Scraper is stronger

- Takes any data.gov.sg resource ID, so coverage is not tied to a preset list
- Full text search and field filters over a resource
- Flat rows ready for spreadsheets

### Where this API is stronger

- Joins several datasets on a shared key rather than exporting one resource at a time
- Six ready presets for the common Singapore series
- Delivers files and webhooks, not just dataset rows

Singapore open data is served by a few small actors that export one data.gov.sg resource at a time. Ours is the join layer on top: presets that combine housing, labour, health and other series on a shared key. Buyers who need raw records or Malaysian data alongside Singapore have good alternatives.

Prices are Apify Store list prices, checked 20 Nov 2026. Platform usage 'Paid separately' means Apify bills compute on top of the event price. Check each listing before you buy.

## Input

- `mode` (string, optional): studio = value layer (presets, joins, AI-ready package). extract = raw data pull of 1-5 datasets by ID (cheaper per-pull event).
- `datasetIds` (array, optional): REQUIRED when mode=extract: list of data.gov.sg dataset ids (d_...) to pull raw (1-5). Leave empty to use studio mode.
- `preset` (string, optional): Which joined dataset to deliver. Legacy codes S1-S6 are still accepted (S1 = hdb-housing, S2 = demography, S3 = labour-market, S4 = vehicles-coe, S5 = education, S6 = health). custom = bring your own dataset ids.
- `customDatasets` (array, optional): REQUIRED when preset=custom: list of data.gov.sg dataset ids (d_...) to join (2-6). Leave empty to use a preset.
- `customKey` (array, optional): For preset=custom: key parts to join on. Use 'year' (auto-extracted from year/financial_year/month fields) or raw field names. All datasets must share these keys.
- `customJoinType` (string, optional): inner keeps only keys present in every dataset; left keeps all keys from the first dataset.
- `customParams` (string, optional): For preset=custom: JSON object of extra API params applied to every dataset, e.g. {"filters": {"sex": "female"}}. Must be valid JSON.
- `customAgg` (string, optional): none = keep raw rows (last value per key). sum = aggregate numeric values per key. mean = average numeric values per key.
- `format` (string, optional): File format delivered to the key-value store (dataset records are always JSON).
- `webhookUrl` (string, optional): POST the result file to this URL after the run (3 retries with backoff). Leave empty to skip.
- `aiReady` (boolean, optional): Also emit JSON Schema + data dictionary + sample rows for LLM/RAG ingestion.
- `includeAttribution` (boolean, optional): Attach source/licence metadata sidecar to every output (Singapore Open Data Licence).

### Example input

```json
{
  "datasetIds": [
    "d_07b1eeeb22efdf7faf5bd6a13667359d"
  ],
  "customDatasets": [
    "d_07b1eeeb22efdf7faf5bd6a13667359d",
    "d_9bbcd0c9b0351c7f41c9bfdcdc746668"
  ],
  "customKey": [
    "year"
  ],
  "customParams": "{\"filters\": {\"sex\": \"female\"}}"
}
```

## Output fields

- `year` (any): 
- `hdb_units_managed` (any): 
- `hdb_units_completed` (any): 

## Sample output

Trimmed from one of our own test runs. Personal data is redacted.

```json
[
  {
    "year": 2008,
    "hdb_units_managed": 883896,
    "hdb_units_completed": 1769
  },
  {
    "year": 2009,
    "hdb_units_managed": 890212,
    "hdb_units_completed": 7050
  }
]
```

## How to run it

1. Leave mode at studio and choose a preset such as hdb-housing, the default, or vehicles-coe.
2. Set format to csv, json or xlsx for the file you want in the key-value store.
3. Choose custom in preset if you have your own data.gov.sg dataset ids, then list them in customDatasets.
4. Run in the Apify Console; the joined rows appear in the Dataset tab and the file is written alongside the sidecars.
5. Download <preset>_join.csv, and keep <preset>_attribution.json with any table you publish.

### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/subimpact~sg-open-data-studio/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"datasetIds":["d_07b1eeeb22efdf7faf5bd6a13667359d"],"customDatasets":["d_07b1eeeb22efdf7faf5bd6a13667359d","d_9bbcd0c9b0351c7f41c9bfdcdc746668"],"customKey":["year"],"customParams":"{\"filters\": {\"sex\": \"female\"}}"}'
```

### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("subimpact/sg-open-data-studio").call(run_input={
      "datasetIds": [
        "d_07b1eeeb22efdf7faf5bd6a13667359d"
      ],
      "customDatasets": [
        "d_07b1eeeb22efdf7faf5bd6a13667359d",
        "d_9bbcd0c9b0351c7f41c9bfdcdc746668"
      ],
      "customKey": [
        "year"
      ],
      "customParams": "{\"filters\": {\"sex\": \"female\"}}"
    })

for item in client.dataset(run["default_dataset_id"]).iterate_items():
    print(item)
```

### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('subimpact/sg-open-data-studio').call({
  "datasetIds": [
    "d_07b1eeeb22efdf7faf5bd6a13667359d"
  ],
  "customDatasets": [
    "d_07b1eeeb22efdf7faf5bd6a13667359d",
    "d_9bbcd0c9b0351c7f41c9bfdcdc746668"
  ],
  "customKey": [
    "year"
  ],
  "customParams": "{\"filters\": {\"sex\": \"female\"}}"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

### n8n

Use the Apify node (Run an Actor).
Actor ID: subimpact/sg-open-data-studio
Input JSON: paste the example input below.

## Limits

- Presets only cover the six topic bundles; anything else needs a custom join with dataset ids.
- Year coverage follows the source dataset, so the housing preset stops at financial year 2021.
- A custom join needs data.gov.sg dataset ids in advance, as there is no catalogue search in the Actor.
- The Singapore Open Data Licence attribution must stay with any published table.

## FAQ

### How much is a joined pull?

$0.02 per joined pull for a cross-dataset join delivered as a flat CSV, JSON or XLSX file, and $0.01 for a raw extract pull of one to five datasets by ID. Singapore's data is free to use, so the price is for the join, the cleaning and the packaging.

### Do I need a data.gov.sg API key?

No. data.gov.sg is a public API and the Actor calls it directly with no key, account or browser. There is no scraping of the website either, so your runs are not affected by page layout changes.

### Which presets are included?

hdb-housing, demography, labour-market, vehicles-coe, education and health, with legacy codes S1 to S6 still accepted as aliases. Pick custom to join data.gov.sg datasets the presets do not cover.

### How far back does the housing data go?

The hdb-housing preset returns 14 rows covering financial years 2008 to 2021, which is what the source publishes. Each run's verification file records the year range and row count, so you can confirm the window before you refresh a chart.

### What can a custom join do?

Take two to six dataset ids, join them on key columns you name, choose inner or left, optionally sum or average duplicate rows with customAgg, and pass extra API parameters as JSON in customParams. Filters such as a sex breakdown are supported through that parameter object.

### What does the Singapore licence require?

The data is published under the Singapore Open Data Licence, which is based on CC BY 4.0. Every run writes an attribution sidecar with the sources used, and that file should travel with any table you share externally.

### Can a scheduled run fail quietly on an empty pull?

It should not, because each run writes a verification file with the row count, year range and source rows, plus a summary record at the end of the dataset. A downstream job can read that before replacing last month's table, and a webhookUrl delivers the file wherever you need it.

## Links

- Page: https://subimpact.net/apis/sg-open-data-studio/
- Category: https://subimpact.net/apis/category/open-data/
- Run on Apify: https://apify.com/subimpact/sg-open-data-studio
- All data APIs: https://subimpact.net/apis/
- Catalogue JSON: https://subimpact.net/apis/catalogue.json
