ParseForge Scrapers

Singapore data.gov.sg Datasets Scraper

parseforge/mygov-singapore-data-scraper

AutomationIntegrations

Scrapes records from any data.gov.sg datastore resource by resource ID or search term. Returns each record as a flat row for export to CSV, JSON, Excel, or XML.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
87
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

Singapore data.gov.sg Datasets Scraper

Scrape Singapore government open data from data.gov.sg by resource ID or search term, up to a million rows per run. Every record comes back as a flat row with the dataset's own fields. No API key, no proxy, no setup. Export to CSV, JSON, Excel, or XML.

Singapore's official open data portal, data.gov.sg, exposes thousands of public datasets through a datastore API, but querying it means writing code, handling pagination, and reshaping JSON. This Actor reads any datastore resource by its resource_id or a free-text search, and returns each record as one flat row in a fixed schema. It works for HDB resale prices, school directories, COE results, weather readings, and every other public dataset on the portal.

Who uses it What they scrape data.gov.sg for
Data analysts Pull the latest Singapore government datasets into a spreadsheet for reporting.
Researchers Collect historical records from a specific data.gov.sg resource for study.
Journalists Gather official statistics on housing, transport, or health for a story.
App developers Feed Singapore open data into an application or dashboard.
Policy analysts Monitor changes in government-published indicators over time.

What it does

This Actor collects records from a data.gov.sg datastore resource, identified by resource ID or search term, and returns each record as a flat row.

  • πŸ” Resource ID or search: point the Actor at a dataset by its datastore resource_id, or let a free-text query find matching records.
  • πŸ“„ Flat row output: every record is returned as one flat object, ready for CSV, JSON, Excel, or XML export.
  • βš™οΈ Built-in pagination: the Actor follows the datastore API's pagination automatically, so you get every matching record up to your maxItems limit.
  • πŸ”Ž Full-row search: the optional query parameter filters records on the server side, so only relevant rows are downloaded.
  • πŸ‡ΈπŸ‡¬ Official Singapore data: reads directly from data.gov.sg, the government's open data portal, with no third-party transformation.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with data.gov.sg data

🏠 Track HDB resale prices.

A property analyst runs the Actor on the HDB resale transactions resource to collect the latest flat prices by town and flat type, then charts price trends for a market report.

🏫 Build a school directory.

An education startup scrapes the MOE school information resource to get every school's name, address, and contact details, then loads the rows into their app's database.

πŸš— Monitor COE prices.

A car dealer runs the Actor daily on the COE bidding results resource to track certificate prices and adjust their vehicle pricing strategy.

🌦️ Collect weather readings.

A climate researcher pulls historical weather station data from the National Environment Agency's resource to study rainfall patterns over the past decade.

πŸ“Š Feed a dashboard.

A government contractor schedules the Actor to refresh multiple datasets every morning, then pushes the flat rows into a business intelligence tool for public reporting.

Why choose this scraper

What you get
No API key data.gov.sg's datastore API is open, so you can start scraping without registration.
Any dataset Works with every resource on the portal, from HDB resale prices to school directories.
Flat output Nested JSON is flattened into one row per record, ready for analysis.
Server-side filtering The query parameter filters records before download, saving time and bandwidth.
Scalable Collect up to 1,000,000 records in a single run.

How it compares

This Actor is a direct scraper for any data.gov.sg datastore resource, while the competitors below offer either pre-built joins or focus on a single dataset.

Feature ParseForge Singapore Open Data Studio - Gov Data Joins Singapore School Directory (MOE SchoolFinder) Singapore HDB Resale Flat Prices Scraper
Scrape any data.gov.sg dataset by resource ID Yes Not listed Not listed Not listed
Free-text search within a dataset Yes Not listed Not listed Not listed
Cross-dataset joins Not listed Yes Not listed Not listed
MOE school directory data Yes, if you provide the school directory resource ID Not listed Yes Not listed
HDB resale flat prices Yes, if you provide the HDB resale resource ID Not listed Not listed Yes
CSV, JSON, Excel, XML export Yes Yes Not listed Not listed

