Documentation

HKMA provides APIs on:

To use the APIs

Syntax:

https://api.hkma.gov.hk/public/api_url?parameters…
for api_url, please refer to the “API Detailed Documentation” in each category.
for optional parameters, please refer to the “Parameters (Optional)” below.

Parameters (Optional)

Parameter Name Description
pagesize Maximum number of rows to return (default: 100).
The API will only return a maximum of 1000 rows. If you wish to retrieve more than 1000 rows, combine this with “offset” (refer to the examples below).
Format: pagesize=maximum number of return rows
Example: pagesize=10
offset Number of rows to offset in the returned results.
Format: offset=number of offset
Example: offset=50
fields To display selected field (Default: show all fields defined in each API's documentation)
Format: fields=field1,field2…
Example: fields=end_of_month

Notes: For API “Register of Securities Staff of AIs (eRegister)”, only applied to fields [name_en, name_tc, current_registration, business_address, conditions, registration_history, public_disciplinary_action]
column,filter column: To input the field name for parameter “filter”
filter: To input value which field is defined in number, date and string

Use quotation marks (“”) for string and comma (,) to separate the values if multiple

Format for number and date: column=field name&filter=field value1,field value2
Format for string: column=field name&filter=”field value1″,”field value2″
Example for number and date: column=end_of_month&filter=1997-01,1997-02
Example for string: column=address&filter=”15/F, central…”,”16/F, wai chai….”

Notes: Not applied to API “Register of Securities Staff of AIs (eRegister)”
choose,from,to choose: To input field name for parameter “from” and “to” (result will be greater or equal to lower value to less than or equal to higher value)
from: To input lower value which field is defined in number or date
to: To input higher value which field is defined in number or date
Format: column=field name&from=lower value&to=higher value
Example: choose=end_of_month&from=1997-01&to=1997-12

Notes: Not applied to API “Register of Securities Staff of AIs (eRegister)”
sortby,sortorder sortby: To input field name for sorting order. sortorder: To input sequence of the sorting
Format: sortby=field name&sortorder=asc|desc
Example: sortby=end_of_month&sortorder=desc

Notes: Not applied to API “Register of Securities Staff of AIs (eRegister)”

Response Values (JSON)

Response Field Description
success Identify if JSON is returned success or not
err_code Return error code
err_msg Return brief description
datasize Return the number of records
records To return matching results