# 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="/user-guide/for-data-owners/how-to-unpublish-and-or-delete-datasets">How to unpublish and/or delete datasets</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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FpD9PSFqBz5gzw5NCitUY%2Fimage%20(32).png?alt=media&amp;token=f15f5d20-d1a4-40dd-a3e3-76475f80ca4f" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fix3abeRffERSNdzPVkMM%2Fimage%20(33).png?alt=media&amp;token=1c3b1a65-b248-410a-968a-b02f0e80f863" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F1oIy3vCo2G0Bor5FQLCN%2Fimage%20(34).png?alt=media&amp;token=6d55aeb3-3c3d-493b-905c-46743c6e9b8c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fk9oMB9M7cSUmLM20uaty%2Fimage%20(35).png?alt=media&amp;token=acea1990-3954-40f2-ae34-6406e7802a05" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FQSpvzOiKaC6FjOYLka7X%2FScreenshot%202024-11-06%20at%203.04.17%20PM.png?alt=media&amp;token=5432a9ef-2dd5-4b51-9bf1-53c7394e671b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FvOSl9RvNjGvyKw5pDnXz%2FScreenshot%202024-11-06%20at%203.05.18%20PM.png?alt=media&amp;token=8553a039-b37b-47ad-962d-ac1a2e21d790" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fc26FuR9Oi3gpB1lId7z2%2FScreenshot%202024-11-06%20at%203.05.54%20PM.png?alt=media&amp;token=c307d17c-9b06-4d10-9749-406e65af86e4" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FktzeZsyS1T6nmp1SpXOn%2Fimage.png?alt=media&amp;token=14d21b1b-0f90-40b0-98c8-5e73cb87a2ab" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FEhhIxJiQTjnjnhUuMtTY%2Fimage.png?alt=media&amp;token=6204b228-442e-40a7-a44b-a28921813782" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FasCWuRBUmhFYv3gkAfG4%2Fsubscription-ezgif.com-video-to-gif-converter%20(1).gif?alt=media&amp;token=d889b8ee-4f59-4caa-b5d2-6288b9278180" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FQ6bzPOD6DO0oN5kKUYXZ%2Fweatherforecase-ezgif.com-video-to-gif-converter%20(1).gif?alt=media&amp;token=9c16e17b-8dcb-4a40-b0ab-f33bbf112944" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fjj85uuoxunux6Igmb4yK%2FaPIresponse-ezgif.com-video-to-gif-converter%20(1).gif?alt=media&amp;token=93db27bd-1b09-4ca2-9b2a-fbb46b371cff" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FrymCy7VzyEne5j4sqv0R%2FDenguegeospace-ezgif.com-video-to-gif-converter%20(1).gif?alt=media&amp;token=c0a9b237-bae8-4317-bae4-703849aaa6df" 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

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

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

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


# 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FJrUhj5OOfXQom2UZiYbI%2FScreenshot%202024-11-05%20at%203.45.41%20PM.png?alt=media&amp;token=3c26553c-6e40-4147-8e2a-246a6e769798" alt=""><figcaption></figcaption></figure>

2. Click on this icon.&#x20;

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FZXbkhWB5kiCGs6q8ZBmA%2FScreenshot%202024-11-05%20at%203.45.54%20PM.png?alt=media&amp;token=adafbddc-e6bc-4919-a9ea-0279e2b09ea0" alt=""><figcaption></figcaption></figure>

2. Click `EMBED DATA EXPLORER`

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FKCdV0thXvvvGK0meeYUB%2FScreenshot%202024-12-26%20at%203.15.09%E2%80%AFPM.png?alt=media&amp;token=79b91da4-3193-48de-b031-512c23cfdf4d" 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 flowId="87N0noilflFOBbCt05Eb" url="<https://app.arcade.software/share/87N0noilflFOBbCt05Eb>" %}


# Understanding a dataset's update information

Every dataset page on data.gov.sg shows dataset update information. This guide explains what each piece of information means and how to read it.

#### **What you'll see on a dataset page**

{% hint style="info" %}
Not every dataset shows all of these – agencies choose what applies to their dataset. Rows with no value are hidden.
{% endhint %}

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FKU1bxPPCT939GrX07Rv7%2Fimage.png?alt=media&amp;token=07f0fae1-ccf0-4e3e-9a22-2803d998818f" alt=""><figcaption></figcaption></figure>

#### Coverage date

`Data from ... / Up to ...` describes the period the records themselves cover, not when the file was published or last touched. A dataset can show the coverage range for a past date and still be actively maintained – check `Last updated` to see whether the file itself has changed recently.

#### **Last updated**

If you need to know whether a specific update has already happened rather than estimate it, check:

* **`Last updated`** – confirms when the file was actually ingested. Metadata-only updates like description and titles are not included in this timestamp.
* **`See history`** – the full list of past ingestion timestamps for file-based datasets.
* **`See API uptime`** – for API-based datasets, the live status page shows whether the pipeline is running as expected.

#### Cadence

Cadence (e.g. "Daily", "Every Monday", "Quarterly") is the rhythm the agency has committed to for this dataset – it's a schedule, not a live signal that an update has just happened. Use `Last updated` to confirm the most recent update.

