Base URL

https://tradefacts.io

All API endpoints are served over HTTPS. HTTP requests are redirected to HTTPS.

Authentication

All API endpoints (except /request-access) require a valid API key passed in the X-API-Key request header. API keys are issued when you request a trial or subscribe to a plan.

curl
curl https://tradefacts.io/api/hts/0101.30.00.00 \
  -H "X-API-Key: your_api_key_here"

Requests without a valid API key return HTTP 401 with {"detail": "Invalid or missing API key"}.

Error Codes

StatusMeaning
200Success
401Missing or invalid API key
404HTS code not found in dataset
422Invalid request parameters
500Internal server error

HTS Code Lookup

GET /api/hts/{code} Auth required

Returns a single HTS record by its full code. The code can be passed with or without periods.

Path Parameters

ParameterTypeDescription
code required string Full HTS code, e.g. 0101.30.00.00 or 0101300000

Example Request

curl
curl https://tradefacts.io/api/hts/0101.30.00.00 \
  -H "X-API-Key: your_api_key"

Example Response

JSON
{
  "htsno": "0101.30.00.00",
  "indent": "1",
  "description": "Asses",
  "superior": null,
  "units": ["No."],
  "general": "6.8%",
  "special": "Free (A+,AU,BH,CL,CO,D,E,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
  "other": "15%",
  "footnotes": [
    {
      "columns": ["general"],
      "value": "See 9903.88.15.",
      "type": "endnote"
    }
  ],
  "quotaQuantity": null,
  "additionalDuties": null
}

Chapter Retrieval

GET /api/chapter/{chapter} Auth required

Returns all HTS records for a given chapter number. Useful for bulk sync of specific commodity categories.

Path Parameters

ParameterTypeDescription
chapter required string Two-digit chapter number, e.g. 01, 76, 99

Example Request

curl
curl https://tradefacts.io/api/chapter/76 \
  -H "X-API-Key: your_api_key"

Request Access

POST /request-access No auth

Submit a trial access request. We'll respond with an API key within one business day.

Request Body (JSON)

FieldTypeDescription
name requiredstringYour full name
company requiredstringCompany or organization name
email requiredstringEmail address for your API key delivery

Data Schema

All endpoints return records conforming to this schema. Fields are consistent across all chapters and will not change without advance notice to subscribers.

FieldTypeNotes
htsnostringFull HTS code with dots, e.g. 0101.30.00.00
indentstringHierarchy depth as normalized string integer, 0–9
descriptionstringCommodity description text
superiorstring|nullParent HTS code if applicable
generalstring|nullMFN (Most Favored Nation) duty rate
specialstring|nullPreferential rates with trade agreement codes in parentheses
otherstring|nullColumn 2 rate for non-market economies
unitsarrayUnit of quantity codes, e.g. ["No."], ["kg", "No."]
footnotesarrayApplicable endnotes with columns, value, and type
quotaQuantitystring|nullTariff-rate quota quantity if applicable
additionalDutiesstring|nullAdditional duties if applicable

Change Detection

The nightly pipeline diffs the incoming dataset against the previous version. When changes are detected, a change log entry is created. Tier 2 subscribers receive webhook push notifications.

JSON — Change Log Entry
{
  "timestamp": "2026-02-28T02:00:14Z",
  "changes_detected": 2,
  "changes": [
    {
      "htsno": "7606.12.30.30",
      "field": "general",
      "old": "3.0%",
      "new": "10.0%"
    }
  ]
}

Trade Agreement Codes

The special field contains preferential rates with trade agreement codes. Common codes include:

CodeAgreement
A, A+Generalized System of Preferences (GSP)
AUUS–Australia FTA
BHUS–Bahrain FTA
CAUSMCA (Canada)
CLUS–Chile FTA
COUS–Colombia TPA
ILUS–Israel FTA
JOUS–Jordan FTA
KRUS–Korea FTA (KORUS)
MAUS–Morocco FTA
MXUSMCA (Mexico)
OMUS–Oman FTA
PAUS–Panama TPA
PEUS–Peru TPA
SGUS–Singapore FTA

Ready to integrate?

Request a free trial key and be querying the API within the hour.