API 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 NameDescription
pagesizeMaximum number of rows to return (default: 100).
The API will only return a maximum of 100 rows. If you wish to retrieve more than 100 rows, combine this with "offset" (refer to the examples below).
Format: pagesize=maximum number of return rows
Example: pagesize=10
offsetNumber of rows to offset in the returned results.
Format: offset=number of offset
Example: offset=50
fieldsTo display selected field (Default: show all fields defined in each API's documentation)
Format: fields=field1,field2….
Example: fields=end_of_month

Notes: For 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,filtercolumn: 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 "Register of Securities Staff of AIs (eRegister)"
choose,from,tochoose: 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 "Register of Securities Staff of AIs (eRegister)"
sortby,sortordersortby: To input field name for sorting order (apply to string and date field only).
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 "Register of Securities Staff of AIs (eRegister)"

Response Values (JSON)

Response FieldDescription
successIdentify if JSON is returned success or not
err_codeReturn error code
err_msgReturn brief description
datasizeReturn the number of records
recordsTo return matching results