#### **Next update expected**

Depending on the dataset, the expected update date could show:

* **Exact date and time** – e.g. "7 Jul 2026 at 9:00AM"
* **Exact date** – e.g. "7 Jul 2026"
* **Month only** – e.g. "Jul 2026"

Treat `Next update expected` as a best estimate, not a guarantee. Agencies work to a schedule, but a range of things – source system delays, data quality checks, public holidays – can push an update earlier or later than shown.&#x20;

If a dataset shows a month-only date, expect the actual update to land at some point in that month rather than on a specific day.

#### **A note on API-based datasets**

API datasets are pushed automatically by the agency's own systems. Data updates are not reflected in the last updated timestamp. Instead, you may check the uptime status page for more information on the API’s availability.


# 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FyCCkNWGCYHXGwBRVwrWT%2FScreenshot%202026-07-16%20at%206.06.33%E2%80%AFPM.png?alt=media&amp;token=34a6c59d-18e2-4878-9db5-ee972256127f" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FEi5itsGTO7e54UAJb754%2FScreenshot%202026-07-16%20at%206.07.27%E2%80%AFPM.png?alt=media&amp;token=1a8d2ec1-53da-4868-85ff-3254787b921d" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FZ6FMpWirHJOc7ZxC8rTo%2FScreenshot%202026-07-16%20at%206.08.48%E2%80%AFPM.png?alt=media&amp;token=a1a870fa-9c16-4d4c-bceb-24ab1b7d8e0b" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FsUrnCHF1KvNNtwVZsqKA%2FScreenshot%202024-02-20%20at%206.05.19%20PM.png?alt=media&amp;token=fd9c0ac7-44fa-461d-962b-66ac6121ed6b" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fetm7osFgZH5ZMKGvNRJx%2FScreenshot%202025-03-07%20at%2011.58.27%E2%80%AFPM.png?alt=media&amp;token=ace0cbf5-9fb2-4376-a908-cd319d4cb828" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FrTuhiYwq64quDRxLYVJQ%2FScreenshot%202025-03-08%20at%2012.01.05%E2%80%AFAM.png?alt=media&amp;token=f456541a-1617-4a5a-bfe3-03dfaab4892e" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FWS9mtXR39MbG6mWUr60W%2FScreenshot%202025-03-08%20at%2012.03.00%E2%80%AFAM.png?alt=media&amp;token=7e7d553b-4bde-49ee-bf88-223825fd7118" alt=""><figcaption></figcaption></figure>

4. Add a dataset and update the metadata.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F0aoqqghwVqTXlDffnu1q%2FScreenshot%202025-03-08%20at%2012.03.56%E2%80%AFAM.png?alt=media&amp;token=93380bad-1819-4820-a2eb-3b16bcb2a144" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FuNyKGAlg39INnTN6Mtst%2FScreenshot%202025-03-08%20at%2012.17.42%E2%80%AFAM.png?alt=media&amp;token=1fc1dad2-d24e-4e1f-9f65-6365ea6562a0" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FFlXehQUK1AWOuDzZa2K4%2FScreenshot%202025-03-08%20at%2012.10.22%E2%80%AFAM.png?alt=media&amp;token=04b8aec1-f6d1-4d15-a3ed-adb5023940ee" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FqsDaeVKYx8KV7BGBMxN7%2FScreenshot%202025-03-08%20at%2012.06.11%E2%80%AFAM.png?alt=media&amp;token=aebcc83c-9be1-4d07-838e-80a22cdcb7be" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fc8R5eLlErSWQMRZCEyQU%2FScreenshot%202025-03-08%20at%2012.15.14%E2%80%AFAM.png?alt=media&amp;token=47f34da5-f49d-4535-995e-8867dd8d7f9e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F1ro3t1m5SmhvlmVWIArr%2FScreenshot%202025-03-08%20at%2012.14.57%E2%80%AFAM.png?alt=media&amp;token=fea8970f-1307-4811-9197-6ace127de6e4" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Flb984No3ijbzNPhxtcDy%2FScreenshot%202025-03-08%20at%2012.11.09%E2%80%AFAM.png?alt=media&amp;token=f53602e7-5b68-4f63-bf11-0911e6675cae" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FnVdi9LnfSVPUkGA7q9AR%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.43.48%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=64bb1df0-a120-4d8e-b079-6ed85a3d2639" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FxO2UhSsR2a0qYL0AlQhm%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%209.02.40%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=aabffaa5-f269-4bf2-9277-d29f29719ea7" alt=""><figcaption><p>Datasets without descriptions are less understandable to users</p></figcaption></figure>

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fc8QojRwAqcz69m2GdfeV%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.44.06%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=fcb0544f-a754-4746-b303-68dc0e1250ca" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F021U7MTZCngU2k20ljJc%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%207.58.53%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=5aca4108-3abb-4188-8e04-5497a7228f8d" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FnVdi9LnfSVPUkGA7q9AR%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.43.48%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=64bb1df0-a120-4d8e-b079-6ed85a3d2639" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FvaPUPM98KQKLfrP6MyIa%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.06.27%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=7bbea793-ac60-4558-aa51-a06e7dbb0f87" alt=""><figcaption><p>Top 10 search queries related to the elections dataset</p></figcaption></figure>

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FEkuuXOe0PMFOJzAwBg09%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.04.27%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=5a3b6566-3d15-4373-a99f-43873f4d4d62" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FhmhpBj3IEAZoavN7mIsT%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.54.08%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=48087c3c-5ecb-47a9-8f8e-313ab1538593" alt=""><figcaption><p>Detailed titles help users understand what is in the dataset</p></figcaption></figure>

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2ForzbrWOQT960DBp2UAe2%2FCaptura%20de%20pantalla%202025-12-24%20a%20las%208.57.49%E2%80%AFa.%E2%80%AFm..png?alt=media&amp;token=6a8766ce-4d80-4be7-99a1-15e4072b8521" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FKdZtb4MX1Y6n0KufJPp4%2FScreenshot%202024-06-27%20at%2011.34.34%20AM.png?alt=media&amp;token=47cbb54a-2274-4696-90c1-c78258f87dd3" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F2u9goKYfjhp4wVOHvE5G%2FScreenshot%202024-06-27%20at%2011.45.10%20AM.png?alt=media&amp;token=63e0732f-1bc4-4fd3-821b-023c97183171" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FO3ELNJ11i9VLvfrI88lG%2FScreenshot%202024-06-27%20at%2011.39.53%20AM.png?alt=media&amp;token=5fee1887-3718-4490-8f64-88a182161ea3" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FYvyaOkrepCMt4iFT2qhT%2FScreenshot%202024-06-27%20at%2011.42.27%20AM.png?alt=media&amp;token=7dd6e2f5-9b00-4b1f-ba9e-ac71bf45699d" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FPgBOc4jKDtRuMaQGmmfV%2FScreenshot%202024-06-27%20at%2011.43.42%20AM.png?alt=media&amp;token=26c2c0ad-507d-4eb1-a11a-32bc86b162a7" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FmKhmGqQITViFSgBtEPIx%2FScreenshot%202024-03-20%20at%202.01.14%20PM.png?alt=media&amp;token=39a1018c-03c3-4155-91e5-cec8fbc46a81" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Flzx8Z9FTRtZG5E6WLGtg%2FScreenshot%202024-03-20%20at%202.01.47%20PM.png?alt=media&amp;token=ebc8ff8b-06f1-4781-a0a2-610d28d483f6" alt=""><figcaption></figcaption></figure>

