Data.gov.sg
Search
K
Comment on page

API v2

There are two types of APIs on data.gov.sg.
  1. 1.
    Real-Time APIs:
Please find a list of our real-time APIs here
These are specific use-case APIs that allow you to query data such as weather and traffic conditions
  1. 2.
    Collection and Dataset APIs:
API documentation can be found below
These APIs allow you to query both collections and datasets, as well as to retrieve metadata and listings.
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)
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

Collections and Datasets APIs

All the following APIs use the following domain:
For example:

Collections listing

This API returns a list of all the collections on data.gov.sg
get
/v2/public/api/collections
Get collections

Collection metadata

This API returns the metadata of a single collection and the datasets within it
get
/v2/public/api/collections/{collectionId}/metadata
Get metadata for a collection

Datasets Listing

This API returns a list of all the datasets available on data.gov.sg
get
/v2/public/api/datasets
Get datasets

Dataset Metadata

This API returns the metadata of a single dataset
get
/v2/public/api/datasets/{datasetId}/metadata
Get metadata for a dataset
Last modified 3mo ago