Data Resource Details

Dataset
Interactive Data Dissemination Service for Trade Statistics
Data Providers
Census and Statistics Department
Data Category
Commerce and Industry
Format
JSON
API
Available
Update Frequency
Monthly

Description

Data Request Format: HTTP GET request method

 https://tradeidds.censtatd.gov.hk/api/get?lang=<param>&sv=<param,...>&freq=<param>&period=<start,end>&ttype=<param>&tm=<param>&coclass=<param>&co=<param,...>&ccclass=<param>&cc=<param,...>&codeclass=<param>&code=<param,...>

For annual data: https://tradeidds.censtatd.gov.hk/api/bb6578c6535a4269b76c5e7034a3b337/get?lang=en&sv=VCy&freq=A&period=2015,2017&ttype=ALL

For monthly data: https://tradeidds.censtatd.gov.hk/api/df5eaaf5f7fb498397408c731c5823e6/get?lang=en&sv=VCm&freq=M&period=201501,201712&ttype=ALL

Query string parameters:

  • lang: Language for the descriptions in the Data Response (JSON). Mandatory. One value only. Valid values are:
    • EN: English
    • TC: Traditional Chinese
    • SC: Simplified Chinese
  • sv: Statistics. Mandatory. Allow multiple values (e.g. sv=VCm,VCy). Valid values are:
    • VCm: Value (Monthly)
    • QCm: Quantity (Monthly)
    • VCy: Value (Annual/Year-to-date)
    • QCy: Quantity (Annual/Year-to-date)
  • freq: Frequency. Mandatory. One value only. Valid values are:
    • A: Annual
    • M: Monthly
  • period: Period. Mandatory. Range of values (e.g. period=2015,2017 queries for Year 2015 to 2017). Valid value formats are:
    • YYYY,YYYY: For Annual, e.g. 2015,2017
    • YYYYMM,YYYYMM: For Monthly, e.g. 201701,201712
  • ttype: Trade Type. Mandatory. One value only. Valid values are:
    • 1: Imports
    • 2: Domestic exports
    • 3: Re-exports
    • 4: Total exports
    • 5: Total trade
    • ALL: All
  • tm: Transport Mode. Optional. One value only. Nil is default or unspecified. Valid value is:
    • Y: Yes
  • coclass: Origin class. Optional. One value only. Nil is default or unspecified. Valid values are:
    • R: Region
    • C: Country/Territory
  • co: Origin. Optional. Allow multiple values (e.g. co=CN,US). Nil is default or unspecified.
  • ccclass: Consignment class. Optional. One value only. Nil is default or unspecified. Valid values are:
    • R: Region
    • C: Country/Territory
  • cc: Consignment. Optional. Allow multiple values (e.g. cc=CN,US). Nil is default or unspecified.
  • codeclass: Commodity Classification. Optional. One value only. Nil is default or unspecified. Valid values are:
    • HKHS
      • HKHS2: 2-digit (division)
      • HKHS4: 4-digit (heading)
      • HKHS6: 6-digit (subheading)
      • HKHS8: 8-digit (code)
    • SITC
      • SITC1: 1-digit (section)
      • SITC2: 2-digit (division)
      • SITC3: 3-digit (group)
      • SITC5: 5-digit (item)
    • EUC
      • EUC: End-Use Category
  • code: Commodity codes. Optional. Allow multiple values (e.g. code=06,07). Nil is default or unspecified.
    • For HKHS and SITC, refer to Annex 2 of the Documentation for valid values. Max 20.
    • For EUC, no need to specify.

HTTP Response:

  • The response is encoded in UTF-8
  • Refer to the Documentation for details.
loading
Loading...

Additional Information of Data Resource

Date Created
2018-11-15
Date Published
2018-12-14
Content Language
English, Traditional Chinese, Simplified Chinese

Access to save data on the browser is disabled, some functions may not be available.

Please enable the access to unlock the full functionality of the website.