3. Click on Update&#x20;

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FbywYrVwRAabVciUO7lmr%2FScreenshot%202024-03-20%20at%202.02.51%20PM.png?alt=media&amp;token=7445a9dc-046f-4821-b3a8-9f3fe90e0cbe" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FlFytEO561ggYGum0Ma5T%2FScreenshot%202024-03-20%20at%202.09.11%20PM.png?alt=media&amp;token=d6704cf8-d3bb-47d1-a633-f6123bf7a399" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FfO5qWsbBC2qyUUzeyiQs%2FScreenshot%202024-02-15%20at%2012.51.01%20PM.png?alt=media&amp;token=eec8946b-8a4f-4fbd-b0d3-6cbf78351827" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FkcFjHEcjg8jpgxRAqYq0%2FScreenshot%202024-02-15%20at%2012.56.53%20PM.png?alt=media&amp;token=f45d50f8-778e-49a1-b3d6-e67a43e82e8d" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FR3CZf89TqOZxs5vTOzUF%2FScreenshot%202024-02-15%20at%201.00.35%20PM.png?alt=media&amp;token=9c024cd5-42f6-4961-a70b-51f667b68bee" 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)


# How to create a chart

{% hint style="info" %}
Charts are only available for datasets with **a validated CSV file**. If you have not uploaded your data yet, see [How to publish data](/user-guide/for-data-owners/how-to-publish-data).
{% endhint %}

## Introduction

A chart gives people a quick read of your dataset before they download it or call the API. You create charts in the admin panel, on the same page you use to manage the dataset. Once the dataset is published, the chart appears on its public page.

You can create more than one chart per dataset.

## Before you start

**Your CSV must be uploaded and validated.** Until then the `Create chart` button is unavailable and the Charts section shows "No data available".

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F5RwQpTni08Ej3TTvXnRL%2Fimage.png?alt=media&amp;token=94211d35-e5b9-4d61-a3d1-76e54e21921f" alt=""><figcaption></figcaption></figure>

**One row per observation works best.** The editor reads your data down the rows, so each row should be a single observation with one column per variable. Data laid out with years or categories as separate columns needs reshaping before you upload it.

Harder to chart – each year is its own column:

| Region | 2023   | 2024   |
| ------ | ------ | ------ |
| North  | 14,384 | 15,120 |
| South  | 9,201  | 9,876  |

Ready to chart – one row per observation:

| Region | Year | Value  |
| ------ | ---- | ------ |
| North  | 2023 | 14,384 |
| North  | 2024 | 15,120 |
| South  | 2023 | 9,201  |
| South  | 2024 | 9,876  |

