TATariffAPI

TariffAPI

TariffAPI is a JSON API for HS codes, national tariff lines, and duty rates for the United States, the European Union, and the United Kingdom. It returns the rate, source, version, effective date, and match level in one response.

Base URLs

Direct:

https://api.matakupanlabs.com

RapidAPI:

https://tariffapi.p.rapidapi.com

Authentication

RapidAPI

Send the RapidAPI key and host headers:

curl --request GET \
  --url 'https://tariffapi.p.rapidapi.com/v1/tariff?hs=61091000&destination=US' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tariffapi.p.rapidapi.com'

Direct API

Send the key issued by Matakupan Labs:

curl --request GET \
  --url 'https://api.matakupanlabs.com/v1/tariff?hs=61091000&destination=US' \
  --header 'X-API-Key: YOUR_API_KEY'

Do not put API keys in browser code, mobile clients, or public repositories.

Endpoints

Method Path Purpose
GET/v1/hs/{code}List jurisdiction records for a 6, 8, or 10 digit HS code
GET/v1/search?q=...Search tariff descriptions
GET/v1/tariff?hs=...&destination=...Get one destination-specific tariff line

HS lookup

curl --request GET \
  --url 'https://tariffapi.p.rapidapi.com/v1/hs/610910' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tariffapi.p.rapidapi.com'

Parameters:

A response can contain jurisdictions, national_lines, match_level, and coverage_gaps.

Search

curl --request GET \
  --url 'https://tariffapi.p.rapidapi.com/v1/search?q=coffee&limit=5' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tariffapi.p.rapidapi.com'

Parameters:

Tariff lookup

curl --request GET \
  --url 'https://tariffapi.p.rapidapi.com/v1/tariff?hs=61091000&destination=US' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tariffapi.p.rapidapi.com'

Parameters:

Example response excerpt:

{
  "data": {
    "hs6": "610910",
    "requested_code": "61091000",
    "destination": "US",
    "national_code": "61091000",
    "description": "Of cotton",
    "duty_rate": "16.5%",
    "duty_pct": 16.5,
    "source": "USITC HTS 2026",
    "source_url": "https://hts.usitc.gov/",
    "version": "2026-11-25",
    "match_level": "national_8",
    "rate_type": "MFN",
    "effective_date": "2026-01-01",
    "qualifier": ""
  },
  "meta": {
    "request_id": "example",
    "disclaimer": "Independent data product from Matakupan Labs. Not legal advice.",
    "generated_at": "2026-11-28T00:00:00+00:00"
  }
}

Match levels

Errors

Errors use a JSON body with a detail.code and detail.message.

HTTP Code Meaning
400invalid_hs_codeCode is not exactly 6, 8, or 10 digits
400invalid_destinationDestination is not US, EU, or UK
401api_key_requiredNo API key supplied
401invalid_api_keyAPI key is invalid
403api_key_revokedAPI key was revoked
404hs_not_foundCode is not present in the public dataset
404coverage_gapThe HS6 parent is missing; use the 8 or 10 digit national code
404tariff_not_foundNo destination tariff row for the HS6 code
429quota_exceededMonthly quota exhausted

Plans

RapidAPI:

Overage is blocked. Quota headers may include X-Quota-Limit, X-Quota-Remaining, and X-Quota-Used.

Coverage and limitations

Public coverage is the United States, the European Union, and the United Kingdom. Indonesia is not part of the public beta.

Sources:

TariffAPI is an independent data product. It is not affiliated with any customs authority and does not provide legal, customs, or tax advice. Rates and classifications can change. Always verify the official source before making a customs decision.

Support

Email: fauzi@matakupanlabs.com

Sample and schema: https://github.com/FauziMatakupan/tariffapi-sample

Terms: https://tariffapi.dev/terms Privacy: https://tariffapi.dev/privacy Website: https://tariffapi.dev/

Versioning

The current API version is 2026-11. Breaking changes will be introduced under a new version path.