---
title: "HS code tariff API: find a commodity code and its duty rate | APIFor"
description: "Search US and UK commodity codes by description, read the duty rate for an origin and estimate landed cost. USITC HTS and UK Trade Tariff data, real responses."
canonical: "https://apifor.dev/guides/hs-code-tariff-api/"
---

**All guides All docs**

- [Guides](https://apifor.dev/guides/)
- HS code tariff API

# HS code tariff API: find a commodity code and its duty rate

GET /v1/tariffs/search?q=cotton t-shirts&market=US finds the commodity codes that match a description, and GET /v1/tariffs/code/{code}?market=US&origin=KR returns the general rate, the preferential rate for that origin and the notes that apply. US data is the USITC Harmonized Tariff Schedule and UK data is the UK Trade Tariff; search costs 2 credits and a rate lookup 5.

Last checked 1 Dec 2026. Service: [Import duty and landed cost API](https://apifor.dev/services/tariffs/). Reference: [endpoint docs](https://apifor.dev/docs/reference/tariffs/).

## HS codes and national codes

The Harmonized System is the international six-digit base. Each country extends it: the US uses 10-digit HTS numbers and the UK uses 10-digit commodity codes. Duty is set on the national code, so a tariff API has to know the market. Pass `market` as US, GB, EU, CA, KR, AU or ID.

In the example, 6109.10.00.12 is men's cotton T-shirts. The general US rate is 16.5% and the column 2 rate 90%. With `origin=KR` the response applies the US-Korea FTA and returns Free, with a note that the goods must meet the agreement's rules of origin.

## Request

Send your key in the `x-api-key` header. New accounts get 1,000 free requests after email verification; [the quickstart](https://apifor.dev/docs/quickstart/) takes about a minute.

GET curl

```bash
curl 'https://api.apifor.dev/v1/tariffs/code/6109.10.00.12?market=US&origin=KR' \
  -H 'x-api-key: YOUR_API_KEY'
```

Python

```
import os
import requests

r = requests.get(
    "https://api.apifor.dev/v1/tariffs/code/6109.10.00.12",
    params={
        "market": "US",
        "origin": "KR",
    },
    headers={"x-api-key": os.environ["APIFOR_API_KEY"]},
    timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
```

JavaScript

```
const res = await fetch("https://api.apifor.dev/v1/tariffs/code/6109.10.00.12?market=US&origin=KR", {
  headers: { "x-api-key": process.env.APIFOR_API_KEY },
});
const { data } = await res.json();
console.log(data);
```

## Response

This is the example recorded from the live API and published in our OpenAPI spec. Long lists and strings are shortened here. The full spec is at [api.apifor.dev/v1/openapi.json](https://api.apifor.dev/v1/openapi.json).

200 OK

```json
{
  "success": true,
  "data": {
    "market": "US",
    "code": "6109100012",
    "display_code": "6109.10.00.12",
    "description": "Men's (338)",
    "path": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted > Of cotton > Men's or boys' > Other T-shirts > Men's (338)",
    "declarable": true,
    "units": [
      "doz.",
      "kg"
    ],
    "origin": "KR",
    "applied": {
      "basis": "special program KR (US-Korea FTA)",
      "program": "KR",
      "rate": {
        "text": "Free",
        "kind": "free",
        "percent": 0
      }
    },
    "rates": {
      "general": {
        "text": "16.5%",
        "kind": "ad_valorem",
        "percent": 16.5
      },
      "column2": {
        "text": "90%",
        "kind": "ad_valorem",
        "percent": 90
      },
      "special_text": "Free (AU,BH,CL,CO,IL,JO,KR,MA,OM,P,PA,PE,S,SG)"
    },
    "preferential": [
      {
        "program": "AU",
        "name": "US-Australia FTA",
        "rate": {
          "text": "Free",
          "kind": "free",
          "percent": 0
        },
        "applies_to_origin": false
      },
      {
        "program": "BH",
        "name": "US-Bahrain FTA",
        "rate": {
          "text": "Free",
          "kind": "free",
          "percent": 0
        },
        "applies_to_origin": false
      }
    ],
    "rate_line": "61091000",
    "footnotes": [],
    "notes": [
      "The US-Korea FTA rate needs the goods to meet its rules of origin and a valid claim at entry.",
      "Chapter 99 additional duties (Section 232, Section 301, IEEPA and similar) are not included and can be large. Check them before you rely ..."
    ],
    "source": {
      "name": "USITC Harmonized Tariff Schedule",
      "revision": "2026 HTS Revision 23",
      "valid_from": "2026-11-10",
      "url": "https://hts.usitc.gov/search?query=61091000"
    },
    "disclaimer": "Estimate for planning only. Not a binding tariff, origin or valuation ruling. The importer or declarant is responsible for the commodity ..."
  },
  "meta": {
    "attribution": {
      "source": "U.S. International Trade Commission, Harmonized Tariff Schedule of the United States",
      "license": "Public domain (U.S. Government work, 17 U.S.C. 105)",
      "license_url": "https://www.usa.gov/publicdomain/label/1.0/",
      "source_url": "https://hts.usitc.gov/",
      "attribution_page": "https://catalog.data.gov/dataset/harmonized-tariff-schedule-of-the-united-states-2025",
      "notice": "Normalized to JSON; statistical lines inherit the rate of their 8-digit line."
    }
  }
}
```

## What the rate does not include

Chapter 99 additional duties (Section 232, Section 301, IEEPA and similar) are not included in the US rate and can be large; the response says so in `notes`. The source block gives the HTS revision and `valid_from` date, 2026 HTS Revision 23 from 10 Nov 2026 in the example.

Every answer is an estimate for planning. It is not a binding ruling, and the importer stays responsible for the code, value and origin.

## Landed cost in one call

`POST /v1/tariffs/landed-cost` takes market, code, origin, customs value, currency, shipping and insurance, and returns duty, import VAT and the total. The published UK example uses £1,000 of cotton T-shirts from China with £120 shipping and £15 insurance: duty at 12% on £1,135 is £136.20, import VAT at 20% is £254.24 and the landed total is £1,525.44, with every assumption listed. It costs 15 credits.

## Errors, limits and cost

A missing or wrong key returns 401, bad parameters return 400 with an `error.code`, and an unknown id returns 404. Rate limits are per key: a limited request gets 429 with a `Retry-After` header in seconds, so wait that long and retry. Calls that fail before any work starts are refunded. Details are in [errors](https://apifor.dev/docs/errors/) and [rate limits](https://apifor.dev/docs/rate-limits/).

This request costs 5 credits. Pricing is prepaid: 1,000 free requests once after email verification, then packs from $5 for 5,000 requests to $149 for 400,000. Credits never expire and there is no subscription. See [pricing](https://apifor.dev/pricing/).

## From an AI assistant

The same data is available as a tool on the APIFor MCP server at `https://mcp.apifor.dev/mcp`. Add it as a remote server in any client that supports remote MCP, sign in with OAuth or send your API key as a Bearer token, and ask in plain language. MCP calls use the same key and credits as REST. Setup steps are on the [MCP page](https://apifor.dev/docs/mcp/).

## Alternatives

- [USITC HTS search](https://hts.usitc.gov/): The official schedule, free. On 1 Dec 2026 its /reststop/search?keyword= endpoint returned JSON without a key. It covers the US only and leaves origin logic to you.
- [UK Trade Tariff API](https://www.trade-tariff.service.gov.uk/): Free and keyless. On 1 Dec 2026, /api/v2/commodities/6109100010 returned the commodity with its measures. It covers the UK only.

Facts about other services come from their own pages or a test call on 1 Dec 2026. Prices and limits change, so confirm them there.

## Source and licence

US: USITC Harmonized Tariff Schedule, public domain (17 U.S.C. 105). UK: contains public sector information licensed under the Open Government Licence v3.0 (HMRC and DBT, UK Online Trade Tariff).

Every APIFor response carries the same attribution in `meta.attribution`. All sources are listed on [sources and licences](https://apifor.dev/sources/).

## FAQ

### What is the difference between an HS code and an HTS code?

The HS code is the six-digit international base. The US HTS adds digits to make a 10-digit national code, and duty rates are set on that national code.

### Does the rate include Section 301 tariffs?

No. Chapter 99 additional duties are not included, and the response notes this. Check them separately before you rely on the rate.

### Is the result a binding ruling?

No. It is an estimate for planning. Ask the customs authority for a binding ruling when you need certainty.

## Related

- [Import duty and landed cost API](https://apifor.dev/services/tariffs/)
- [Endpoint reference](https://apifor.dev/docs/reference/tariffs/)
- [VAT rates API](https://apifor.dev/services/tax/)
- [Exchange rates API](https://apifor.dev/services/exchange-rates/)
- [Ports dataset](https://apifor.dev/ports/)
- [All guides](https://apifor.dev/guides/)

[Get a free API key](https://app.apifor.dev/register) [Use it from an AI client (MCP)](https://apifor.dev/docs/mcp/)