**Display Names fill in your axis labels.** The Display Names you set during validation are reused as axis labels, so `facility_size` becomes "Facility Size" without you retyping it. Setting good Display Names before you start saves work here.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FBvvPDSYeFsnr5Zq5mcTt%2Fimage2.png?alt=media&amp;token=cd2b4329-5f48-42d9-89cd-d5f121748c3d" alt=""><figcaption></figcaption></figure>

Your column types are detected when you upload, and they decide which controls the editor offers:

| Column contains                                        | Detected as | Control you get on the X-axis |
| ------------------------------------------------------ | ----------- | ----------------------------- |
| Numbers, with or without thousands separators (14,384) | Number      | Range                         |
| Dates in one of the six supported formats              | Date        | Range                         |
| Anything else – names, categories, codes               | Text        | Sort                          |

The Y-axis only accepts number columns, because it has to add up or average what you give it. Group by accepts any column type.

## Chart type

| Chart type  | Best for                                          | Example                        |
| ----------- | ------------------------------------------------- | ------------------------------ |
| Bar         | Comparing values across categories                | Applications by town           |
| Line        | Change over a time period                         | Monthly rainfall, 2010 to 2025 |
| Area        | Change over time where the overall volume matters | Cumulative registrations       |
| Stacked bar | How parts add up to a total                       | Intake by course, by year      |

New charts start as Bar. You can change the type at any point without losing your other settings.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F0XQc33AB4fUu6EqVSJlE%2Fimage3.gif?alt=media&amp;token=1f0f9193-13df-4a9f-83df-bf7ea731ec98" alt=""><figcaption></figcaption></figure>

## Step 1: Create your chart

1. In the admin panel, open your dataset and scroll down to the Charts section.
2. Click `Create chart`. The chart editor opens on the right, with a live preview beside it. The preview updates as you fill the form in.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FIZ9mbGVn6zvXDrRz60Xw%2Fimage4.gif?alt=media&amp;token=218515f6-03c4-424a-8060-4b366a954abf" alt=""><figcaption></figcaption></figure>

3. Choose a **Chart type**.
4. Enter a **Title (optional)**. The title gets auto-populated when you select the X-axis and Y-axis. You can overwrite it by filling in the Title field.
5. Under **X-axis**, choose the **Column** for the horizontal axis. This is usually a time period or a category. The **Label** fills in from that column's Display Name – edit it if you want different wording, or clear it to leave the axis unlabelled.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FRCjbHYu1nAheok9CyH83%2Fimage5.gif?alt=media&amp;token=f0cd9fd2-b614-4e35-9582-2f7ea8647fcc" alt=""><figcaption></figcaption></figure>

6. Under **Y-axis**, choose the **Column** for the vertical axis, then choose a **Measure**. The measure tells the editor what to do when several rows share the same X-axis value.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FrMizliTDjJKJ5Fr9pfUX%2Fimage6.gif?alt=media&amp;token=43402836-0d95-4bea-98f3-0b377db195eb" alt=""><figcaption></figcaption></figure>

| Measure  | What it plots                           |
| -------- | --------------------------------------- |
| Sum      | All values added together – the default |
| Count    | How many rows there are                 |
| Min      | The lowest value                        |
| Max      | The highest value                       |
| Average  | The mean of the values                  |
| Distinct | How many different values there are     |

7. To draw one series per category, choose a column under **Group by**.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FCFeBRsnCWmrnsFhLJ4Ci%2Fimage7.gif?alt=media&amp;token=81221e69-8635-44f0-9f5f-bca29bc514d0" alt=""><figcaption></figcaption></figure>

8. Check the preview, then click `Create`.

{% hint style="info" %}
For large datasets, **the editor previews your chart on a subset of the rows** and tells you so above the preview. **The saved chart uses the whole dataset.**
{% endhint %}

## Step 2: Check and publish

Your chart is saved to the dataset as soon as you click `Create`, but it only becomes visible to the public when the dataset is published. See [How to publish data](/user-guide/for-data-owners/how-to-publish-data).

To add another chart, click `Create chart` again. When a dataset has more than one chart, thumbnails appear below it – click one to switch between them.

To change a chart you have already saved, see [How to edit a chart](/user-guide/for-data-owners/how-to-edit-a-chart).

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FjPkcQmSIAfWcAHe97pSe%2Fimage8.gif?alt=media&amp;token=fd28283b-ee31-4830-a79d-7fbbfc69a483" alt=""><figcaption></figcaption></figure>

## Common issues

| What you see                                       | Likely cause                                 | What to try                                                                                      |
| -------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `Create chart` is unavailable, "No data available" | The dataset has no validated CSV             | Upload and validate a CSV first                                                                  |
| My column is missing from the Y-axis list          | The Y-axis only lists number columns         | Check the column holds numbers – empty cells and markers like "n/a" are fine, but text is not    |
| The preview stays empty                            | X-axis or Y-axis is not filled in            | Both are required before a chart can render                                                      |
| Dates are in the wrong order                       | The date column is not in a supported format | Reformat it to `YYYY`, `YYYY-MM`, `YYYY-MM-DD`, `YYYY-QN`, `YYYY-HN` or `YYYY-WNN` and re-upload |

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


# How to edit a chart

