# Introduction to data.gov.sg

## What is data.gov.sg?

[data.gov.sg](http://data.gov.sg) is the Singapore Government's open data marketplace. It brings together datasets from across public agencies — from housing and transport to health and the environment — in one place, so you can find, explore, and use government data without having to contact individual agencies.

Data on the platform can be explored interactively in a browser, downloaded in bulk, or accessed programmatically through our APIs. All data is available under the Singapore Open Data Licence, which allows free use for most purposes including commercial applications.

## Product Vision

Make Singapore’s data **accessible by default**, to solve problems and inform decisions

## Mission

We make Singapore's open government data discoverable, understandable, and usable. Consistently co-creating valuable data with government agencies to empower people to innovate and make informed decisions.

Features include

1. High quality datasets from agencies with dataset previews
2. Data visualisations of tabular (charts) and geospatial (maps)
3. APIs, both dataset and real-time

### **Stay Updated**

Join our Telegram channel for release announcements, new datasets, and platform updates: <https://t.me/datagovsg> To report issues or request new datasets, reach us at <feedback@data.gov.sg>.


# What's new

Find a summary of whats new here! For more information on each individual feature click on the monthly release notes tabs to the left of the screen.

## For Users

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Embeddable Data Viewer</strong></mark></td><td>Users can now plant tables available on the data explorer right into your own sites!  Click  the shell script icon and copy and paste the html code into your webpage to embed this data viewer.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Product status page</strong></mark></td><td>To improve visibility of the site and the status of <a href="http://data.gov.sg/">data.gov.sg</a> APIs, we are introducing the product status page, <a href="https://status.data.gov.sg/">nested under Help </a>on the main search screen.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Citations</strong></mark></td><td>We have made it even simpler to cite your sources. Simply scroll down the dataset page to find the Citation function, and toggle through APA and IEEE formats.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Sorting by numeric columns in the data viewer</strong></mark><br>The data viewer will now arrange dataset values in ascending or descending numerical order, for selected datasets.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Dataset subscriptions</strong></mark></td><td>Never miss an update to a dataset. Simply click on the subscribe  button found on the top of each dataset, select your cadence to be notified. of changes to datasets. </td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Refreshed real-time API pages</strong></mark></td><td>Our revamped <a href="https://data.gov.sg/datasets?formats=API&#x26;sort=relevancy&#x26;page=1&#x26;resultId=d_1b676cd174a9af4704fdb3f9aa58ff5e">real-time API     </a>documentation, makes it easier to query and integrate against these datasets.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Searching through our data viewer</strong></mark></td><td>Users can now query for any substring in a column in a case insensitive manner. For example, searching for “sir” will return results for both “Pasir Panjang” as well as “Pasir Ris”.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Split screen navigation view within the search page</strong></mark><br></td><td>Introducing split screen split screen search navigation → allowing users to scroll through multiple datasets at a glance. Simply click on the &#x3C;&#x3C; icon on the left pane to minimise search results.</td><td></td><td></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Introduction of code snippets for all datasets</strong></mark></td><td>Simply copy and paste the sample query in your browser or your API platform to query a dataset on the site.</td><td></td><td></td><td></td><td></td></tr><tr><td><p><mark style="color:blue;"><strong>Introduction of case-insensitive string patterns to query our APIs</strong></mark></p><p></p></td><td><p>Users can now type in a search term without the need to consider the capitalisation of letters.</p><p><br></p></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## For Admins

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Faster dataset uploads</strong></mark></td><td></td><td>Dataset ingestion on the admin experience is now faster than ever before. Dataset ingestion in the admin experience is now faster than ever, with an average improvement of 36% in upload speeds.</td></tr><tr><td><mark style="color:blue;"><strong>Dataset Engagement and Trendline Metrics</strong></mark></td><td></td><td>Get detailed insights into how your published datasets are being used with the new Engagement tab, now available on your admin page.</td></tr><tr><td><mark style="color:blue;"><strong>Dataset metrics</strong></mark><br></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Auto-detected date ranges for newly uploaded datasets</strong></mark></td><td></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Admins can now delete datasets from the admin panel.</strong></mark> </td><td><a href="/pages/8NCT2G9qn3LI4BroA3CG">/pages/8NCT2G9qn3LI4BroA3CG</a></td><td></td></tr></tbody></table>

We value your input and are committed to continuously improving [data.gov.sg](http://data.gov.sg). Whether you have suggestions, feedback, or questions, we want to hear from you.

Reach out to us at <feedback@data.gov.sg>

Join our telegram channel to stay updated on latest updates and announcements from [data.gov.sg](http://data.gov.sg): <https://t.me/datagovsg>


# Extended Deadline: Upgrade to API Keys by Dec 31, 2025

We've heard you need more time for the switchover, so we're extending the deadline for transitioning to API keys.

Rate limit enforcement on [data.gov.sg](http://data.gov.sg/) will now kick in on December 31, 2025. This gives you additional time to integrate API keys into your applications without service disruption.

### Why upgrade to API keys now?

When you integrate API keys, you'll unlock:

✓ Priority Support: Get faster response times when you need help

✓ Higher Rate Limits: Scale your applications without restrictions

✓ Maintenance Notifications: Stay informed about planned updates and changes

### Why This Matters

From 31 December 2025 onwards, we will be implementing [rate limits](https://guide.data.gov.sg/developer-guide/api-overview/api-rate-limits) across our platform. By signing up now and obtaining your API keys, you'll ensure uninterrupted access to integrations with datasets on the platforms.

How to Get Started For New Users

1\. Visit [data.gov.sg](http://data.gov.sg/)

2\. Click on the login modal \[at the top right hand corner of the page]

<img src="https://ci3.googleusercontent.com/meips/ADKq_NZLxa312s_Z1bv4qa2TRAFITffNEPwwwsRURtMwp8jst42zi-vlY-B7bWJa5uHyoEsiUA=s0-d-e1-ft#https://go.gov.sg/publiclogin" alt="" width="100%">

3\. Click on the Sign Up button

<img src="https://ci3.googleusercontent.com/meips/ADKq_NbtJ8TgL9_F75DE4_CGocV7MBoHSTKVApDOx-NWoMmTbqezO08wBeBQkJEEEV_mtjXLGw=s0-d-e1-ft#https://go.gov.sg/signuplogin" alt="" width="100%">

4\. Fill up the user form, and use your organisations' email address where possible

<img src="https://ci3.googleusercontent.com/meips/ADKq_NYJ2BRhu0BJd8eYOhSIqWe5pGkBtNl3IpZjWpACOXqr_AjK6QL2Ani_tg59LUyhoCpf=s0-d-e1-ft#https://go.gov.sg/formfillup" alt="" width="100%">

5\. Input your email address to receive an OTP

6\. Click on Create API Key

<img src="https://ci3.googleusercontent.com/meips/ADKq_NajIhdRUN1cEPBAo5MMAHJmzJRUlMMjIWUWZTr6VUDsWfluYykzblN9NuwBq9mTqF0Kk17gww=s0-d-e1-ft#https://go.gov.sg/apikeycreation" alt="" width="100%">

7\. Request your developer or production API keys based on your requirements. Ensure that you are as *detailed as possible* when detailing how you will use your API key to ensure more targetted support.

<img src="https://ci3.googleusercontent.com/meips/ADKq_NYfBe1rE03LnHyYo1Bw0eVT8FbdIAywq0NPUl2AYalI5YQVvGoZfwtOLBjwqahVgISv=s0-d-e1-ft#https://go.gov.sg/prodapikey" alt="" width="100%">

If you have any questions about the new sign-in process or API key creation, please don't hesitate to reach out to us at <support@data.gov.sg>


# Release notes: October 2025

New Sign-In Feature Available on Data.gov.sg

We're excited to announce that you can now sign in to [data.gov.sg](http://data.gov.sg/) using our new login modal to access developer and production API keys.

What's New

Starting today, registered users can obtain dedicated API keys that provide several enhanced benefits:

* Higher rate limits for your API requests
* Priority support when you need assistance
* Maintenance notifications to keep you informed of any planned updates or changes

Why This Matters

From 1 November 2025 onwards, we will be implementing [rate limits](https://guide.data.gov.sg/developer-guide/api-overview/api-rate-limits) across our platform. By signing up now and obtaining your API keys, you'll ensure uninterrupted access to integrations with datasets on the platforms.

How to Get Started For New Users

1\. Visit [data.gov.sg](http://data.gov.sg/)

2\. Click on the login modal \[at the top right hand corner of the page]

<img src="https://ci3.googleusercontent.com/meips/ADKq_NZLxa312s_Z1bv4qa2TRAFITffNEPwwwsRURtMwp8jst42zi-vlY-B7bWJa5uHyoEsiUA=s0-d-e1-ft#https://go.gov.sg/publiclogin" alt="" width="100%">

3\. Click on the Sign Up button

<img src="https://ci3.googleusercontent.com/meips/ADKq_NbtJ8TgL9_F75DE4_CGocV7MBoHSTKVApDOx-NWoMmTbqezO08wBeBQkJEEEV_mtjXLGw=s0-d-e1-ft#https://go.gov.sg/signuplogin" alt="" width="100%">

4\. Fill up the user form, and use your organisations' email address where possible

<img src="https://ci3.googleusercontent.com/meips/ADKq_NYJ2BRhu0BJd8eYOhSIqWe5pGkBtNl3IpZjWpACOXqr_AjK6QL2Ani_tg59LUyhoCpf=s0-d-e1-ft#https://go.gov.sg/formfillup" alt="" width="100%">

5\. Input your email address to receive an OTP

6\. Click on Create API Key

<img src="https://ci3.googleusercontent.com/meips/ADKq_NajIhdRUN1cEPBAo5MMAHJmzJRUlMMjIWUWZTr6VUDsWfluYykzblN9NuwBq9mTqF0Kk17gww=s0-d-e1-ft#https://go.gov.sg/apikeycreation" alt="" width="100%">

7\. Request your developer or production API keys based on your requirements. Ensure that you are as *detailed as possible* when detailing how you will use your API key to ensure more targetted support.

<img src="https://ci3.googleusercontent.com/meips/ADKq_NYfBe1rE03LnHyYo1Bw0eVT8FbdIAywq0NPUl2AYalI5YQVvGoZfwtOLBjwqahVgISv=s0-d-e1-ft#https://go.gov.sg/prodapikey" alt="" width="100%">

If you have any questions about the new sign-in process or API key creation, please don't hesitate to reach out to us at <support@data.gov.sg>


# Release notes: October 2025 \[For Admins]

We are writing to inform you of an important update to the admin login experience for [data.gov.sg](http://data.gov.sg/).

What's Changed: The admin login screen interface has been updated to allow for public user login alongside admin login. While the login URL remains the same, you will notice changes to the appearance of the login panel.

<img src="https://ci3.googleusercontent.com/meips/ADKq_NZaIk99s20rjFlie0_fL8SqfWjA-Pv0PusSPPC_JDui4dy2ScrQX_BhBs6sAdIwfQ=s0-d-e1-ft#https://go.gov.sg/loginnew" alt="" width="100%">

Your Login URL Remains: <https://admin.beta.data.gov.sg/admin/signin>

For your convenience, we recommend [bookmarking this URL](https://admin.beta.data.gov.sg/admin/signin) for quicker access to the admin portal.

What to Expect: When you next visit the admin portal, you will see the updated login interface. All login functionality remains the same, simply use your existing credentials as per usual.

If you experience any issues with the updated login interface or have questions about these changes, please don't hesitate to reach out to us at <support@data.gov.sg>


# Release notes: September 2025

### View dataset upload history

You can now see exactly when datasets have been updated with our new Dataset History feature. This allows you to see how often the datasets are updated.

What this means for you:

* Full transparency: See the update history for any tabular or geospatial dataset
* Better planning: Know when fresh data will be made available

Click the "See History" on any dataset page to see the dataset update timestamps (highlighted in the red box)

<img src="https://ci3.googleusercontent.com/meips/ADKq_NaGglEfzS933GKcS1rwM3JrZT5BFAmLdRRQOGlaBZq0RHeCKMm0eT4E-qCXZiPgjRNIP9nM2WdiWVU=s0-d-e1-ft#https://go.gov.sg/historicaldataset2" alt="" width="100%">

### New WBGT stations available

Singapore's Wet Bulb Globe Temperature (WBGT) monitoring network just got significantly bigger, giving you heat stress data from more locations across the country direct from the National Environment Agency’s Meteorological Service Singapore (MSS)

**🆕 Six new monitoring stations now live:**

* S187 - Bukit Timah (West)
* S139 - Tuas Terminal Gateway
* S140 - Choa Chu Kang Stadium
* S141 - Yio Chu Kang Stadium
* S142 - Sentosa Palawan Green
* S143 - Punggol North

**Why this matters:**

* Better coverage: More granular heat stress monitoring across Singapore
* Workplace safety: Enhanced data for outdoor work planning
* Health insights: Improved understanding of heat exposure patterns

This dataset is currently being leveraged by the likes of the Singapore-ETH Centre for research, powering the MyENV app and heat stress alerts for construction sites and companies throughout Singapore.

Access the data: [View WBGT Observations](https://data.gov.sg/datasets/d_87884af1f85d702d4f74c6af13b4853d/view)

### IRAS' updated comprehensive tax & revenue data

The Inland Revenue Authority of Singapore (IRAS) has refreshed 21 new datasets covering everything from individual income patterns to corporate tax collections, giving you updated access to Singapore's fiscal landscape.

Key datasets now available:

* Revenue streams: Total government revenue and IRAS collections by tax type
* Individual taxation: Income distributions, tax reliefs, and chargeable income groups
* Corporate insights: Company income patterns, tax by economic sector, and residency classifications
* Property data: Annual property values and tax assessments by property type
* Compliance metrics: Audit outcomes, service levels, and return filing statistics

Perfect for:

* Economic research: Understanding Singapore's tax structure and revenue patterns
* Policy analysis: Tracking fiscal trends and compliance rates
* Business planning: Benchmarking against sector tax data
* Academic studies: Comprehensive tax system analysis

Start exploring: [Browse all IRAS datasets](https://data.gov.sg/datasets?page=1\&agencies=IRAS\&sort=updatedAt\&resultId=d_21e22578cabce897e8b27801e5596140)

### Shape the geospatial datasets on [data.gov.sg](http://data.gov.sg/)

We're upgrading our geospatial data pipeline with an integration to SLA’s geospace platform and want to hear from you! Whether you're using location data for urban planning, logistics, research, or operations, your input will help us prioritise the most valuable geospatial datasets.

Tell us:

* Which geospatial datasets are most critical for your work
* What location data gaps you're currently facing
* How you're using (or plan to use) geospatial data in your operations

Reach out to us at our [support form](https://form.gov.sg/6449e5c3664c1b001249acf1)


# Release notes: July 2025

We’re excited to share updates to how data freshness is presented, bug fixes, and the latest datasets made available by the Health Sciences Authority (HSA), Civil Aviation Authority (CAAS), Ministry of Manpower and National Environmental Agency.

### ⚡️ Feature highlights

**⏱ Data freshness**

You’ll now see the exact timestamp of when each dataset was last updated.

<img src="https://ci3.googleusercontent.com/meips/ADKq_NaC-9N1raKkXPHgmUErYgpyEgjb-N-Fz0G60QqLuvnzuu9LvgnhY5wvMorOpJ9zlWoMQfPZsA=s0-d-e1-ft#https://go.gov.sg/lastupdateddgs" alt="" width="100%">

**🔄 Real-time API uptime history**

You can now view the 30-day API uptime history for all real-time datasets. This will include information about API downtime, maintenance or data delays.

<img src="https://ci3.googleusercontent.com/meips/ADKq_Nb3HoPt2nNozvM1wVs1FORuc1jqq0y9tlw-7Kfkzl0VhtanvjFIOg-TGnUOGISjjvA=s0-d-e1-ft#https://go.gov.sg/uptimedgs" alt="" width="100%">

<img src="https://ci3.googleusercontent.com/meips/ADKq_NY6Hi80pwuaYAmAIOrsshvg8X7yd6DBhgjA5ew040ahYVztS3GWGrF_nI1V6hpvJ-8=s0-d-e1-ft#https://go.gov.sg/statusdgs" alt="" width="100%">

**🛠 Product polish**

We’ve also made some bug fixes

* Fixed the categorical variable calculations in the data viewer, which had resulted in incorrect summary statistics being presented when filters were applied
* Fixed the API Swagger rendering issues, which had resulted in some API pages being cut-off on specific devices

**🗳 \[ICYMI] Elections coverage**

We supported real-time data updates during the Elections across 20 media agencies, reaching 4.1 million page views. Take a look here: <https://elections.data.gov.sg/en>

### 📊 New datasets you can now explore

**🌤️ Historical environmental data**

Explore historical weather data (2016 to 2024) from the National Environmental Agency (NEA), including location details and forecast descriptions. Find the [datasets here](https://data.gov.sg/datasets?query=historical\&page=1\&agencies=NEA\&resultId=2281), which are currently used by the Land Transport Authority (LTA) and DSTA for internal environmental modelling as well as private companies to optimise delivery timelines based on weather conditions.

**📅 Planning data**

Start planning ahead with the [Public Holidays 2026](https://data.gov.sg/datasets/d_149b61ad0a22f61c09dc80f2df5bbec8/view) dataset from the Ministry of Manpower (MOM). This dataset is already in use by agencies like the Housing Development Board (HDB) to adjust carpark pricing on weekends and public holidays, and by Singtel for internal HR scheduling processes.

**🏥 Regulatory & public health data**

Browse a range of new datasets from the [Health Sciences Authority (HSA)](https://data.gov.sg/datasets?query=hsa\&page=1\&agencies=HSA\&sort=updatedAt\&resultId=d_8cfe111e0a5a5cf5b598e78851e58ad4), covering approved medical products, licensed healthcare providers, pharmacies, and tobacco-related businesses. These datasets are used by companies such as ALPS Healthcare and ST Logistics to streamline procurement and compliance.

**✈️ Aviation & travel data**

Explore [aviation datasets from the Civil Aviation Authority of Singapore (CAAS)](https://data.gov.sg/datasets?query=\&page=1\&agencies=CAAS\&sort=updatedAt\&resultId=d_744e62bfb1c524508bce0a64a2488243), offering insights into passenger traffic and air movements over the years. Use these datasets to analyse travel trends and better understand the latest aviation activity in Singapore.

**💼 Employment & Labour Resilience**

Dive into Ministry of Manpower (MOM) datasets which include employment data occupation, gender, education, and age. [Find the datasets here](https://data.gov.sg/datasets?page=1\&agencies=MOM\&sort=updatedAt\&resultId=d_f5d9209c996b9d9fc6c2a781aa23fcbf), currently being used by researchers and policy analysts to monitor employment resilience and market analysis.

**📚 Skills & Training**

Plan your upskilling journey with datasets from SkillsFuture Singapore (SSG), featuring course availability and schedules from the MySkillsFuture portal. [The datasets](https://data.gov.sg/datasets?page=1\&agencies=SSG\&sort=updatedAt\&resultId=d_b5802b76f409764c16dde4bf2feb19cd) are being used by folks looking to dive into a new industry, education providers and career coaches to match skills development with labour market needs.

**🏛 Workforce Composition in Government**

Explore workforce data from the Public Service Division (PSD) to better understand hiring trends, staff demographics including gender representation and length of service of employees in the public sector. [These newly updated datasets](https://data.gov.sg/datasets?page=1\&agencies=PSD\&sort=updatedAt\&resultId=d_f2fe439c65973019edcb4f79b9644eed) support workforce planning across agencies to provide an account of government hiring trends year on year.


# Release notes: February 2025

We are excited to bring you a quick update on the onboarding of two highly-requested datasets: lightning weather data, and Wet-Bulb Global Temperature.

Scroll down to learn more about how these datasets can enhance your workflows and the service level objectives that the team at [data.gov.sg](http://data.gov.sg) is committed to providing for these crucial datasets. As always, the operational status of all datasets, including real-time datasets, can be viewed at [status.data.gov.sg](https://status.data.gov.sg/) for full transparency.

To stay updated on changes and connect with the team faster, join the [data.gov.sg Telegram group](https://t.me/datagovsg) and receive notifications on bug fixes, features and collaboration opportunities.

### 🆕 New dataset alerts!

#### ⚡Lightning data

Access real-time lightning observation data with updates every 2.5 to 3 minutes. Stay informed about cloud-to-ground and cloud-to-cloud strikes across Singapore. Enhance safety and decision-making with insights from MSS' Lightning Detection System.

Try it out yourself! Open <https://data.gov.sg/datasets/d_3cc803af9adced5bc604eba7602b46b8/view>

<figure><img src="/files/F5QFEWbf28dXE8hw0dTL" alt=""><figcaption></figcaption></figure>

Open the **Test Request** box and insert **lightning** in the API field and click **send**!

<figure><img src="/files/A6KtjPy7FNkDG9uBf7Nc" alt=""><figcaption></figcaption></figure>

#### 💡Wet Bulb Global Temperature

Monitor heat stress in real time with WBGT data, updated every 15 minutes. This composite measure factors in temperature, humidity, wind, and solar radiation. Stay informed with low, moderate, or high heat stress levels for better safety planning.

Simply load up <https://data.gov.sg/datasets/d_5406ce77e1d364f43317cb3e9f3d6725/view> or search “wbgt” on the site.

<figure><img src="/files/OmvBLRxzMZrtpdxHpGAL" alt=""><figcaption></figcaption></figure>

Open the **Test Request** box and insert **lightning** in the API field and click **send**!

<figure><img src="/files/Zawc3xvX0kVaALswNI37" alt=""><figcaption></figcaption></figure>

We're keen to learn how datasets like these enhance your workflows or business. Drop us an email at <admin@data.gov.sg> and let us know how we can better support your data needs!


# Release notes: October 2024

🆕 What’s new for admins?

**1️⃣ Faster dataset uploads**

We heard you! Dataset ingestion on the admin experience is now faster than ever before. Dataset ingestion in the admin experience is now faster than ever, with an average improvement of 36% in upload speeds. Simply drag and drop files of your choosing, and receive an email alert once the upload has completed, before hitting submit. Try it out [here](https://beta.data.gov.sg/admin/signin)!

[Click here to learn how to upload datasets](https://guide.data.gov.sg/user-guide/for-data-owners/how-to-publish-data)

**2️⃣ Dataset Engagement and Trendline Metrics**

Get detailed insights into how your published datasets are being used with the new Engagement tab, now available on your admin page. Here, you can track key metrics like views, downloads, and API integrations. With trendline metrics, gain insights and embed charts on how your datasets have been used over time.

<figure><img src="/files/tZArmAUJ1hFXMCIHBKEe" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/AOv5RzF4sD9iuQcT2zv0" alt=""><figcaption></figcaption></figure>

[Click here to access the Engagement tab of the admin portal](https://beta.data.gov.sg/admin/engagement) \[Requires initial sign-in]

### 🆕 What’s new for users?

1️⃣**Embeddable Data Viewer**

Users can now plant tables available on the data explorer right into your own sites! No more fussing about manually copy and pasting tables, with the embedebble data viewer, simply click on the shell script icon \[denoted by the < > within a box] and copy and paste the html code into your webpage to embed this data viewer.

<figure><img src="/files/S5uAiBVuESbxqJRPQAT4" alt=""><figcaption></figcaption></figure>

[Click here to learn how to embed the data viewer onto your site](https://guide.data.gov.sg/user-guide/for-data-consumers/how-to-embed-the-dataset-explorer-on-your-site)

**2️⃣  Product status page**

To improve visibility of the site and the status of [data.gov.sg](http://data.gov.sg) APIs, we are introducing the product status page, [nested under Help](https://status.data.gov.sg/) on the main search screen. This will provide users with real-time updates on the health of services and any periods of maintenance, if any. [data.gov.sg](http://data.gov.sg) datasets are currently used by production-grade systems who have benefitted from the 99.9% uptime of our services. If you are interested in collaborating, do reach out to the team!

<figure><img src="/files/mxbbP0LZRlJsKyLtbcxG" alt=""><figcaption></figcaption></figure>

**3️⃣ Citations**

Leveraging on Singapore’s largest repository of open datasets for your research? We have made it even simpler to cite your sources. Simply scroll down the dataset page to find the Citation function, and toggle through APA and IEEE formats.

<figure><img src="/files/Hd8b3QF1sGPOkalrBIbR" alt=""><figcaption></figcaption></figure>

**4️⃣ Sorting by numeric columns in the data viewer** At the click of a button, the data viewer will now arrange dataset values in ascending or descending numerical order, for selected datasets. Try it out yourself! For example, click on the arrow up or down beside the ‘Quota’ column of [this dataset](https://data.gov.sg/datasets?query=coe\&page=1\&resultId=d_69b3380ad7e51aff3a7dcc84eba52b8a\&dataExplorerSort=%7B%22quota%22:%22ASC%22%7D).


# Release notes: September 2024

## 🆕 What’s new?

**1️⃣ Dataset subscriptions**

Never miss an update to your most-used datasets. Simply click subscribe to any dataset of your choosing and receive email notifications whenever it is updated!

<figure><img src="/files/qXNxn3uqMYxAilXxTuz9" alt=""><figcaption></figcaption></figure>

**2️⃣ Refreshed real-time API pages**

We have now made accessing real-time APIs even easier with the ability for users to send test requests for data related to weather to UV indexes at the push of a button within the site. Simply click on any [real-time dataset](https://data.gov.sg/datasets?formats=API\&sort=relevancy\&page=1\&resultId=d_1b676cd174a9af4704fdb3f9aa58ff5e#tag/default/GET/uv) and either click on the code snippet. Alternatively, click on the URL in purple to open the API query right from your browser.

<figure><img src="/files/HJ3Zi5UgfF9jEFSoq7wv" alt=""><figcaption></figcaption></figure>

**3️⃣API response schema preview**

We have made it even easier to query APIs on datasets. Simply click on the “**on your browser”** hyperlink, and the site will bring you straight to the query response automatically in a new tab.

<div data-full-width="true"><figure><img src="/files/jTuNzGVZyqhRc3zrdOKD" alt=""><figcaption></figcaption></figure></div>

**4️⃣ Geospatial Visualisations**

You can now enjoy and explore GEOJSON datasets using previews and visualisations along with metadata on points of interest. Selected datasets will have come equipped with a map viewer. Alternatively, simply refer to the code snippet at the bottom of the page to download the entire object file onto your device.

<figure><img src="/files/46Eu2h3Fpo0h0nIrjWKB" alt=""><figcaption></figcaption></figure>

## 🤩[data.gov.sg](http://data.gov.sg) creations

We're excited to showcase the latest creations from our users, highlighting the innovative work that leverages on open datasets available on [data.gov.sg](http://data.gov.sg)

1. [A Python program to compare fastest routes on the Singapore MRT/LRT network from 1987 to 2040.](https://www.linkedin.com/posts/activity-7229770354791964672-sTIe/)
2. [Data-backed insights into Singapore's housing resale market](https://www.linkedin.com/posts/cliff-chew-kt_hi-all-thanks-to-those-who-came-to-my-analytics-activity-7218411465941078017-ZRhx/?utm_source=share\&utm_medium=member_desktop)


# Release Notes: April 2026

## <sup>**What's New?**</sup>

500+ Geospatial datasets now available!

We've just crossed a major milestone - over 500 Singapore geospatial datasets are now available with daily updates from SLA's GeoSpace!&#x20;

From HDB buildings and MRT stations to parks, schools, hawker centres, and cycling paths, you'd now be able to access and download these datasets in GeoJSON format. Moreover, you can automate your data pulling of geospatial datasets using the dataset download API available.

**Browse all geospatial datasets:**

<https://data.gov.sg/datasets?formats=GEOJSON\\&sort=updatedAt><br>

**Help us make this even better:**

1\. What datasets are you using?&#x20;

2\. What would you like to see added?

3\. What are you building with this data?

Drop your use cases and requests - let's build Singapore's geospatial future together!&#x20;


# Content quality guidelines

As an open data collective, we’re focused on providing quality data that users can not only explore, analyse or use for development, but derive value and meaning from. If you are uploading data, we’ve created a guide to help you get it ready for publishing.

## Title of Dataset

Your title is what first attracts users to your data. To help users find the data they need, it is important that your title is not only accurate but easy to understand.

We recommend titles:

* **Stick only to what is essential. As each title is accompanied by a description, your title should only convey what a user needs to know at a glance.**
  * For collections, titles can give a broad picture of the datasets contained. You might consider adding slightly more details to the dataset files themselves.
  * You might title a collection, “Annual pet registration”, with the datasets, “Pet registration by type”, “Pet registration by location”, and “Pet registration by month”.
  * For individual datasets, while titles should be broad thematically, they should still be specific to the data being shared.
  * You might title an individual dataset, “Monthly pet registration by location”.
* **Avoid having information that already appears as separate data points**
  * Coverage years: Your chosen coverage period will be shown below your title. Unless differentiating between datasets in a collection, try to avoid adding these in your titles.
  * Agency name: While your agency will be shown as the data provider, you might consider adding this in only if you believe it is beneficial for users to know. This could be to avoid confusion if you are publishing data similar to another agency, for example.

    While it is possible to use the abbreviated form of your agency name, this should ideally be consistent across the datasets and collections you upload.
* **Be consistent. For example, if you add coverage years to dataset titles within a collection, do try to add years for all the datasets.**

## Description of your dataset

Your dataset description gives users a comprehensive look into what your data offers. Here are our suggested prompts:

* **What’s the dataset about?** Give a short description of what your dataset contains using relevant keywords. As we use your description to provide search results to users, your dataset may be shown if a user searches for a keyword included in your description.

  You should also share anything you think is applicable, from variables and figures, to timeframes of the data.
* **Is there any context I need to provide?** Briefly beak down any relevant technical or industry-specific terms a user may not be familiar with. If needed, do provide reference links.
* **How was this data collected?**

  Describe your data collection methodology, if possible. This helps users verify the quality of your data sources.
* **What story does this data tell?** Lastly, do share what makes this data meaningful, from depicting trends to creating transparency! This will help users understand how better to leverage the data.

## Column descriptions

Your column descriptions help users understand what exactly your data is about. You can think of these as definitions of your column headers. For users to make the most of your data, descriptions should clearly convey what each column represents. Here are our suggested prompts:

* **What does the column header mean within the context of the data?**

  Describe any context that a user should know about the column data. Think about what the column values mean in relation to what the data looks at specifically or how your agency defines certain terms.

  For example, if the column represents “Languages spoken”, you might specify which languages your data looks at specifically. If you define “Languages spoken” as those that are spoken fluently only, you could also provide that information.

  It may also be important to share how you collected the data, especially if the column sources from another piece of data.
* **Does your column header need additional definitions?**

  Straightforward column headers may not need context specific to your organisation or data collection methods. However, it could still be helpful to generally define your header.

  For example, a column on Unique Identity Numbers (UEN) may be distinct enough for you to simply provide a definition for a UEN.
* **Do your column values need additional definitions?**

  You might also consider providing extra information on your column values, especially if you are using abbreviations and contractions, or different formats.

  For example, if you have a column header “MRT stations”, you might use “AL”, “BE”, and “CA”, to represent “Aljunied”, “Bedok”, and “City Hall” respectively. It would be helpful to define each abbreviation in the description, especially if they are uncommon.
* **Do the values in your column have any known caveats?**

  If there are known issues or caveats with the column, it would be helpful to share them. These could be anything of note, from external changes to discontinued variables, and more.

  For example, for a column header “Towns”, a caveat could be that Ang Mo Kio was split into Bishan, Toa Payoh, and Marymount.

## Data principles

While clear titles and descriptions are important, your data lies at the core of what users are looking for. To provide users with data that is easy and reliable to use, we have a few guiding principles.

* **Ensure machine readability**

  Data should be in a format a computer can understand. This means relevant fields can be extracted and parsed without human input. As an open data collective, any data you upload must also be in non-proprietary file formats.
* **Check for errors and inconsistencies**

  Your data should be free from any errors and inconsistencies! This will go a long way in establishing trust, protecting the integrity of your data, and allowing mashup or use of multiple datasets, even across agencies.

  We strongly encourage correcting any issues that negatively affect data quality, such as:

  * Null values on columns. If all values in a column are null, consider removing the column.
  * Duplicate rows
  * Outliers. While having many outliers is not necessarily a cause for concern, there should not be impossible values appearing. This might look like negative values appearing in columns that should only have positive ones, for example.
  * Inconsistent capitalisation in datasets. For example, if a value in a column is entered in all uppercase, all other values in that same column should also be entered in all uppercase.

    Consistency in capitalisation is important, as the same value appearing more than once in different casing may be considered different values altogether. For simplicity, we suggest sticking to one capitalisation format.
  * Inconsistent spacing in column values. This could be entering “hello” without a space at the end, and “hello “ with a space at the end, for example.

  Additionally, your data should be kept *tidy*, a concept introduced in Hadley Wickham’s “Tidy Data”, in [*The Journal of Statistical Software*](https://vita.had.co.nz/papers/tidy-data.html)*.* Ultimately, clearer organisation makes it easier for users to understand and use your data.

  Drawing from these principles, you should ensure:

  * Each column uses the same unit of measurement
  * Each row makes one observation. This is all the variable information collected on a single subject or participant. For example, if your dataset looks at people, one row might contain a single person’s height, weight, and age. While the actual measurements of different people may vary from row to row, what you are measuring in each row shouldn’t.
  * Each table only has one type of observation unit. If your data looks at the average height of a population, you could have one observation unit as the overall population, and another as the population of different genders. This means you might have one table for overall average height, and one for average height of different genders.
* **Granularity and precision**

  As far as possible, data should be raw and granular instead of aggregated and processed, such as the use of percentages.

  Totals and sub-totals should be in separate tables if needed. For example, there are cases where aggregate numbers, such as totals and indices, cannot be derived from granular data points.

## Changelog

Updates to your data matter to users! While regular changes to data—such as additions, removals, and updates—are automatically logged, we’ve introduced a changelog for you to share changes to your dataset schemas and collection methodologies.

When logging changes, do be as specific as possible. A clear picture of your updates can help users can make proper use of your data!

## Get in touch

Our guidelines are always up for review to give our users the best experience possible. Have more feedback or questions? [Contact us](https://form.gov.sg/6449e5c3664c1b001249acf1) and we will reach out to you as soon as we can.


# Data types

You are encouraged to upload data in accordance with SG-DRM data standards.

#### **Column headers**

* Only alphanumeric or these 3 special characters: .-\_
  * Ampersand (&) should be replaced by “and” if needed
* Each must be unique
  * You should not have two headers called "duration"
* All headers are in lower case
  * e.g. "rating"
* If a header contains more than one word, use underscores to combine them
  * e.g. vehicle\_type
* Units of measurement should be omitted
* Keep it to less than 25 characters
  * Full names can be stored in the schema section of the metadata file

#### **For date variables:**

| Interval    | Column name | Format      | Range of values    | Example    |
| ----------- | ----------- | ----------- | ------------------ | ---------- |
| Annual      | `year`      | YYYY        | YYYY: 1900 onwards | 2015       |
| Monthly     | `month`     | YYYY-MM     | MM: 01 to 12       | 2015-01    |
| Daily       | `date`      | YYYY-MM-DD  | DD: 01 to 31       | 2015-01-01 |
| Weekly      | `week`      | YYYY-\[W]WW | \[W]WW: W01 to W52 | 2015-W01   |
| Quarterly   | `quarter`   | YYYY-\[Q]Q  | \[Q]Q: Q1 to Q4    | 2015-Q1    |
| Half-yearly | `half_year` | YYYY-\[H]H  | \[H]H: H1 or H2    | 2015-H1    |

#### **For date-time variables:**

| Type        | Column name | Format                                                              | Example             |
| ----------- | ----------- | ------------------------------------------------------------------- | ------------------- |
| Date + time | `date_time` | <p>YYYY-MM-DD\[T]hh:mm<br><br>hh:mm+hh:mm or hh:mm:ss+hh:mm<br></p> | 2015-01-01T12:00    |
|             |             | *or* YYYY-MM-DD\[T]hh:mm:ss                                         | 2015-01-01T12:00:00 |
| Time only   | `time`      | hh:mm                                                               | 12:00               |
|             |             | *or* hh:mm:ss                                                       | 12:00:00            |

## Get in touch

Our guidelines are always up for review to give our users the best experience possible. Have more feedback or questions? [Contact us](https://form.gov.sg/6449e5c3664c1b001249acf1) and we will reach out to you as soon as we can.


# Data principles

While clear titles and descriptions are important, your data lies at the core of what users are looking for. To provide users with data that is easy and reliable to use, we have a few guiding principles.

1. **Ensure machine readability**

Data should be in a format a computer can understand. This means relevant fields can be extracted and parsed without human input. As an open data collective, any data you upload must also be in non-proprietary file formats.

2. **Check for errors and inconsistencies**

Your data should be free from any errors and inconsistencies! This will go a long way in establishing trust, protecting the integrity of your data, and allowing mashup or use of multiple datasets, even across agencies.

We strongly encourage correcting any issues that negatively affect data quality, such as:

* Null values on columns. If all values in a column are null, consider removing the column.
* Duplicate rows
* Outliers. While having many outliers is not necessarily a cause for concern, there should not be impossible values appearing. This might look like negative values appearing in columns that should only have positive ones, for example.
* Inconsistent capitalisation in datasets. For example, if a value in a column is entered in all uppercase, all other values in that same column should also be entered in all uppercase.

  Consistency in capitalisation is important, as the same value appearing more than once in different casing may be considered different values altogether. For simplicity, we suggest sticking to one capitalisation format.
* Inconsistent spacing in column values. This could be entering “hello” without a space at the end, and “hello “ with a space at the end, for example.

Additionally, your data should be kept *tidy*, a concept introduced in Hadley Wickham’s “Tidy Data”, in [*The Journal of Statistical Software*](https://vita.had.co.nz/papers/tidy-data.html)*.* Ultimately, clearer organisation makes it easier for users to understand and use your data.

Drawing from these principles, you should ensure:

* Each column uses the same unit of measurement
* Each row makes one observation. This is all the variable information collected on a single subject or participant. For example, if your dataset looks at people, one row might contain a single person’s height, weight, and age. While the actual measurements of different people may vary from row to row, what you are measuring in each row shouldn’t.
* Each table only has one type of observation unit. If your data looks at the average height of a population, you could have one observation unit as the overall population, and another as the population of different genders. This means you might have one table for overall average height, and one for average height of different genders.

3. **Granularity and precision**

As far as possible, data should be raw and granular instead of aggregated and processed, such as the use of percentages.

Totals and sub-totals should be in separate tables if needed. For example, there are cases where aggregate numbers, such as totals and indices, cannot be derived from granular data points.

## Get in touch

Our guidelines are always up for review to give our users the best experience possible. Have more feedback or questions? [Contact us](https://form.gov.sg/6449e5c3664c1b001249acf1) and we will reach out to you as soon as we can.


# For data consumers

Click on the nestled pages if you are an officer looking to access data.gov Classified.

Guides for anyone looking to find, explore, download, or integrate government data — whether you're a researcher, business, non-profits journalist, or member of the public. All datasets on data.gov.sg are publicly accessible. You don't need to register or log in to search, preview, or download data. An API key is only required for high-volume production use. All datasets on [data.gov.sg](http://data.gov.sg/) are publicly accessible and free to use. Creating a free account lets you track your usage history and helps us understand how data is being used across Singapore — so we can keep improving what we publish.


# How to search for data

There are different ways of searching for datasets on data.gov.sg. Click on the purple circle to follow through the mini demos to find out a few ways to explore open data on the site.

## Basics of data.gov.sg&#x20;

Click the purple circle to follow along the demo to find out how to search and download filtered datasets on data.gov.sg

{% embed url="<https://app.arcade.software/share/0wop1OUiUHQKVPAtYooC>" fullWidth="true" %}

## How to supercharge your search results

Click the purple circle to follow along the demo to find out how to search works, and how filters can aid in your data discovery.&#x20;

{% embed url="<https://app.arcade.software/share/nWAuLsFcjaKRZwSHM1Ye>" fullWidth="true" %}


# How to raise a data request

If the data you are interested in is not currently available on the site, simply submit a data request form. The form will help us keep track of how you use data, and what data you are interested, so be as detailed as possible! \
\
Click on the purple circle to follow the demo below.&#x20;

{% @arcade/embed flowId="T7jT46E8nJ556LeDglaT" url="<https://app.arcade.software/share/T7jT46E8nJ556LeDglaT>" %}


# How to embed the dataset explorer on your site

1. Navigate to the dataset of your choice.&#x20;

<figure><img src="/files/ezm2H7g71pXBMvir6UFp" alt=""><figcaption></figcaption></figure>

2. Click on this icon.&#x20;

<figure><img src="/files/fZDWqj0RSeDFOXkwtGl9" alt=""><figcaption></figcaption></figure>

2. Click `EMBED DATA EXPLORER`

<figure><img src="/files/5kdmGZ46YH6BkDeASKNq" alt=""><figcaption></figcaption></figure>

3. Copy and paste the html code into your webpage and you are done!

<br>


# How to search for real-time APIs

Click the purple circular button to follow through the demo below.

{% @arcade/embed %}


# For data owners


# Getting started: Onboarding

This guide answers common questions from agencies who wish to onboard to data.gov.sg (DGS)

## Onboarding & Approvals

**Q:**  If we want to onboard as a publisher, what is the process like?<sup>1</sup>

A: To onboard to data.gov.sg, we require the following confirmations from your organisation:

* **CDO Approval -** confirmation from your Chief Data Officer (CDO) or equivalent appointed authority.
* **Dataset list** - a short list of datasets you plan to publish.

<details>

<summary>Example request for approval to CDO</summary>

\[For Approval] Onboarding onto data.gov.sg to publish datasets

**Background**

data.gov.sg is Singapore's free open data platform with >70 agencies leveraging it to share datasets via automated APIs with researchers, businesses and the general public. In 2025, data.gov.sg handled close to 2bn API requests and >600k dataset downloads.

To publish datasets on behalf of our agency, admin user access is required. Admin users have the ability to upload, manage, and delete datasets.

**Recommendation**

Onboarding to data.gov.sg would enable us to:

1. **Support operational partnerships** - Provide a robust platform for public users who require high-volume programmatic access to our datasets via APIs, ensuring reliable and scalable data delivery to support their operations.
2. **Reduce operational overhead** - Minimize the burden on our data team by eliminating the need to handle ad-hoc custom data integration requests, allowing the team to focus on higher-value data activities and core responsibilities.
3. **Advance agency strategic objectives** - Support the agency's goals of improving the industry by making relevant data more accessible to stakeholders, enabling evidence-based decision-making and fostering innovation within the sector.

**For Approval**

Seeking approval to proceed with the onboarding process as an admin user on data.gov.sg to publish and manage our agency's datasets on the platform.

</details>

The process typically takes 5–10 business days from CDO approval to account activation — though this can vary depending on how quickly your CDO responds.

Once these are confirmed, you can refer to this [page](/user-guide/for-data-owners/how-to-register-as-an-admin) for account creation.

**Q: Who is allowed to onboard to DGS as a data owners?**

A: Currently access is limited to agencies with domains&#x20;

* \*.gov.sg
* \*.edu.sg

**Q: What if my organisation uses a non-gov email domain (e.g. .org.sg, .com)?**

A: In such cases, approval from your **parent ministry or supervising government agency** is required before onboard can proceed.

## Hosting & Network

**Q: Where is DGS hosted at?**

A: data.gov.sg is hosted on Open Government Products (OGP) AWS Commercial Cloud.

* It is not hosted on GovTech GCC or on SG-NET
* All access to data.gov.sg is via the **Internet**

**Q: Do we need to whitelist IP addresses?**

A: Please whitelist our domains since DGS uses Cloudflare to manage IPs dynamically.

**Q: Is there a staging link?**

A: Yes, we provide a staging environment for testing. You can use the following endpoint:&#x20;

```
https://api-staging.data.gov.sg/
```

<sup>*1*</sup>*&#x20;If you only require access to the staging environment, you will not need to provide proof of CDO approval.*


# How to register as an admin

Click either of the bubbles below to begin and progress through the demo

{% @arcade/embed flowId="kD2czKJO5cjB7mFF8OJM" url="<https://app.arcade.software/share/kD2czKJO5cjB7mFF8OJM>" %}

Once you have completed the steps above, shoot us an onboarding request here: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)

1. Don't forget to include the email(s) that you/your agency have used to attempt onboarding onto the site.&#x20;
2. You will be prompted by us to furnish an email from your CDO which states approval for the email addresses you have listed to be whitelisted as admins. Do have that ready when asked!


# How to login

Data Owners are granted access to the admin portal of data.gov. Here you will be able to view all published datasets, organise them into collections and generate API keys.

1. Scroll to the top right hand corner of the page, and click the `Login` button in the bottom right.&#x20;

<figure><img src="/files/33uhzxworSuMVXoSEKI5" alt=""><figcaption></figcaption></figure>

2. Click the `Go to admin login` button to enter the admin login portal for public officers.

<figure><img src="/files/t2DRe5YS2VKzcNlhn9CN" alt=""><figcaption></figcaption></figure>

3. Enter your gov.sg email address and click <mark style="color:purple;">`Get OTP.`</mark> Enter the One time passcode sent to your email here.&#x20;

<figure><img src="/files/hPimOD6nKsW4O3fRRDca" alt=""><figcaption><p>Admin login screen for </p></figcaption></figure>

4. Upon successful login, you will be given access to the Admin portal.&#x20;

<figure><img src="/files/XeRAOhlpr5HUZVRQJxaf" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)
{% endhint %}

<br>


# How to publish data

{% hint style="info" %}
Note that only government (.gov.sg) users and whitelisted educational institutions (.edu.sg) are able to access the Admin features at this time
{% endhint %}

{% hint style="danger" %}
When uploading the dataset, do ensure that the file is uploaded with the correct encoding. \
\
To find out more, kindly refer to this guide:[ https://support.meistertask.com/hc/en-us/articles/4406395262354-How-Do-I-Encode-My-CSV-File-Using-the-UTF-8-Format](< https://support.meistertask.com/hc/en-us/articles/4406395262354-How-Do-I-Encode-My-CSV-File-Using-the-UTF-8-Format>)
{% endhint %}

1. Upon logging into the admin panel, click the `Upload Dataset` button on the top right.

<figure><img src="/files/Mx6HpC9EvZx5n64U7bLx" alt=""><figcaption></figcaption></figure>

2. Update the dataset name and description at the top of the newly created dataset, select the appropriate dataset topic so members of public can easily discover your dataset.

<figure><img src="/files/JGKkEgyo3jHpHCQcqg36" alt=""><figcaption></figcaption></figure>

3. Add a contact person for the dataset - we recommend using a system or support email in case of personnel changes.

<figure><img src="/files/jPrKffvZVlG7e67dGd69" alt=""><figcaption></figcaption></figure>

4. Add a dataset and update the metadata.

<figure><img src="/files/TcGsmza9tV4N5pqh3x9s" alt=""><figcaption></figcaption></figure>

5. Start the Validation process - do note that this might take some time.&#x20;

<figure><img src="/files/8C8I7ZeW3vUC0zI6VaJM" alt=""><figcaption></figcaption></figure>

Once validation is successful, you will see something like this, and you can choose to set the dataset coverage period.

<figure><img src="/files/TzDDl9LZcWTAg4HbMJy8" alt=""><figcaption></figcaption></figure>

If validation fails, you will see something like this and will need to fix the issues in your dataset in accordance to the SGDRM data format.

<figure><img src="/files/k2G9IqPr9cx2O10DHidP" alt=""><figcaption></figcaption></figure>

You can upload your data and do other things while it uploads. You'll get an email when it's done, telling you if it fails or not.

<figure><img src="/files/2HYmw4uYwSI3Z8uUWLae" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/GnrPit5XUiYMB13yuxoP" alt=""><figcaption></figcaption></figure>

6. Once this is completed, you can publish the dataset at the top right of the page.

<figure><img src="/files/vN8EZBXUrKCk2bPVihl0" alt=""><figcaption></figcaption></figure>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# Making datasets easy to find

A practical guide for dataset administrators to improve the discoverability of published datasets

{% hint style="info" %}
data.gov.sg publishes dataset usage and search metrics every quarter - use these datasets to get an understanding of the discoverability and usage of your agency's datasets.

1. [Dataset usage metrics](https://data.gov.sg/datasets/d_a3ccf37872e0c9a0a3b343ee4b285369/view)
2. [Top clicked pages](https://data.gov.sg/datasets/d_78853d8f18e64df6836077d33d44375a/view)
3. [Top search terms](https://data.gov.sg/datasets/d_fb7c1bfc71e032ff007084bf8b67d9ff/view)<br>
   {% endhint %}

### Introduction

This guide helps you make your datasets easier to find, understand and use. Well-written dataset descriptions appear prominently in search results and clearly show users why they're useful.

### Part 1: Writing dataset titles and descriptions

<figure><img src="/files/8CtoUD4czgzJzUhamyzc" alt=""><figcaption><p>A clear title and description is critical for search</p></figcaption></figure>

Your title is the first thing users see in their search results. A good title should be clear, specific, and contain the main words people search for.&#x20;

<figure><img src="/files/vJbJaRMQVSWikebDvXtx" alt=""><figcaption><p>Datasets without descriptions are less understandable to users</p></figcaption></figure>

<figure><img src="/files/902HdURgEMSZLehLoCOo" alt=""><figcaption><p>In addition, the lack of a description means the dataset will appear with a generic description on search</p></figcaption></figure>

A good dataset description will be reflected in search as well as the dataset page, which will help users better understand if the dataset is relevant to them. Many of the best practices for titles also apply to descriptions, although you can now write in more detail.

**1. Keep titles under 60 characters and descriptions within 160 characters**

* Titles cuts off after 60 characters in the search result

  <figure><img src="/files/2GitC8RkU2Y4bGAyEbWw" alt=""><figcaption><p>Long titles beyond 60 characters get cut off in search</p></figcaption></figure>

  * Keep titles succinct - "HDB resale prices by town and flat type"
  * Don't write  "A comprehensive dataset containing information about..."
* The first sentence of the description should explain what the dataset offers

  <figure><img src="/files/8CtoUD4czgzJzUhamyzc" alt=""><figcaption><p>State what the dataset contains in the first sentence</p></figcaption></figure>

  * Descriptions can go up to 160 characters, but will still get cut off on search, so make sure the first sentence captures the key details.
  * Example: "Access monthly rainfall data from 63 weather stations across Singapore."

**2. Use human readable search terms that people are using**

* When thinking about the title, use terms that users are familiar with, based on their search terms. Avoid jargon as much as possible.

<figure><img src="/files/grpG8TSCjkrlt4ICTWAJ" alt=""><figcaption><p>Top 10 search queries related to the elections dataset</p></figcaption></figure>

<figure><img src="/files/zYZX6fSct7w6LMGZwwnQ" alt=""><figcaption><p>We optimised the title and description to include the top search terms</p></figcaption></figure>

* For example - we looked at the top 10 search queries related to elections and saw that many users were searching for GE2025, grc and electoral boundaries, which prompted us to include this in the title and description, which improved traffic dramatically

**3. Be specific about the data inside the dataset to help users decide if it's relevant**

<figure><img src="/files/fGH8BjLWW4QldTZ7htBn" alt=""><figcaption><p>Detailed titles help users understand what is in the dataset</p></figcaption></figure>

<figure><img src="/files/AGKXEXSwJ1L7f6fisT67" alt=""><figcaption><p>When browsing for datasets, users will need to look at the title to see what might be relevant</p></figcaption></figure>

* Clearly state the time period and geographic area covered
  * For example: "Covers all 26 planning areas in Singapore from January 2010 to present, updated every three months."
* Include key details like time period, location if possible.&#x20;
  * For example: "Rainfall (Monthly, 2010-Present)"

### Part 2: Understanding your agency's dataset metrics

The data.gov.sg has published the following datasets to help you better understand the impact of your agency's open datasets and identify gaps and bottlenecks that might be preventing your dataset from landing more impact.

* [Dataset usage metrics](https://data.gov.sg/datasets/d_a3ccf37872e0c9a0a3b343ee4b285369/view)
  * *How often people see, click and use your datasets*
* [Top clicked pages](https://data.gov.sg/datasets/d_78853d8f18e64df6836077d33d44375a/view)
  * *Which pages get seen and clicked on the most*
* [Top search terms](https://data.gov.sg/datasets/d_fb7c1bfc71e032ff007084bf8b67d9ff/view)
  * *What people are searching for*

#### How to interpret the metrics

1. Low impressions
   1. This means your dataset is hard to find and isn't showing up in searches
   2. Check the top search terms dataset for related search terms, try to match your title and description with what users are searching for
   3. Improve your dataset title to be more searchable, reference similar datasets with higher impressions
2. Low click-through-rate (many impressions, few clicks)
   1. This means your dataset is showing up in search, but people are not clicking on it, most likely due to a vague description
   2. You can rewrite the description of the dataset to make it clearer and more specific
   3. Reference other similar datasets that have higher click-through-rate
3. Many clicks and page views, but low consumption (e.g. downloads, API calls, subscriptions)
   1. This could be expected if the dataset already has good understandability and users are looking at the charts or maps available on the dataset
   2. However, it could also mean that the description was misleading, or might not accurately describe the data since users are interested about the data, but are not consuming it
   3. Make sure that your description accurately describes the file and be precise about key details like time period or location coverage
   4. Ensure that the file format is easy to use (e.g. CSV, GeoJSON, API)

#### Using search data

Compare popular searches with your datasets to find improvement opportunities.

**Example:** If many people search for "hdb resale prices" but your Housing resale transactions dataset doesn't get many clicks, add these exact words to your description.

**Finding missing data:** Searches that lead nowhere may show what people want but can't find. Consider whether your agency could provide this data.

#### Using popular pages data

Learn from the most visited and heavily used datasets to learn best practices:

* Compare your datasets to similar popular ones
* Read their title and descriptions to see what works
* Understand the type of dataset and potential use cases it can serve - e.g. analytical vs transaction

#### Quick reference:

| Symptoms                                  | Likely problem                    | What to try                               |
| ----------------------------------------- | --------------------------------- | ----------------------------------------- |
| Few impressions overall                   | Wrong search words                | Add words people actually search for      |
| <p>Lots of impressions,<br>few clicks</p> | Description unclear               | Rewrite the first paragraph to be clearer |
| <p>Many clicks,<br>few downloads</p>      | Description doesn't match content | Check that your description is accurate   |
| <p>Many searches,<br>no results</p>       | Data doesn't exist yet            | Consider publishing this data             |

### Conclusion

Creating public impact with open datasets starts with making the dataset easy to find. This means understanding what users are searching for and improving your dataset title and descriptions. By monitoring dataset usage and search data, we can help more people discover our datasets.\
\
Every improvement makes your agency's public data more valuable and useful to everyone. Thank you for making Singapore's government data universally accessible and helping the public make data-driven decisions!


# How to unpublish and/or delete datasets

Admins have the ability to remove published datasets on the site via unpublishing or deleting the dataset. Unpublishing and deleting a dataset on a site serve different purposes, listed below.

## Unpublishing a dataset

<mark style="color:purple;">`Unpublish`</mark> function:

* When a dataset is unpublished, it is taken offline and is not visible to site visitors.
* Unpublished datasets are still accessible to site admins on the admin site and can be republished at a later time.
* This action is reversible and is often used when the content needs to be temporarily removed from public view, but may be relevant again in the future.

1. Upon logging into the admin panel, click the ⋮ button on your selected dataset. The drop down menu will be revealed. Proceed to click on the `update` icon.&#x20;

<figure><img src="/files/eZDu8ZvdENc7rMc7xRYt" alt=""><figcaption></figcaption></figure>

2. Click on the downward arrow at the top right hand corner of the screen. This will reveal the unpublish button. Click on <mark style="color:purple;">`unpublish`</mark> to unpublish your dataset from the site, and remove visibility of the dataset to site visitors.

<figure><img src="/files/i7LD02MJgJJ6QSaK0nnP" alt=""><figcaption></figcaption></figure>

## Deleting a dataset

<mark style="color:red;">`Delete`</mark> function:&#x20;

* When a dataset is unpublished and deleted, it is permanently removed from the site.
* Deleted datasets are typically not recoverable, and the content is completely erased from the site's database.
* This action is irreversible and is often used when the content is no longer relevant or appropriate for the site.

1. Upon logging into the admin panel, click the ⋮ button on your selected dataset. This will reveal the pop out as below. Click on the <mark style="color:red;">`Unpublish & delete`</mark> icon

<figure><img src="/files/hZbL9bbguO7rdR1PSKv2" alt=""><figcaption></figcaption></figure>

2. If your dataset is currently unpublished, select the <mark style="color:red;">`Delete`</mark> icon instead.&#x20;

<figure><img src="/files/qw1r9JAnxEAXMGMPM8ef" alt=""><figcaption></figcaption></figure>

3. Select <mark style="color:red;">`Confirm delete`</mark> to permanently remove the dataset from data.gov.sg &#x20;

<figure><img src="/files/DKXgED0kBCIWhFgxIwD4" alt=""><figcaption></figcaption></figure>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# How to edit datasets

1. Access the Admin panel&#x20;

<figure><img src="/files/xPozOjNdsXIroynFAmV4" alt=""><figcaption></figcaption></figure>

2. Hover over to the dataset of choice, and click on the 3 dots to the right of the dataset

<figure><img src="/files/XRw5ijQEwgX5b7arrRip" alt=""><figcaption></figcaption></figure>

3. Click on Update&#x20;

<figure><img src="/files/f4d8VALRExlM3SyBcUhb" alt=""><figcaption></figcaption></figure>

4. Once you have entered the dataset edit page, click on the drop down arrow to the right of the screen, and click <mark style="color:purple;">`unpublish`</mark>

<figure><img src="/files/58KOB2ZkIMMt5sqDJOZf" alt=""><figcaption></figcaption></figure>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# How to generate API keys

{% hint style="info" %}
Please manage your API keys securely - do not share these with your colleagues or vendors
{% endhint %}

* API Keys are only needed for `Write Operations` - operations that require the pushing/uploading of data programmatically.&#x20;
* `Read Operations` to pull information from Data.gov do not require API Keys.&#x20;
* For smoother integration, consider using an admin account accessible by multiple users in your agency.&#x20;
* **Do not share** this API key with third parties such as vendors.

1. Navigate to the API Keys tab

<figure><img src="/files/c9zXsEj0XqTf0p8j9Lc2" alt=""><figcaption><p>The API Keys Page on Data.gov </p></figcaption></figure>

> Before beginning the API Key creation process, note that the key you create will grant access to the permissions your account currently. Do ensure that this key is only created/shared with the intention of sharing your accounts' permissions.&#x20;

2. Proceed to name your key under the `Key Name` text box.&#x20;

<figure><img src="/files/1Sz3TqRjCXn90ixUOH6x" alt=""><figcaption></figcaption></figure>

3. Indicate the lifespan of your key via selecting an option on the drop down menu, under `Expiration.` Do note that multiple keys can exist at the same time, and new keys can be created in the event your current key is set to expire.&#x20;

<figure><img src="/files/pN6zK3GC5Hk83guf72pg" alt=""><figcaption></figcaption></figure>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# Write APIs

Government Admin users can use Write APIs to automatically and programmatically publish data to data.gov.sg without needing to log into the UI

***

## Prerequisites

{% hint style="info" %}
If you're testing on staging, use the [https://api-staging.data.gov.sg/](https://api-production.data.gov.sg/v2/admin/api/auth/whoami) domain instead of the [https://api-production.data.gov.sg/](https://api-production.data.gov.sg/v2/admin/api/auth/whoami) domain listed in the documentation below
{% endhint %}

* You must be a government officer
* Your email has admin permissions to manage datasets

## Step 1 - Generate API Keys:

* Create an API key from the [admin dashboard](https://admin.data.gov.sg/admin/api-keys).
* Store the API key in a secure location. It will be used later.
* Step by step details can be found here: [How to generate API keys](/user-guide/for-data-owners/how-to-generate-api-keys)

## Step 2 - Verify API Connectivity:

{% openapi src="/files/40HegUFnlCee17zrgZ5n" path="/v2/admin/api/auth/whoami" method="get" %}
[OpenAPI Specification.yaml](https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fy5CeK0CZ9cQPNPXSTU0G%2FOpenAPI%20Specification.yaml?alt=media\&token=bce1df24-e860-4669-b712-1abfc8dec74f)
{% endopenapi %}

Run a get request against the above endpoint, using your admin api key in the header:

<https://api-production.data.gov.sg/v2/admin/api/auth/whoami>

\
A 200 response means that you're connected.

**Common issues:**

1. Check your API URL - did you use the correct URL above?
2. Check your API key - did you use the correct API key? Try regenerating the API key and testing again
3. Are the network configurations set up to connect to the internet? data.gov.sg is an internet platform and require internet connectivity

## Step 3 - Publish Dataset:

* To push data, an existing dataset must exist. The dataset can be created from the admin dashboard.
* The dataset must already contain existing data.
* The dataset must be published.
* For more details on publishing data: [How to publish data](/user-guide/for-data-owners/how-to-publish-data)

Using Write APIs involves three steps:

* Generating upload link
* Uploading file to link
* Polling for upload status

## Step 4 - Create Upload / Append URL:

There are two types of links you can create depending on your use case:

{% hint style="info" %}
Important notes:

1. The maximum file size is 1GB.&#x20;
   1. If you want to have a dataset that is more than 1GB, use the `Get Create Append URL`  and ensure each file uploaded is less than 1GB.

2. The pre-signed url generated will expire after 1 hour
   {% endhint %}

3. If you're replacing an existing dataset completely, use the `Get Create Upload URL` method

4. If you are appending rows to an existing dataset, use the `Get Create Append URL` method.&#x20;
   1. Please ensure the column data types and names are all the same and no new columns have been added. This append API only supports appending rows to an existing dataset and not appending columns

{% openapi src="/files/OtPFELkCy8zEek0JnGF5" path="/v2/admin/api/datasets/{datasetId}/upload-link" method="get" %}
[v2-write-api-specification\_20240216.yml](https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FPFep58QSVCNi4STG6Kwz%2Fv2-write-api-specification_20240216.yml?alt=media\&token=eb292347-599e-418e-8f8a-13e486028524)
{% endopenapi %}

{% openapi src="/files/9G8Wbe5n7FiQWiklig5V" path="/v2/admin/api/datasets/{datasetId}/append-link" method="get" %}
[append-api-specification.yml](https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FymtmZMtrRsaocs1Xlsaa%2Fappend-api-specification.yml?alt=media\&token=e919ad78-e172-434e-8885-d42cb6ea4778)
{% endopenapi %}

{% hint style="info" %}
Find the `datasetId` within the dataset url\
\
For example, for this url: <https://data.gov.sg/datasets/d_07c63be0f37e6e59c07a4ddc2fd87fcb/view>\
\
The datasetId is the following:\
d\_07c63be0f37e6e59c07a4ddc2fd87fcb\
\
Hence, the endpoint used would be:\
<https://api-production.data.gov.sg/v2/admin/api/datasets/d_07c63be0f37e6e59c07a4ddc2fd87fcb/upload-link>
{% endhint %}

## Step 5 - Upload Tabular File:

You'll need to make a direct `PUT` request to the S3 pre-signed url returned in the response of the previous step to upload your CSV file.&#x20;

The url should start with `https://s3.ap-southeast-1.amazonaws.com/`&#x20;

For example: `https://s3.ap-southeast-1.amazonaws.com/attachments.data.gov.sg/c/6047/private/d_2a6070fa301695904e1a626434189e59/VW50aXRsZWQgRGF0YXNldA/d_2a6070fa301695904e1a626434189e59.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAU7LWPY2WH4V4RGEJ%2F20231129%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20231129T053810Z&X-Amz-Expires=3600&...`

**Javascript**

```javascript
// Upload CSV file to presigned URL
const uploadCsv = async (presignedUrl, csvContent) => {
  const response = await fetch(presignedUrl, {
    method: 'PUT',
    headers: {
      'Content-Type': 'text/csv'
    },
    body: csvContent
  });
  
  if (response.ok) {
    console.log('Upload successful!');
  } else {
    console.error('Upload failed:', response.statusText);
  }
};

// Usage
const csvData = `name,title,email
janedoe,SWE,jane@open.gov.sg
johnsmith,PM,john@open.gov.sg`;

await uploadCsv(presignedUrl, csvData);
```

**Python**

```python
import requests

# Upload CSV file to presigned URL
def upload_csv(presigned_url, csv_content):
    headers = {'Content-Type': 'text/csv'}
    
    response = requests.put(presigned_url, headers=headers, data=csv_content)
    response.raise_for_status()
    
    return response

# Usage
csv_data = """name,title,email
janedoe,SWE,jane@open.gov.sg
johnsmith,PM,john@open.gov.sg"""

upload_response = upload_csv(presigned_url, csv_data)
print("Upload successful!" if upload_response.status_code == 200 else "Upload failed")
```

{% hint style="info" %}
It’s important to ensure that you are sending a PUT request with only the file data. While POST-ing form-data is allowed, the file received will not be the same and may cause errors.
{% endhint %}

**Common issues:**

1. Check that you're using a PUT request
2. Check that you're using the generated S3 pre-signed url, instead of the one above
3. Set the header as `Content-Type: text/csv` when uploading the CSV file
4. The pre-signed URLs expire after 1 hour, so you'd need to generate them again

**Reference:**

{% embed url="<https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html>" %}

## Step 6 - Get Latest Ingestion Status:

{% openapi src="/files/OtPFELkCy8zEek0JnGF5" path="/v2/admin/api/datasets/{datasetId}/ingestion-status" method="get" %}
[v2-write-api-specification\_20240216.yml](https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FPFep58QSVCNi4STG6Kwz%2Fv2-write-api-specification_20240216.yml?alt=media\&token=eb292347-599e-418e-8f8a-13e486028524)
{% endopenapi %}

The validation and ingestion process of data.gov.sg is asynchronous. The upload request from the previous section will return before the process is complete. In order to get the status for validation and ingestion, manual polling is required.

Here are the possible validation and ingestion statuses:

<table><thead><tr><th width="93">Order</th><th width="123">Status</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Pending</td><td>The validation and ingestion process has been started</td></tr><tr><td>2</td><td>Pending Validation</td><td>The dataset has been queued for validation</td></tr><tr><td>2.1</td><td>Validation Failed</td><td>The dataset contains invalid values causing validation failures. Please review the reported errors, make the necessary changes and try again.</td></tr><tr><td>2.2</td><td>Validation Passed</td><td>The dataset has been validated successfully, but not yet ingested.</td></tr><tr><td>3</td><td>Pending Ingestion</td><td>The dataset has been queued for ingestion.</td></tr><tr><td>3.1</td><td>Ingestion Failed</td><td>The dataset failed to be ingested. Please try again later.</td></tr><tr><td>3.2</td><td>Ingestion Success</td><td>The dataset has been ingested successfully.</td></tr></tbody></table>

**Common questions:**

1. What happens when there are concurrent writes?
   1. If there is an existing dataset upload that has not completed, subsequent dataset uploads will automatically fail. This is to prevent multiple writes happening at the same time, that will cause unexpected behaviour
   2. To prevent this, poll this endpoint and wait for `Ingestion Success` status before uploading another file
2. What happens if there is one or more rows that fail validation?
   1. We currently take the conservative approach and will reject the dataset upload if any of the rows fail validation. In these cases, we recommend to fix the dataset before retrying.
   2. The API will not return detailed explanations on the validation error. For further debugging and investigation, please try uploading the dataset via the UI, which will show more explicit error messages to help with debugging.
3. How long does ingestion status take to update?
   1. Status updates typically within 1-5 minutes.

## Raw API Schema:

{% hint style="info" %}
Updated as of 20th June 2024
{% endhint %}

{% file src="/files/GZ3uiP5wNL2enXw1SlRE" %}

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# API overview

There are two types of APIs on data.gov.sg.&#x20;

1. **Real-Time APIs:**&#x20;

{% hint style="info" %}
Please find a list of our real-time APIs [here](https://beta.data.gov.sg/datasets?formats=API)
{% endhint %}

These are specific use-case APIs that allow you to query data such as weather and traffic conditions

2. **Collection and Dataset APIs:**

{% hint style="info" %}
API documentation can be found below
{% endhint %}

These APIs allow you to query both collections and datasets, as well as to retrieve metadata and listings.<br>

The API used to query a specific dataset for data can be found on the page `API v1`, under `Dataset Search`.

***

## Nomenclature

**Collection:**

A grouping of datasets, generally thematically

`collection_id` can be found in the URL of the dataset in this manner `https://data.gov.sg/collections/{collection_id}/view`

> For example - <https://data.gov.sg/collections/1/view> has the `collection_id` of `1`

**Dataset:**

A single unit of data, which can be tabular (e.g. csv, xlsx) or otherwise (e.g. geojson, kml)\ <br>

`dataset_id` can be found in the URL of the dataset in this manner `https://data.gov.sg/datasets/{dataset_id}/view`

> For example - <https://data.gov.sg/datasets/1/view> has the `dataset_id` of `1`

## API Key

All Data.gov.sg APIs are public and can be accessed without an API key for testing purposes.

However, if you are using the APIs and datasets for **production workflows**, we strongly recommend you to use an **API key.**

This will grant you **higher rate limits**, **prioritised support** and **maintenance updates**<br>

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td><a href="/pages/i0oxYbU4QPRnj8KGNTXw">/pages/i0oxYbU4QPRnj8KGNTXw</a></td></tr><tr><td></td><td><a href="/pages/PtUj68W9cYdqiWA9CIW7">/pages/PtUj68W9cYdqiWA9CIW7</a></td></tr><tr><td></td><td><a href="/pages/nXS7hhABBqAPHZHbN7Zl">/pages/nXS7hhABBqAPHZHbN7Zl</a></td></tr><tr><td></td><td><a href="/pages/qK2MVSt7VZUpxN0Y5cA6">/pages/qK2MVSt7VZUpxN0Y5cA6</a></td></tr></tbody></table>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


# How to request an API key

To access a higher limit for your API, simply apply for an API key by logging in to our dashboard.

1\. Visit [data.gov.sg](http://data.gov.sg/)

2\. Click on the login modal \[at the top right hand corner of the page]

<figure><img src="/files/ecy5JfnTorQG4VLX5fTl" alt=""><figcaption></figcaption></figure>

3. Log into the site using your email

<figure><img src="/files/dyrMDEZ09Bj7iCXb8KkZ" alt=""><figcaption></figcaption></figure>

4. If you are a **new user**

   * Click on the Sign Up button

   <div align="right" data-full-width="false"><figure><img src="/files/DdnHVRWnFkzXmKtpyk3V" alt=""><figcaption></figcaption></figure></div>

   * Fill up the user form, and use your organisations' email address where possible

   <figure><img src="/files/5caKPWqEtb1mVaXKThJu" alt=""><figcaption></figcaption></figure>

5\. Input your email address to receive an OTP

6\. Click on Create API Key

<figure><img src="/files/fdX2bW51Ww37oAiSaKOl" alt=""><figcaption></figcaption></figure>

7\.  Request either **Developer** or **Production** API keys based on your needs:

* **Developer keys:** ideal for testing and staging environments, with lower rate limits.
* **Production keys:** intended for operational use cases, offering higher rate limits and more targeted support.

When submitting your request, please provide detailed information about your intended use to help us tailor support to your needs.

<figure><img src="/files/UOTf6COjTBu5k9FF93di" alt=""><figcaption></figcaption></figure>

9. Once you have filled all the information, Click "Create" and your API key will be generated. A pop-up will show your new API key. **Copy or Download and store it securely - you won't be able to view it again.**

<figure><img src="/files/ZfGfiuKxuIupe7mwgwPs" alt=""><figcaption></figcaption></figure>


# How to use your API Key

To authenticate, include your API key in the request header as follows:

**Header:**\
`x-api-key: YOUR_API_KEY`

Replace `YOUR_API_KEY` with the API key you generated from the dashboard.

## Curl

```
curl -X GET "https://api-production.data.gov.sg/v2/public/api/collections" \
  -H "x-api-key: YOUR_API_KEY"

```

## Python

```
import requests

headers = {"x-api-key": "YOUR_API_KEY"}
response = requests.get("https://api-production.data.gov.sg/v2/public/api/collections", headers=headers)
print(response.json())

```

## [Google Colab Notebook](https://colab.research.google.com/github/datagovsg/dgs-exploration/blob/master/DataGovSG.ipynb)

> **Keep your API key secure. Do not share your key or expose it in client-side code.**

For details on obtaining your API key, see [How to request an API key.](/developer-guide/api-overview/how-to-request-an-api-key)


# Deleting and Expiring API Keys

## Deleting API Keys

1. **Click the trash icon** next to the API key you want to delete. A confirmation dialog titled **“Delete your API key”** will appear. Click **“Delete API key”** to confirm.

<div><figure><img src="/files/rUjVsRAnvsSlGyAl3C1b" alt=""><figcaption></figcaption></figure> <figure><img src="/files/5rlEEYkTK8z6lmAtgibp" alt=""><figcaption></figcaption></figure></div>

2. After deletion, you’ll return to the dashboard. A notification saying **“Deleted the API key.”** will appear at the bottom right of the screen.

<figure><img src="/files/8RtM5mwpFI5KERuIb1M7" alt=""><figcaption></figcaption></figure>

## Expiring API Keys

#### Where to View Expiry

1. You can view your API key’s expiration date in the API dashboard, under the API Keys section.

<figure><img src="/files/2dquPamnGZdaC2UyH5vn" alt=""><figcaption></figcaption></figure>

#### Expiry Notifications

1. To help ensure uninterrupted service, users will receive email notifications before an API key expires.&#x20;
2. These notifications are sent at the following intervals:
   1. 3 months before expiry
   2. 1 month before expiry
   3. 3 weeks before expiry
   4. 1 week before expiry
3. Example of email notification

<figure><img src="/files/HpJLIuit5JI0Uq7iiVJD" alt=""><figcaption></figcaption></figure>

> Each email will specify the expiring key and its exact expiration date and time (in SGT), with a link to your dashboard to manage or renew the key.


# API Rate Limits

To maintain fair use, protect against system abuse and maintain system reliability of our APIs, data.gov.sg has rate limits for these following API services:

* [v2 Real-time APIs](https://data.gov.sg/datasets?formats=API)
* [Datastore Search](/developer-guide/dataset-apis/search-and-filter-within-dataset)
* [Dataset Downloads](https://guide.data.gov.sg/developer-guide/dataset-apis#downloads)

While these APIs are free to use, the rate limit is significantly lower for users who are not logged in. For production use, we highly recommend [signing up on our platform](https://data.gov.sg/?signin=Registration) to access higher rate limits.

### **Rate Limits**

The rate limits are reset every 10 seconds - the following rate limits represent the number of API calls that can be made every 10 seconds. If the rate limits are exceeded, you will receive a `429` status error (Too many requests)

<table><thead><tr><th width="209.65625">API Endpoint</th><th width="162.93359375">Without API Key</th><th width="171.984375">With Dev API Key</th><th>With Prod API Key</th></tr></thead><tbody><tr><td><a href="https://data.gov.sg/datasets?formats=API">v2 Realtime API</a></td><td>6</td><td>12</td><td>30</td></tr><tr><td><a href="/pages/3eHNCLLQW6nUvZ2MbpD5">Datastore Search</a></td><td>4</td><td>8</td><td>20</td></tr><tr><td><a href="/spaces/q7WX3NoaCV1xN8QVTpJE">Dataset Downloads</a></td><td>2</td><td>4</td><td>10</td></tr></tbody></table>

{% hint style="info" %}
**Tier Definitions**

* Without API Key: Public access. Lowest limits for exploration.
* Development Tier (Dev): Requires API Key. Moderate limits for development/testing purposes.
* Production Tier (Prod): Requires API Key. Highest limits, priority support for your application.
  {% endhint %}

We are currently fine-tuning these rate limits based on user inputs and would appreciate receiving your feedback at <support@data.gov.sg>.&#x20;


# Collection APIs

### Collections listing

This API returns a list of all the collections on data.gov.sg

## GET /v2/public/api/collections

> Get collections

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"collections"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/collections":{"get":{"summary":"Get collections","tags":["collections"],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1},"description":"Page number (optional, must be 1 or more)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"collectionId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lastUpdatedAt":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"},"frequency":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}},"managedByAgencyName":{"type":"string"},"childDatasets":{"type":"array","items":{"type":"string"}}}}},"pages":{"type":"integer"}}},"errorMsg":{"type":"string"}}}}}}}}}}}
```

### Collection metadata

This API returns the metadata of a single collection and the datasets within it

## GET /v2/public/api/collections/{collectionId}/metadata?withDatasetMetadata=true

> Get metadata for a collection

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"collections"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/collections/{collectionId}/metadata?withDatasetMetadata=true":{"get":{"summary":"Get metadata for a collection","tags":["collections"],"parameters":[{"in":"path","name":"collectionId","required":true,"schema":{"type":"number"},"description":"The unique identifier of the collection (number)"},{"in":"query","name":"withDatasetMetadata","schema":{"type":"boolean"},"description":"Include dataset metadata (true or false, default is false)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"collectionMetadata":{"type":"object","properties":{"collectionId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lastUpdatedAt":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"},"frequency":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}},"managedBy":{"type":"string"},"childDatasets":{"type":"array","items":{"type":"string"}}}},"datasetMetadata":{"type":"array","items":{"type":"object","properties":{"datasetId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"format":{"type":"string"},"lastUpdatedAt":{"type":"string"},"managedBy":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"}}}}}},"errorMsg":{"type":"string"}}}}}}}}}}}
```

{% hint style="info" %}
To find the collectionId, refer to the URL of collection.\
\
For this collection:\
<https://beta.data.gov.sg/collections/522/view>\
\
The collectionId is:\
`522`
{% endhint %}


# Dataset APIs

The following APIs are available for querying our datasets programmatically

* [Search and filter within dataset](/developer-guide/dataset-apis/search-and-filter-within-dataset)
* [Download dataset](/developer-guide/dataset-apis/download-dataset)
* [Get dataset metadata](/developer-guide/dataset-apis/get-dataset-metadata)
* [List all datasets](/developer-guide/dataset-apis/list-all-datasets)


# List rows of dataset

{% hint style="info" %}
To find the dataset\_id, refer to the URL of dataset.\
\
For this dataset:\
<https://data.gov.sg/collections/522/datasets/d_11e68bba3b3c76733475a72d09759eeb/view> \
or \
<https://data.gov.sg/datasets/d_11e68bba3b3c76733475a72d09759eeb/view>\
\
\
The datasetId is:\
`d_11e68bba3b3c76733475a72d09759eeb`\ <br>

For staging, note that the dataset\_id might differ between staging and production:

* Domain: [https://api-staging.data.gov.sg/](https://api-staging.data.gov.sg/v2/public/api/datasets/d_696c994c50745b079b3684f0e90ffc53/list-rows)
* Example: <https://api-staging.data.gov.sg/v2/public/api/datasets/d_696c994c50745b079b3684f0e90ffc53/list-rows>
  {% endhint %}

## Listing rows for a datasets

This API returns the list of rows of a single dataset

## GET /v2/public/api/datasets/{datasetId}/list-rows

> List rows for a dataset

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"datasets"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/datasets/{datasetId}/list-rows":{"get":{"summary":"List rows for a dataset","tags":["datasets"],"parameters":[{"in":"path","name":"datasetId","required":true,"schema":{"type":"string"},"description":"The unique identifier of the dataset"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"},"description":"List of rows"},"resourceId":{"type":"string","description":"The unique identifier of the resource"},"resourceName":{"type":"string","description":"The name of the resource"},"limit":{"type":"integer","description":"The limit of rows per page"},"links":{"type":"object","properties":{"next":{"type":"string","description":"Link to the next page of results"}}}}},"errorMsg":{"type":"string"}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}}}}}}}
```


# Search and filter within dataset

### Datastore search&#x20;

This API allows you to search for data within a dataset or scan through the rows of the dataset in a paginated manner.&#x20;

{% hint style="info" %}
Note that the following API uses the domain: <https://data.gov.sg>

For example:&#x20;

<https://data.gov.sg/api/action/datastore_search>

If you're looking to query the following dataset:\
<https://data.gov.sg/datasets/d_8b84c4ee58e3cfc0ece0d773c8ca6abc/view>\
\
Please refer to the URL from the dataset page, taking the dataset\_id (starting with d\_...), and passing that into your datastore search API query as shown below:\
\
<https://data.gov.sg/api/action/datastore_search?resource_id=d_8b84c4ee58e3cfc0ece0d773c8ca6abc>

\
\
For staging, note that the dataset\_id on production and staging might differ:

* Domain: <https://api-public-staging.data.gov.sg/>
* Example: <https://api-public-staging.data.gov.sg/api/action/datastore_search?resource_id=d_8b84c4ee58e3cfc0ece0d773c8ca6abc>
  {% endhint %}

### Search Rows in Dataset

## GET /api/action/datastore\_search

> Search rows in a dataset

```json
{"openapi":"3.0.0","info":{"title":"Data.gov.sg APIs","version":"1.0.0"},"servers":[{"url":"https://data.gov.sg"}],"paths":{"/api/action/datastore_search":{"get":{"summary":"Search rows in a dataset","description":"","parameters":[{"name":"resource_id","in":"query","description":"ID or alias of the resource to be searched against. This corresponds to the dataset_id (resource_id is a legacy reference)","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of rows to return (optional, default: 100)","required":false,"schema":{"type":"integer","default":100}},{"name":"offset","in":"query","description":"Offset this number of rows (optional)","required":false,"schema":{"type":"integer"}},{"name":"fields","in":"query","description":"Fields to return (optional, default: all fields in original order)","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","description":"Dictionary of matching conditions, e.g {\"key1\": \"a\", \"key2\": \"b\"}","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Example: {\"columnName\": \"columnValue\"}","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Comma-separated field names with ordering, eg.: \"fieldname1, fieldname2 desc\"","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fetched data","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CkanDatastoreSearch"},{}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}},"default":{"description":"Error information","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CkanError"},{}]}}}}}}}},"components":{"schemas":{"CkanDatastoreSearch":{"allOf":[{"$ref":"#/components/schemas/CkanBase"},{"type":"object","required":["result"],"properties":{"result":{"type":"object","description":"Resource","required":["resource_id","fields","records"],"properties":{"resource_id":{"type":"string","description":"Resource id"},"fields":{"type":"array","description":"Data fields","items":{"type":"object","description":"Data field"}},"records":{"type":"array","description":"Data rows","items":{"type":"object","description":"Data row in object format"}},"limit":{"type":"integer","description":"Limit for number of rows returned"},"total":{"type":"integer","description":"Total number of rows"},"_links":{"type":"object","description":"Pagination-related links","properties":{"start":{"type":"string","description":"Link back to first page"},"next":{"type":"string","description":"Link to next page"}}}}}}}]},"CkanBase":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","description":"Whether fetch is succesfully"}}},"CkanError":{"allOf":[{"$ref":"#/components/schemas/CkanBase"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","description":"Error type and description"}}}]}}}}
```


# Download dataset

## Guide to downloading datasets

To download an entire dataset via API, you will need to first call the `initiate download` API, followed by the `poll download` API.

You may add column and rows filters to get a subset of the dataset, although this is optional.

For datasets that do not have the CSV extension (ie GeoJSON, KML, PDF etc.), you may skip this endpoint and proceed to the Poll Download API below.

{% hint style="info" %}
To find the dataset\_id, refer to the URL of dataset.\
\
For this dataset:\
<https://data.gov.sg/collections/522/datasets/d_11e68bba3b3c76733475a72d09759eeb/view> \
or \
<https://data.gov.sg/datasets/d_11e68bba3b3c76733475a72d09759eeb/view>\ <br>

The datasetId is:\
`d_11e68bba3b3c76733475a72d09759eeb`

For staging, note that the dataset\_id might differ between staging and production:

* Domain: <https://api-open-staging.data.gov.sg/>
* Example: <https://api-open-staging.data.gov.sg/v1/public/api/datasets/d_8b84c4ee58e3cfc0ece0d773c8ca6abc/initiate-download>
  {% endhint %}

## GET /v1/public/api/datasets/{datasetId}/initiate-download

> Initiate download for a dataset

```json
{"openapi":"3.0.0","info":{"title":"DGS Public Download API","version":"1.0.0"},"servers":[{"url":"https://api-open.data.gov.sg"}],"paths":{"/v1/public/api/datasets/{datasetId}/initiate-download":{"get":{"summary":"Initiate download for a dataset","parameters":[{"name":"datasetId","in":"path","required":true,"schema":{"type":"string"},"description":"ID of the dataset"}],"requestBody":{"description":"Optional request body for filtering dataset","content":{"application/json":{"schema":{"type":"object","properties":{"columnNames":{"type":"array","items":{"type":"string"},"description":"List of selected columns in filtered dataset."},"filters":{"type":"array","description":"Filters defines how users want to filter their dataset.\n\nFilters is an array of objects which have `columnName`, `type` and `value` attributes.\n- `columnName` refers to the column where the filter is to be applied.\n- `type` can be `EQ`, `LIKE`, or `ILIKE`:\n  - **EQ**: Direct comparison for filter and is case sensitive.\n  - **LIKE**: Similar to EQ but includes partial matching. Any words containing the string in the `value` attribute will be matched.\n  - **ILIKE**: Case-insensitive version of LIKE.\n"}}}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Response code"},"data":{"type":"object","properties":{"message":{"type":"string","description":"Success message"}}},"errorMsg":{"type":"string","description":"Error message (if any)"}}}}}},"400":{"description":"Request Failure <br/>\n<li>Contains invalid column name.</li> <li>Invalid filters.</li> <li>Event object validation failed.</li>","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Response code"},"name":{"type":"string","description":"Error type"},"errorMsg":{"type":"string","description":"Error Message"}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}}}}}}}
```

After initiating the download of a dataset, this endpoint below returns a link to access the dataset

## GET /v1/public/api/datasets/{datasetId}/poll-download

> Poll download for a dataset after download has been initiated

```json
{"openapi":"3.0.0","info":{"title":"DGS Public Download API","version":"1.0.0"},"servers":[{"url":"https://api-open.data.gov.sg"}],"paths":{"/v1/public/api/datasets/{datasetId}/poll-download":{"get":{"summary":"Poll download for a dataset after download has been initiated","parameters":[{"name":"datasetId","in":"path","required":true,"schema":{"type":"string"},"description":"ID of the dataset"}],"requestBody":{"description":"Optional request body for filtering dataset","content":{"application/json":{"schema":{"type":"object","properties":{"columnNames":{"type":"array","items":{"type":"string"},"description":"List of selected columns in filtered dataset."},"filters":{"type":"array","description":"Filters defines how users want to filter their dataset.\n\nFilters is an array of objects which have `columnName`, `type` and `value` attributes.\n- `columnName` refers to the column where the filter is to be applied.\n- `type` can be `EQ`, `LIKE`, or `ILIKE`:\n  - **EQ**: Direct comparison for filter and is case sensitive.\n  - **LIKE**: Similar to EQ but includes partial matching. Any words containing the string in the `value` attribute will be matched.\n  - **ILIKE**: Case-insensitive version of LIKE.\n"}}}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Response code"},"data":{"type":"object","properties":{"status":{"type":"string","description":"Status of download"},"url":{"type":"string","description":"Link to access downloaded dataset"}}},"errorMsg":{"type":"string","description":"Error message (if any)"}}}}}},"400":{"description":"Request Failure <br/>\n<li>Contains invalid column name.</li> <li>Invalid filters.</li> <li>Event object validation failed.</li>","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Response code"},"name":{"type":"string","description":"Error type"},"errorMsg":{"type":"string","description":"Error Message"}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}}}}}}}
```

{% hint style="info" %}
As data.gov.sg is a public shared service, we will apply quotas to ensure that they are fairly used by all users. If you exceed the quota of 5 requests per minute, you’ll likely receive a 429 Error.\
\
For higher rate limits - [create an API key](/developer-guide/api-overview/how-to-request-an-api-key)
{% endhint %}


# Get dataset metadata

{% hint style="info" %}
To find the dataset\_id, refer to the URL of dataset.\
\
For this dataset:\
<https://data.gov.sg/collections/522/datasets/d_11e68bba3b3c76733475a72d09759eeb/view> \
or \
<https://data.gov.sg/datasets/d_11e68bba3b3c76733475a72d09759eeb/view>\
\
\
The datasetId is:\
`d_11e68bba3b3c76733475a72d09759eeb`\ <br>

For staging, note that the dataset\_id might differ between staging and production:

* Domain: [https://api-staging.data.gov.sg/](https://api-staging.data.gov.sg/v2/public/api/datasets/d_696c994c50745b079b3684f0e90ffc53/list-rows)
* Example: [https://api-staging.data.gov.sg/v2/public/api/datasets/{datasetId}/metadata](https://api-production.data.gov.sg/v2/public/api/datasets/{datasetId}/metadata)
  {% endhint %}

### Dataset Metadata

This API returns the metadata of a single dataset

## GET /v2/public/api/datasets/{datasetId}/metadata

> Get metadata for a dataset

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"datasets"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/datasets/{datasetId}/metadata":{"get":{"summary":"Get metadata for a dataset","tags":["datasets"],"parameters":[{"in":"path","name":"datasetId","required":true,"schema":{"type":"string"},"description":"The unique identifier of the dataset"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"datasetId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"format":{"type":"string"},"lastUpdatedAt":{"type":"string"},"managedBy":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"},"columnMetadata":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"}},"map":{"type":"object","additionalProperties":{"type":"string"}},"metaMapping":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"columnTitle":{"type":"string"},"dataType":{"type":"integer"},"index":{"type":"string"}}}}}}}},"errorMsg":{"type":"string"}}}}}}}}}}}
```


# List all datasets

### Datasets Listing

This API returns a list of all the datasets available on data.gov.sg

## GET /v2/public/api/datasets

> Get datasets

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"datasets"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/datasets":{"get":{"summary":"Get datasets","tags":["datasets"],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1},"description":"Page number (optional, must be 1 or more)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"datasets":{"type":"array","items":{"type":"object","properties":{"datasetId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"format":{"type":"string"},"lastUpdatedAt":{"type":"string"},"managedByAgencyName":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"}}}},"pages":{"type":"integer"}}},"errorMsg":{"type":"string"}}}}}}}}}}}
```


# Real Time APIs

## Example Request For Real Time API

The full list of Realtime APIs are available at: <https://data.gov.sg/datasets?formats=API>

## PM 2.5

> \*\*\[<https://api-open.data.gov.sg/v2/real-time/api/pm25]\\(https://api-open.data.gov.sg/v2/real-time/api/pm25)\\*\\*\\>
> \
> \<br/>\
> \
> \- Updated hourly from NEA.\
> \- Readings are provided for each major region in Singapore\
> \
> \<br/>\
> \
> \- Filter for specific date or date-time by providing \`date\` in query parameter.\
> &#x20; \- use YYYY-MM-DD format to retrieve all of the readings for that day\
> &#x20; \- use YYYY-MM-DDTHH:mm:ss to retrieve the latest readings at that moment in time\
> &#x20; \- example: \`?date=2024-07-16\` or \`?date=2024-07-16T23:59:00\`\
> \
> \<br/>\
> \
> \- If \`date\` is not provided in query parameter, API will return the latest reading\
> \
> \<br/>\
> \
> \- The \`region\_metadata\` field in the response provides longitude/latitude information for the regions. You can use that to place the readings on a map.\
> \<br/>\
> \- Unit of measure for readings is \`µg/m3\`.

```json
{"openapi":"3.0.3","info":{"title":"Real-time API weather services","version":"1.0.11"},"tags":[{"name":"Air Quality","description":"Air quality data API."}],"servers":[{"url":"https://api-open.data.gov.sg/v2/real-time/api"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/pm25":{"get":{"tags":["Air Quality"],"summary":"PM 2.5","description":"**[https://api-open.data.gov.sg/v2/real-time/api/pm25](https://api-open.data.gov.sg/v2/real-time/api/pm25)**\n\n<br/>\n\n- Updated hourly from NEA.\n- Readings are provided for each major region in Singapore\n\n<br/>\n\n- Filter for specific date or date-time by providing `date` in query parameter.\n  - use YYYY-MM-DD format to retrieve all of the readings for that day\n  - use YYYY-MM-DDTHH:mm:ss to retrieve the latest readings at that moment in time\n  - example: `?date=2024-07-16` or `?date=2024-07-16T23:59:00`\n\n<br/>\n\n- If `date` is not provided in query parameter, API will return the latest reading\n\n<br/>\n\n- The `region_metadata` field in the response provides longitude/latitude information for the regions. You can use that to place the readings on a map.\n<br/>\n- Unit of measure for readings is `µg/m3`.","parameters":[{"in":"query","name":"date","description":"SGT date for which to retrieve data (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)","schema":{"type":"string"}},{"in":"query","name":"paginationToken","description":"Pagination token for retrieving subsequent data pages (only exists when there is a next page available for requests with date filters)","schema":{"type":"string"}}],"responses":{"200":{"description":"PM 2.5 Information","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Response status code (always 0 for success)"},"errorMsg":{"type":"string","description":"Error message (empty string for success)"},"data":{"type":"object","properties":{"regionMetadata":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Region name"},"labelLocation":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude coordinate of the region label"},"longitude":{"type":"number","description":"Longitude coordinate of the region label"}}}}}},"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"SGT date of the reading (YYYY-MM-DD format)"},"updatedTimestamp":{"type":"string","description":"SGT timestamp of last updated"},"timestamp":{"type":"string","description":"SGT timestamp of the reading"},"readings":{"type":"object","description":"Overall and regional PSI data including pollutant concentrations and sub-indices","properties":{"pm25_one_hourly":{"type":"object","properties":{"national":{"type":"integer","description":"Reading for national reporting stations"},"east":{"type":"integer","description":"Reading for east region"},"west":{"type":"integer","description":"Reading for west region"},"north":{"type":"integer","description":"Reading for north region"},"south":{"type":"integer","description":"Reading for south region"},"central":{"type":"integer","description":"Reading for central region"}}}}}}}},"paginationToken":{"type":"string","description":"Token to retrieve next page if exists"}}}}}}}},"400":{"description":"Invalid HTTP request body","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string","enum":["Invalid date format. Date format must be YYYY-MM-DD (2024-06-01) or YYYY-MM-DDTHH:mm:ss (2024-06-01T08:30:00).","Invalid pagination token."]}}}}}},"404":{"description":"Weather data not found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}}}}}}}
```