Configure the run

Drive the Actor with a datastore resource_id from any data.gov.sg dataset URL, and optionally narrow the results with a free-text query. The maxItems limit caps how many records are collected per run. The Input tab lists every parameter.

A first run with the defaults:

{
 "datasetId": "d_8b84c4ee58e3cfc0ece0d773c8ca6abc",
 "maxItems": 10
}

A larger pull:

{
 "datasetId": "d_8b84c4ee58e3cfc0ece0d773c8ca6abc",
 "maxItems": 200
}

Pricing

Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $0.85
1,000 results $8.50
10,000 results $85.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Singapore data.gov.sg Datasets Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to data.gov.sg through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/mygov-singapore-data-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that the resource_id is correct and that the dataset is accessible through the datastore API. If you used a query, try removing it to see if the dataset returns any records at all.

Why did the run stop before reaching maxItems?

The dataset may have fewer records than your maxItems limit. The Actor stops when the API returns no more pages. Lower maxItems if you want a smaller sample.

Why are some fields missing from my output?

The datastore API may omit fields that are empty for a particular record. Check the dataset's schema on data.gov.sg to see which fields are defined.

Why did I get an error about an invalid resource_id?

Make sure you copied the full resource_id, including any hyphens or underscores. It is case-sensitive. Test the resource_id in the data.gov.sg API explorer first.

Why is the run taking a long time?

Large datasets with many records can take time to paginate through. Reduce maxItems or add a query to filter the data server-side.

FAQ

Question Answer
What is a resource_id and where do I find it? A resource_id is the unique identifier for a datastore resource on data.gov.sg. Open any dataset page on data.gov.sg, click the API link, and copy the resource_id from the URL or the API documentation.
Can I scrape any dataset on data.gov.sg? Yes, as long as the dataset is exposed through the datastore API. Most tabular datasets on the portal are available this way. Paste the resource_id into the Actor input and it will collect the records.
How does the query parameter work? The query parameter is a free-text search that filters records on the server side. It matches against all fields in the dataset, so you can use it to find rows containing a specific value, like a town name or a school name.
What is the maximum number of records I can collect? You can set maxItems up to 1,000,000 records per run. The Actor will follow the API's pagination until it reaches that limit or the dataset is exhausted.
Do I need an API key or proxy? No. data.gov.sg's datastore API is open and does not require authentication. The Actor runs on Apify's infrastructure, so you do not need to manage proxies.
What output formats are supported? The Actor returns data as JSON by default. You can export the results to CSV, JSON, Excel, or XML from the Apify platform.
Can I schedule this Actor to run regularly? Yes, you can set up a schedule in Apify to run the Actor daily, weekly, or at any interval. This is useful for keeping a copy of frequently updated datasets.
Does this Actor handle pagination automatically? Yes, the Actor follows the datastore API's pagination links automatically, so you do not need to write any pagination logic.
What if the dataset has nested fields? The Actor flattens nested JSON objects into a single flat row, so each record becomes one line in your output file.
Is this an official Government Technology Agency product? No, this Actor is built and maintained by a third party. It reads public data from data.gov.sg but is not affiliated with GovTech.

Related actors

Browse the full ParseForge collection for more scrapers.

πŸ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Government Technology Agency (GovTech). It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
datasetId string data.gov.sg datastore resource_id (UUID or slug from the dataset URL). d_8b84c4ee58e3cfc0ece0d773c8ca6abc
query string Optional free-text full-row search to filter records. not set
maxItems integer How many datasets to collect per run. 10

Pricing

from $7.50 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.0075 to $0.0085

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST Β· run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~mygov-singapore-data-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Singapore data.gov.sg Datasets Scraper on Apify All scrapers