{% hint style="info" %}
This page covers changing a chart you have already saved. If you have not made one yet, start with [How to create a chart](/user-guide/for-data-owners/how-to-create-a-chart).
{% endhint %}

## Part 1: Open a chart for editing

1. In the admin panel, open your dataset and scroll to the Charts section.
2. If the dataset has several charts, click the thumbnail of the one you want to edit.
3. Click the edit icon above the chart. The editor opens on the right.
4. Change your settings, watching the preview, then click `Update` to save.&#x20;

{% hint style="warning" %}
`Cancel` or navigating away from the editor without saving discard everything you changed.
{% endhint %}

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F24AJFkE70Lxz9SKCrnhI%2Fimagea.gif?alt=media&amp;token=0df0fd98-1df9-4c9b-aaf0-29c5252158d3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Nothing is saved until you click `Update`. Closing the editor or navigating away loses your changes.
{% endhint %}

## Part 2: Order and hide values

Use this when your chart shows categories you do not want, or shows them in an unhelpful order.

The **Sort** control appears under the X-axis when that column holds text, and under **Group by** whenever a Group by column is selected.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FgpB8eLeAhVVNFnL0jOuQ%2Fimage2a.gif?alt=media&amp;token=3247e43d-3f72-4b81-90a9-79c99370954b" alt=""><figcaption></figcaption></figure>

**To reorder values,** open the Sort dropdown and pick an order:

* `A → Z` and `Z → A` for text
* `Low → High` and `High → Low` for numbers and dates
* `Manual order` when the sequence matters and is not alphabetical

In Manual order, drag handles appear beside each value.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FvXlPgCJyPnER3P4IpYhI%2Fimage3a.gif?alt=media&amp;token=a419a57a-169a-40f3-9eaf-c5c4a044ec51" alt=""><figcaption></figcaption></figure>

**To hide values,** click the eye icon beside any value in the Items list. `Hide all` and `Show all` toggle everything at once.

Hidden values disappear from the chart and its tooltips. Your published data is untouched – hiding is a display setting on this chart only, so people downloading the dataset or calling the API still get every row.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fs17uWhl4HlCMKyhYBljA%2Fimage4a.gif?alt=media&amp;token=1274d6c5-261c-4db4-b75b-55822ade7ed2" alt=""><figcaption></figcaption></figure>

## Part 3: Set a range

Use this when you want to show a slice of the data – the last five years of a series that goes back to 1960, for example.

The **Range** control appears under the X-axis when that column holds numbers or dates, and always under the Y-axis.

* Fill in **Min**, **Max**, or just one of them. Left empty, the chart scales itself to the data.
* `Reset to auto` clears both fields.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fepdnf8rC4HRlEFV2UK3s%2Fimage5a.gif?alt=media&amp;token=13b7c50f-8c90-465d-854b-6b5b91d3298e" alt=""><figcaption></figcaption></figure>

Date ranges accept the same six formats the platform uses, and are not case sensitive, so `2020-q1` works as well as `2020-Q1`:

| Interval    | Format       | Example    |
| ----------- | ------------ | ---------- |
| Annual      | `YYYY`       | 2015       |
| Monthly     | `YYYY-MM`    | 2015-01    |
| Daily       | `YYYY-MM-DD` | 2015-01-01 |
| Weekly      | `YYYY-WNN`   | 2015-W01   |
| Quarterly   | `YYYY-QN`    | 2015-Q1    |
| Half-yearly | `YYYY-HN`    | 2015-H1    |

## Part 4: Change labels and titles

The **Label** field under each axis controls what readers see, and is auto-filled based on the column's Display Name.

* Edit it freely – the label does not change the original data.
* Clear it to remove the axis label from the chart entirely.
* The **Title** at the top of the editor is the chart's heading on the public page.

With a Group by column, each series is named after its value. With several Y-axis columns, each series is named after its column. With a single Y-axis column and no grouping, the Y-axis label names the series.

{% hint style="info" %}
Adding a second Y-axis column clears the Y-axis label.
{% endhint %}

## Part 5: Chart more than one measure

Under Y-axis, `Add field` adds another column to the same chart.

* Each field has its own **Measure**, so you can sum one column and average another.
* Click `×` beside a field to remove it.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F4bjSit8PORDsREjCojkp%2Fimage6a.gif?alt=media&amp;token=df0a678a-6ec1-4617-a80e-1d3bd3b7d0be" alt=""><figcaption></figcaption></figure>

## **Part 6: Display settings**

These settings change how the chart looks, never what it plots. They sit under **Others**, below the axis sections.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FjVTlu9mIz58luwAdjf8h%2Fimage7a.gif?alt=media&amp;token=6b5eb9cb-a8f7-4a50-aef6-7df803b6a292" alt=""><figcaption></figcaption></figure>

### **Select colours**

A palette dropdown restyles every series at once. Each row shows the palette name and its colours.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FFX8WWvQJV4hHTbhgnkNv%2Fimage8a.png?alt=media&amp;token=5f4f26af-aa8c-4661-9373-224261f05c99" alt=""><figcaption></figcaption></figure>

