To subscribe to updates or changes for this API page, please visit the Email Subscription page, and select under Sections > Statistics.
Syntax:
https://eservices.mas.gov.sg/api/action/datastore/search.json?resource_id=<resource_id>&<parameters>….
Request Parameters
Parameter Name |
Description |
resource_id |
ID of the resource to be searched. |
filters |
Filters columns based on the specified values. =2016-04,2016-05,2016-06 |
between |
Filters columns based on a range. =2008-01,2010-12 |
query |
Returns records that contain the search string (only for fields with the “text” type). |
offset |
Number of rows to offset in the returned results. |
limit |
Maximum number of rows to return (default: 100). |
fields |
Comma separated string of fields to return. |
sort |
The returned results will be sorted by this field. |
Request Headers
Header Name |
Description |
User-Agent |
(Mandatory) String that identifies the application type, operating system, software vendor or software version of the requesting software user agent. Format: <product> / <product-version> <comment> |
Other Requirements
Your client needs to support the Server Name Indication (SNI) extension.
Response Values (in JSON)
Response Field |
Description |
offset |
Number of rows offset for the query. |
limit |
Maximum number of rows that is returned for the query. |
total |
Total number of rows matching the selected criteria. |
records |
List of matching results. |
timestamp |
(deprecated) This field is the current time expressed as the number of seconds that have elapsed since January 1,1970. Previously, this field represented the time the row was last updated, expressed as the number of the seconds that have elapsed since January 1, 1970. This field has been deprecated and will be removed in the near future. |
Examples
The following examples are based on the Exchange Rates data published on the MAS website.
Return the 10 most recent records
Return the rows for Jan, Apr and Jul 2015
[end_of_month] =2015-01,2015-04,2015-07 |
Return the first 100 rows between the years 2005 and 2015 for USD, Euro and Yen vs the Singapore Dollar
[end_of_month] =2005-01,2015-12&sort=end_of_month asc |
Return the next 100 rows between the years 2005 and 2015 for USD, Euro and Yen vs the Singapore Dollar
[end_of_month] =2005-01,2015-12&sort=end_of_month asc |