Secure websites use HTTPS
Updated 9 months ago
IMDA (Info-communications Media Development Authority)This code can be used to test a sample API query. It retrieves the data catalogue of this dataset. For a complete guide on query parameters and syntax, please refer to the API documentation
import requests
dataset_id = "d_b2778a9e4532d57cb9201c68cb5f2238"
url = "https://api-open.data.gov.sg/v1/public/api/datasets/" + dataset_id + "/poll-download"
response = requests.get(url)
json_data = response.json()
if json_data['code'] != 0:
print(json_data['errMsg'])
exit(1)
url = json_data['data']['url']
response = requests.get(url)
print(response.text)
This dataset can be reused and cited in research publications.
09 Mar 2015
Free forever for personal or commercial use, under the Open Data Licence.