| **Palette**   | **Colours** | **Use for**                                                                      |
| ------------- | ----------- | -------------------------------------------------------------------------------- |
| Default       | 11          | The platform's standard palette – leave as-is unless you have a reason to change |
| Brand Light   | 8           | Softer tones                                                                     |
| High Contrast | 10          | Charts that need to stay legible for readers with low vision or colour blindness |
| Sand Signika  | 9           | Warmer tones                                                                     |

When your chart has a single series, a row of swatches appears below the palette so you can pick one specific colour from it. Click the same swatch again to go back to the palette's first colour. The swatches disappear if you add a second Y-axis column or a Group by column, since the palette then has several series to colour.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fp0uGLtKaaxHAdex2QxJD%2Fimage9a.gif?alt=media&amp;token=a85790d7-da52-4a91-9437-eec45c053dbf" alt=""><figcaption></figcaption></figure>

Series colours stay put when you hide or reorder values, so a category keeps the same colour across every version of the chart you publish. Changing palette clears a single-colour choice.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FjhAAMc04OQgW4RdkIQk9%2Fimage10a.gif?alt=media&amp;token=ca968e30-b6f5-4da9-83fa-1b0061dd3708" alt=""><figcaption></figcaption></figure>

### **Show or hide the legend**

`Show legend` is on by default and names each series below the chart.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F2QAJc05LW2m05U7ZKOM2%2Fimage.png?alt=media&amp;token=a7225f9e-8a26-4a60-a6cc-0aa5737c0b06" alt=""><figcaption></figcaption></figure>

### **Show data labels**

`Show data labels` is off by default. Turning it on prints the value on each bar or point.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FmVDoazvWbvDMGJnvEx33%2Fimage14a.gif?alt=media&amp;token=ad7696d7-400d-47b2-8c58-f64f7fd3e41e" alt=""><figcaption></figcaption></figure>

### **Grid lines**

Two independent checkboxes: `Horizontal grid lines` is on, `Vertical grid lines` is off.

Horizontal lines help readers trace a bar or point across to the Y-axis, which is why they are on by default. Vertical lines are worth adding when the X-axis has few, widely spaced categories.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FYsR55bgeFDwBcTF8rSTi%2Fimage.png?alt=media&amp;token=a539615c-d0b2-475e-aacc-e4e48311db2c" alt=""><figcaption></figcaption></figure>

### **Line and area charts: dots and smooth lines**

Two checkboxes appear only for Line and Area charts.

* `Show dots` is on by default and marks each data point.
* `Smooth line` is off by default and curves the line through the points instead of joining them with straight segments.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FChpvH7iakyqZts8sIN2X%2Fimage.png?alt=media&amp;token=c6dc4431-38b3-4920-bb87-184a35865061" alt=""><figcaption></figcaption></figure>

### **Area charts: gradient**

`Gradient` appears for Area charts only and is off by default. It fades the fill from the series colour down to transparent.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FfWNUjZtIpJikZKluoveK%2Fimage11a.png?alt=media&amp;token=97c78637-064e-4fc2-9f11-f7e78191b4e1" alt=""><figcaption></figcaption></figure>

## **Part 7: Formatting**

Formatting changes how values are written on the chart. Your data is untouched, so anyone downloading the dataset still gets the raw values.

### **Number formatting**

Applies to the Y-axis, since that is where measured quantities sit.

**Decimal places** – Default leaves the chart to choose. This applies to tooltips and data labels only. Pick a number between 0 to 4 when precision matters.

**Prefix** and **Suffix** – add a unit around the value: e.g. `$` before it and/or `%` after it. Both apply to tooltips, data labels and axis ticks.

If a column is already typed as a percentage, `%` is applied for you. Entering your own suffix overrides it.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FUWw0OVD0hXdIrFK2Ao0Y%2Fimage.png?alt=media&amp;token=fff84c8e-7f2d-48b0-9dd5-dfb0b5678b8b" alt=""><figcaption></figcaption></figure>

### **Date formatting**

When your X-axis column holds dates, a dropdown offers readable versions of the format the editor detected in your data.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FFXYpKsvZv88ATBAF29mo%2Fimage.png?alt=media&amp;token=8a49cd82-cf77-446c-b5d4-db3d49b26f02" alt=""><figcaption></figcaption></figure>

| **Column format** | **Reads as**                 |
| ----------------- | ---------------------------- |
| `YYYY-MM`         | Jan 2000                     |
| `YYYY-MM-DD`      | 01 Jan 2000, or Jan 01, 2000 |
| `YYYY-QN`         | Q1 2000                      |
| `YYYY-HN`         | H1 2000                      |
| `YYYY-WNN`        | Week 1, 2000                 |

Default shows the raw values as they appear in your file. The format you pick applies to both the axis and the tooltips, so the two never disagree.

## Part 8: Manage your charts

**Download a chart as an image.** The download icon above the chart saves it as an image, for slides or documents.

**Delete a chart.** The delete icon removes it, after a confirmation. This cannot be undone, and the chart disappears from the public page as soon as the dataset is next published.

