Secure websites use HTTPS
Updated 7 months ago
URA (Urban Redevelopment 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_91acddfb0ccc514a65a404206e69dad7"
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.
22 Jun 2014
Free forever for personal or commercial use, under the Open Data Licence.