Dataset APIs
To find the datasetId, refer to the URL of dataset.
For this dataset:
https://beta.data.gov.sg/collections/522/datasets/d_11e68bba3b3c76733475a72d09759eeb/view
or
https://beta.data.gov.sg/datasets/d_11e68bba3b3c76733475a72d09759eeb/view
The datasetId is:
d_11e68bba3b3c76733475a72d09759eeb
Dataset Search
This API allows you to search for data within a dataset or scan through the rows of the dataset in a paginated manner.
Note that the following API uses the domain: https://data.gov.sg
For example:
https://data.gov.sg/api/action/datastore_search
If you're looking to query the following dataset: https://beta.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
Datasets Listing
This API returns a list of all the datasets available on data.gov.sg
Dataset Metadata
This API returns the metadata of a single dataset
Downloads
As Data.gov 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
This API initiates the download of a single dataset, with optional filtering by columns and rows. 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.
After initiating the download of a dataset, this endpoint below returns a link to access the dataset.
Last updated