**Re-upload your CSV.** When you upload new data with the same column names, your charts are kept and re-render against the fresh figures. Extra columns are fine. If a column a chart depends on is missing from the new file, that chart breaks – its thumbnail is marked, it stops appearing on the public page, and you will need to edit it to point at a column that exists, or delete it. Other charts on the dataset are unaffected.

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


# Set up your dataset’s update schedule and reminders

Use Data freshness to tell data consumers when to expect your next update and set email reminders for the people responsible for keeping the dataset updated.

{% hint style="info" %}
Set this up for each dataset you manage. A schedule records when you expect to update the data. You still need to upload the data yourself or maintain the pipeline that sends it.\
\
Data freshness is currently available to a limited number of agencies. We expect a full release at the start of 2027.
{% endhint %}

## Open the Data freshness settings

1. Sign in to the [data.gov.sg admin panel](https://admin.data.gov.sg).
2. Select your dataset from the dataset list.
3. Scroll to `Data freshness`.

{% hint style="info" %}
The `Public preview` beside the form shows how the update information will appear to data consumers.
{% endhint %}

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FqYXpBJh3qN4mFLeQkk9h%2Fimage.png?alt=media&amp;token=33bd3c45-10fd-421d-a627-22f063e67708" alt=""><figcaption></figcaption></figure>

## Set up an update schedule

1. Under “How is this dataset updated?”, select:
   * `Manual upload` if you upload each new version yourself.
   * `API pipeline` if a pipeline sends new data to data.gov.sg.
2. Under “Schedule type”, select `Recurring` if you update the dataset regularly. Select `No schedule or ad-hoc` if there is no fixed schedule.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F19vGULO1th94f7AzuE71%2Fimage.png?alt=media&amp;token=d486cd76-7ce0-4cfc-985a-11036131d57d" alt=""><figcaption></figcaption></figure>

3. For a recurring schedule, use “Every” to enter how often you update the dataset.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F1JWWaoutcyCrGeBE1h77%2Fimage.png?alt=media&amp;token=8d8a3646-8877-4884-b92c-0311e9fa4652" alt=""><figcaption></figcaption></figure>

| Your update frequency | What to enter                             |
| --------------------- | ----------------------------------------- |
| `Daily`               | Every 1 day                               |
| `Weekly`              | Every 1 week, then choose the day or days |
| `Monthly`             | Every 1 month, then choose “On day”       |
| `Quarterly`           | Every 3 months, then choose “On day”      |
| `Annually`            | Every 1 year                              |

API pipelines can also use minutes or hours.

{% hint style="info" %}
For monthly schedules, if you choose a day that does not exist in a particular month, the schedule uses the last day of that month. For example, a schedule set to the 31st falls on 30 April.
{% endhint %}

## Set the next expected update

1. Review “Next expected update” and choose the date you expect to provide the next update. Check any date filled in for you.
2. If you have a specific deadline, select `Set a specific time` and enter the time in Singapore time (SGT). Otherwise, the deadline defaults to 11:59PM SGT.
3. Choose a “Display setting” for the public dataset page.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FFBz802rGoNeizQJ9udQ5%2Fimage.png?alt=media&amp;token=f387619d-84dc-4452-bcac-242c7dc921e3" alt=""><figcaption></figcaption></figure>

| Display setting     | What data consumers see                                                          |
| ------------------- | -------------------------------------------------------------------------------- |
| `Exact date`        | The expected update date                                                         |
| `Exact date & time` | The expected update date and time; available when you set a specific time        |
| `Month only`        | The expected month and year; available for schedules measured in months or years |
| `Hidden`            | **No next expected update date**; the recurring update frequency remains visible |

{% hint style="info" %}
For manual uploads, a next expected update date is required for schedules less frequent than daily. It is optional for daily uploads and API pipelines.
{% endhint %}

## Set up reminders for manual uploads

Reminders are available when you select `Manual upload` and a `Recurring` schedule.

1. In the “Reminder” section, turn on `Email notifications`.
2. Review “Admin notification emails”. Add the admins who should receive notifications, pressing Enter after each address. You can select `Same as contact emails` to use the dataset’s “Contact Emails” instead.
3. If someone else supplies the data, add their address under “Data provider emails”. This field is optional.
4. Under “Send first reminder”, choose how many hours, days or weeks before the deadline you want the first reminder.
5. To repeat reminders, select `Send follow-up reminders` and choose an interval.
6. Click `Publish changes` at the top of the page to save and apply the settings.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FU1asCmCDonX3wrD71CdY%2Fimage.png?alt=media&amp;token=ddf92711-91e3-41e8-99d6-cbad1249b639" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the form warns that the reminder is longer than your update cycle, shorten the lead time or use the suggested value.
{% endhint %}

## Set up alerts for an API pipeline

For pipeline updates, use alerts to flag missing data after an expected update.

1. Select `API pipeline` and a `Recurring` schedule.
2. In the “Failure alert” section, turn on `Email alerts on missed updates`.
3. Review “Admin notification emails”. Add the people responsible for responding to missed updates, or select `Same as contact emails`.
4. Under “Data provider emails”, optionally add the pipeline owners, operations team or engineering team.
5. Under “Alert me if no data arrives”, choose how long to wait after the expected update before alerting. This grace period allows for small pipeline delays.
6. To repeat alerts, select `Send follow-up alerts` and choose an interval.
7. Click `Publish changes`.

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FH18H4wXzJT2d4kj1zMY0%2Fimage.png?alt=media&amp;token=db364c72-f09d-4491-9003-86ee4f18cf65" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Datasets served as real-time APIs have different controls.
{% endhint %}

## Review and save your settings

Before clicking `Publish changes`, check:

* The schedule matches when your team can provide updates.
* The next expected date and any specific time are correct.
* The “Public preview” shows the detail you want to share with data consumers.
* Notification addresses and reminder or alert intervals are correct.

If you need to make edits to your schedule, return to your dataset’s “Data freshness” section, make the change, then click `Publish changes`.

## When you update your datasets before the schedule

If an “Update schedule” message appears after publishing, review the dates shown:

* Select `Keep [date]` if you still expect another update on the existing date.
* Select `Change to [date]` to use the proposed next update date.

### What data consumers see

Data consumers can see your recurring update frequency and, depending on your display setting, the next expected update date. The schedule describes your expected updates; “Last updated” records an actual data update for file-based datasets. Editing the schedule does not itself update the dataset’s contents.

For an explanation of the public information, see [Understanding a dataset’s update information](https://guide.data.gov.sg/user-guide/for-data-consumers/understanding-a-datasets-update-information).


# 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="/developer-guide/api-overview/how-to-request-an-api-key">How to request an API key</a></td></tr><tr><td></td><td><a href="/developer-guide/api-overview/how-to-use-your-api-key">How to use your API Key</a></td></tr><tr><td></td><td><a href="/developer-guide/api-overview/deleting-and-expiring-api-keys">Deleting and Expiring API Keys</a></td></tr><tr><td></td><td><a href="/developer-guide/api-overview/api-rate-limits">API Rate Limits</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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2F0sh1Lc61405MFaBQhShZ%2FScreenshot%202025-10-22%20at%202.25.23%E2%80%AFPM.png?alt=media&amp;token=2ff13a66-c49c-445b-894a-e63d9a0ffc6c" alt=""><figcaption></figcaption></figure>

3. Log into the site using your email

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fz70iWw83KRccg0RJRSp3%2FScreenshot%202025-10-22%20at%202.26.41%E2%80%AFPM.png?alt=media&amp;token=f26e2a50-4fa1-401b-b01a-4ffe61de2e65" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FxR1DsQy9vTP37ql7ut15%2FScreenshot%202025-10-22%20at%202.31.06%E2%80%AFPM.png?alt=media&amp;token=76c2295b-a899-430b-85a3-48939f72748d" alt=""><figcaption></figcaption></figure></div>

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

   <figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FiGiOUXVscMeOQguOrJl9%2FScreenshot%202025-10-22%20at%202.48.22%E2%80%AFPM.png?alt=media&amp;token=e963372d-473f-4275-97f1-67e7b7282258" alt=""><figcaption></figcaption></figure>

5\. Input your email address to receive an OTP

6\. Click on Create API Key

<figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FfOLLkLlJmaul1mEZDWVQ%2FScreenshot%202025-10-22%20at%202.36.06%E2%80%AFPM.png?alt=media&amp;token=06348db4-15c1-4ea5-bd1b-047bc2b6e9d3" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FvE2mPi5iHQHyrFrTGGrH%2FScreenshot%202025-10-22%20at%202.45.24%E2%80%AFPM.png?alt=media&amp;token=af953d89-d2f7-459a-8903-8b818c8e8f10" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FNC0TaQzxC2dcD58yOCKs%2Fapi_key_dashboard_successful.png?alt=media&amp;token=a801707c-73ab-4ff8-96b8-27e5ee2c8934" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FX7OJHdURB3uKH5z0Sw5D%2Fapi_key_dashboard_delete.png?alt=media&amp;token=e9179d65-b6a7-47fd-b376-62ea9f3917b0" alt=""><figcaption></figcaption></figure> <figure><img src="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2FOucYX3BhBuL4yRhfyc1r%2Fapi_key_dashboard_delete2.png?alt=media&amp;token=51d1fd21-00b2-41f1-910c-d01ff7e8c587" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fjdtnk4WsfWWU9r0a0ejG%2Fapi_key_dashboard_delete_success.png?alt=media&amp;token=7465b870-7fa3-4eaa-9f9b-56d1d5401bf4" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fvf50Ma2hpOevgbhKDJXj%2FScreenshot%202025-07-22%20at%2016.00.42.png?alt=media&amp;token=419cc82b-643f-43e1-87ca-44c34662123d" 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="https://2014478147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fksq6aNCGbng1fqooERfi%2Fuploads%2Fww0IXOtdE4yHm9RLCR7W%2FScreenshot%202025-08-07%20at%2010.52.50.png?alt=media&amp;token=34df84ee-8168-46fe-b1dc-06223a673cfa" 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="/developer-guide/dataset-apis/search-and-filter-within-dataset">Datastore Search</a></td><td>4</td><td>8</td><td>20</td></tr><tr><td><a href="https://ogp-vault.gitbook.io/ssic/">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"}}}}}}}}}}}
```


