RxTariffRx

For developers · Team plan

TariffRx API

Ask for the U.S. import duty on an HTS code from a country of origin and get back the same answer you see on TariffRx: every duty layer, the total and effective rate, fees, warnings, AD/CVD flags and the date of the data. Use it in your ERP, quoting tool or customs workflow.

An estimate, not a ruling

Estimate, not a ruling. TariffRx calculates duties from the HTSUS and official CBP, USTR and Federal Register sources, but the duty owed depends on the correct classification, origin, value and the facts of each entry. Confirm with a licensed customs broker, or ask CBP for a binding ruling. Every response includes this note in its disclaimer field.

Included in

Team, $399/month

Requests

10,000 a month

Per account, all keys together

Format

JSON over HTTPS

Version v1

1. Get a key

Sign in and open Dashboard → API. Name the key (for example, the system that will use it) and create it. The key is shown once, so copy it then. You can have up to 10 active keys and revoke any of them at any time.

Send the key with every request in the Authorization header. Keep keys on your server: don't put them in web pages or apps other people can see.

Authorization: Bearer trx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Calculate duty

GET /api/v1/duty

The duty for one shipment: the same calculation as the calculator.

ParameterWhat it is
htsRequiredHTS code, 8 or 10 digits, with or without dots: 6109.10.00 or 6109100012.
originRequiredCountry of origin, as a 2-letter code (see the list below).
valueRequiredCustoms value of the shipment in U.S. dollars, as a plain number: 20000.
quantityOptionalNumber of units. Needed for per-unit, per-dozen and per-pair duties. If you leave it out, those parts are not included and a warning says so.
dateOptionalEntry date, YYYY-MM-DD. Defaults to today (UTC). Scheduled changes switch on by date.
claim_preferenceOptionaltrue (default) or false. true means the goods meet the trade agreement's rules of origin and you claim its rate, as on the website. When a claim changes the duty, the response also shows the result if the goods don't qualify.
feesOptionaltrue (default) or false. Merchandise Processing Fee and, for ocean shipments, Harbor Maintenance Fee.
modeOptionalocean (default), air or truck. Only ocean shipments pay the Harbor Maintenance Fee.
weight_kgOptionalTotal net weight in kg, for per-kg duties.
freight, insuranceOptionalIn U.S. dollars, for the landed cost. They don't change the duty.
curl "https://tariffrx.com/api/v1/duty?hts=6109.10.00&origin=VN&value=20000&quantity=6000" \
  -H "Authorization: Bearer $TARIFFRX_KEY"

What comes back:

  • duties: each duty layer with its label, rate, dollar amount, Chapter 99 heading and legal reference.
  • total_duty and effective_rate_pct (total duty as a % of the customs value). Fees are not part of the duty total.
  • if_not_qualifying: when you claim a trade-agreement rate and it changes the duty, the total and rate if the goods don't qualify.
  • fees, total_fees, landed_cost and landed_cost_per_unit.
  • warnings: the same notes the website shows, such as exemptions applied or parts of a rate that could not be calculated.
  • possible_duties: Section 232 or 338 duties that may apply depending on end use or exact product, not included in the total.
  • adcvd: antidumping and countervailing duty orders that may cover the product. Flagged only, never calculated.
  • needs_review: true when a rate in the result is still being checked against official sources.
  • data.as_of: when the tariff data was last checked, and data.rates_for_entry_date: the entry date the rates are for.

Example response (computed live from today's data):

{
  "api_version": "v1",
  "hts": {
    "code": "6109.10.00",
    "description": "Of cotton",
    "name": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted — Of cotton",
    "path": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted",
    "general_rate": "16.5%",
    "special_rate": "Free (AU,BH,CL,CO,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
    "units": null,
    "page_url": "https://tariffrx.com/hts/6109.10.00"
  },
  "origin": {
    "code": "VN",
    "name": "Vietnam"
  },
  "request": {
    "value": 20000,
    "quantity": 6000,
    "weight_kg": null,
    "freight": 0,
    "insurance": 0,
    "mode": "ocean",
    "date": "2026-10-25",
    "claim_preference": true,
    "fees": true
  },
  "trade_agreement": null,
  "duties": [
    {
      "key": "mfn",
      "label": "Base duty (HTS 6109.10.00: 16.5%)",
      "rate_pct": 16.5,
      "amount": 3300,
      "chapter99": null,
      "legal_ref": "HTSUS Column 1 General",
      "status": null,
      "note": null
    },
    {
      "key": "s301-forced-labor",
      "label": "Section 301 forced-labor tariff (Vietnam 12.5%)",
      "rate_pct": 12.5,
      "amount": 2500,
      "chapter99": null,
      "legal_ref": "USTR final action, 91 FR 47318 (Jul. 28, 2026); HTSUS 9903.05.20–9903.05.84 and U.S. note 52",
      "status": "verified",
      "note": "Rates and exemptions checked against HTSUS Revision 21 (2026), Chapter 99, U.S. note 52."
    }
  ],
  "total_duty": 5800,
  "effective_rate_pct": 29,
  "if_not_qualifying": null,
  "fees": [
    {
      "key": "mpf",
      "label": "Merchandise Processing Fee (0.3464%, min $34.58, max $670.86)",
      "rate_pct": 0.3464,
      "amount": 69.28,
      "chapter99": null,
      "legal_ref": "19 CFR 24.23",
      "status": null,
      "note": null
    },
    {
      "key": "hmf",
      "label": "Harbor Maintenance Fee (0.125%)",
      "rate_pct": 0.125,
      "amount": 25,
      "chapter99": null,
      "legal_ref": "19 CFR 24.24",
      "status": null,
      "note": null
    }
  ],
  "total_fees": 94.28,
  "landed_cost": 25894.28,
  "landed_cost_per_unit": 4.32,
  "warnings": [],
  "possible_duties": [],
  "adcvd": {
    "flagged": false,
    "note": "Antidumping and countervailing duties are flagged, never calculated, and are not in the totals.",
    "orders": []
  },
  "needs_review": false,
  "notices": [],
  "data": {
    "as_of": "2026-10-24",
    "rates_for_entry_date": "2026-10-25",
    "schedule": "HTSUS 2026 Revision 21",
    "adcvd_orders_checked": "2026-10-24",
    "china_301_lists_built": "2026-10-23"
  },
  "disclaimer": "Estimate, not a ruling. TariffRx calculates duties from the HTSUS and official CBP, USTR and Federal Register sources, but the duty owed depends on the correct classification, origin, value and the facts of each entry. Confirm with a licensed customs broker, or ask CBP for a binding ruling."
}

3. Find an HTS code

GET /api/v1/hts/search?q=&lang=

Search the tariff schedule by product description or by the start of a code. lang is en (default), es, zh or vi, for searches in Spanish, Chinese or Vietnamese. limit is 1–50 (default 25).

curl "https://tariffrx.com/api/v1/hts/search?q=cotton%20t-shirts&limit=3" \
  -H "Authorization: Bearer $TARIFFRX_KEY"
{
  "api_version": "v1",
  "query": "cotton t-shirts",
  "lang": "en",
  "count": 3,
  "results": [
    {
      "code": "6111.20.20.00",
      "description": "T-shirts, singlets and similar garments, except those imported as parts of sets (239)",
      "path": "Babies' garments and clothing accessories, knitted or crocheted › Of cotton",
      "general_rate": "14.9%",
      "special_rate": "Free (AU,BH, CL,CO,IL,JO,KR, MA,OM,P, PA,PE,S,SG)",
      "units": "doz., kg",
      "page_url": "https://tariffrx.com/hts/6111.20.20.00"
    },
    {
      "code": "6109.10.00.04",
      "description": "T-shirts, all white, short hemmed sleeves, hemmed bottom, crew or round neckline, or V-neck with a mitered seam at the center of the V, without pockets, trim or embroidery (352)",
      "path": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted › Of cotton › Men's or boys'",
      "general_rate": "16.5%",
      "special_rate": "Free (AU,BH,CL,CO,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
      "units": "doz., kg",
      "page_url": "https://tariffrx.com/hts/6109.10.00.04"
    },
    {
      "code": "6109.10.00",
      "description": "Of cotton",
      "path": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted",
      "general_rate": "16.5%",
      "special_rate": "Free (AU,BH,CL,CO,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
      "units": null,
      "page_url": "https://tariffrx.com/hts/6109.10.00"
    }
  ],
  "data": {
    "schedule": "HTSUS 2026 Revision 21"
  },
  "disclaimer": "Estimate, not a ruling. TariffRx calculates duties from the HTSUS and official CBP, USTR and Federal Register sources, but the duty owed depends on the correct classification, origin, value and the facts of each entry. Confirm with a licensed customs broker, or ask CBP for a binding ruling."
}

4. Look up a code

GET /api/v1/hts/<code>

The description, base rates and duty by country of origin, the same as the HTS code pages: total added duty as a % of a $10,000 customs value, fees excluded, with the trade-agreement rate where one exists and the rate if the goods don't qualify. Use /duty for your own value, quantity and weight.

curl "https://tariffrx.com/api/v1/hts/6109.10.00" -H "Authorization: Bearer $TARIFFRX_KEY"
{
  "api_version": "v1",
  "hts": {
    "code": "6109.10.00",
    "description": "Of cotton",
    "name": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted — Of cotton",
    "path": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted",
    "general_rate": "16.5%",
    "special_rate": "Free (AU,BH,CL,CO,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
    "units": null,
    "page_url": "https://tariffrx.com/hts/6109.10.00"
  },
  "notes": [],
  "statistical_breakouts": [
    {
      "code": "6109.10.00.04",
      "description": "T-shirts, all white, short hemmed sleeves, hemmed bottom, crew or round neckline, or V-neck with a mitered seam at the center of the V, without pockets, trim or embroidery (352)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.07",
      "description": "Singlets, all white, without pockets, trim or embroidery (352)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.11",
      "description": "Thermal undershirts (352)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.12",
      "description": "Men's (338)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.14",
      "description": "Boys' (338)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.18",
      "description": "Men's (338)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.23",
      "description": "Boys' (338)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.27",
      "description": "Other (338)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.37",
      "description": "Underwear (352)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.40",
      "description": "Women's (339)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.45",
      "description": "Girls' (339)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.60",
      "description": "Women's (339)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.65",
      "description": "Girls' (339)",
      "units": "doz., kg"
    },
    {
      "code": "6109.10.00.70",
      "description": "Other (339)",
      "units": "doz., kg"
    }
  ],
  "basis": {
    "value": 10000,
    "quantity": 1,
    "fees": false,
    "date": "2026-10-25",
    "explanation": "Same basis as the /hts/<code> page: total added duty as a % of a $10,000 customs value, quantity 1, fees excluded, trade-agreement preference claimed where one exists. Per-unit and per-kg duties depend on your quantity and weight: use /api/v1/duty for your numbers."
  },
  "duty_by_origin": [
    {
      "origin": {
        "code": "KR",
        "name": "South Korea"
      },
      "trade_agreement": {
        "agreement": "KORUS FTA",
        "program": "KR",
        "rate": "Free"
      },
      "layers": [],
      "effective_rate_pct": 0,
      "rate_if_not_qualifying_pct": 16.5,
      "adcvd_flagged": false,
      "possible_duties": [],
      "needs_review": false
    },
    {
      "origin": {
        "code": "MX",
        "name": "Mexico"
      },
      "trade_agreement": {
        "agreement": "USMCA",
        "program": "S",
        "rate": "Free"
      },
      "layers": [],
      "effective_rate_pct": 0,
      "rate_if_not_qualifying_pct": 26.5,
      "adcvd_flagged": false,
      "possible_duties": [],
      "needs_review": false
    }
  ],
  "adcvd_orders": [],
  "data": {
    "as_of": "2026-10-24",
    "rates_for_entry_date": "2026-10-25",
    "schedule": "HTSUS 2026 Revision 21",
    "adcvd_orders_checked": "2026-10-24",
    "china_301_lists_built": "2026-10-23"
  },
  "disclaimer": "Estimate, not a ruling. TariffRx calculates duties from the HTSUS and official CBP, USTR and Federal Register sources, but the duty owed depends on the correct classification, origin, value and the facts of each entry. Confirm with a licensed customs broker, or ask CBP for a binding ruling.",
  "…": "one entry per origin country"
}

Limits

  • 10,000 requests per calendar month (UTC) per account, shared by all its keys. The count starts over at 00:00 UTC on the 1st.
  • Requests that fail with a 400 or 404 error don't count.
  • Up to 120 requests a minute per key.
  • Each successful response has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix time) headers. Your dashboard shows usage per key.
  • Need more? Email us.

Errors

Errors are JSON too, with a code you can check and a message you can show:

{
  "error": {
    "code": "monthly_limit",
    "message": "Your account has used all 10,000 API requests for this month. The count starts over on 2026-11-01 (UTC).",
    "limit": 10000,
    "used": 10000,
    "resets_at": "2026-11-01T00:00:00.000Z",
    "docs": "https://tariffrx.com/api-docs"
  }
}
StatusCodeMeaning
400bad_requestA parameter is missing or not valid. The message says which. Not counted.
401missing_key / invalid_key / revoked_keyNo key, a key we don't recognize, or a revoked key.
403plan_requiredThe account is not on the Team plan.
404not_foundThe HTS code is not in the current schedule. Not counted.
429monthly_limitThe account has used its 10,000 requests this month. resets_at says when the count starts over.
429rate_limitedMore than 120 requests a minute with one key. Wait for retry_after_seconds.
500 / 503server_error / unavailableA problem on our side. Try again shortly.

What's covered

Base (general) and trade-agreement rates from the Harmonized Tariff Schedule (2026 Revision 21); China Section 301; the 2026 forced-labor Section 301 tariff and its exemptions; Section 232 on metals, vehicles and parts, trucks and buses, wood products, semiconductors and pharmaceuticals; the Brazil and Nicaragua Section 301 actions; Section 338 on products of Canada; MPF and HMF. AD/CVD orders are flagged, not calculated. The API changes when the website does: there is one tariff engine.

Origin codes

AR Argentina · AU Australia · BD Bangladesh · BR Brazil · KH Cambodia · CA Canada · CL Chile · CN China · CO Colombia · CR Costa Rica · DO Dominican Republic · EC Ecuador · SV El Salvador · DE Germany (EU) · GT Guatemala · HT Haiti · HN Honduras · HK Hong Kong · IN India · ID Indonesia · IL Israel · IT Italy (EU) · JP Japan · JO Jordan · LA Laos · MY Malaysia · MX Mexico · MA Morocco · MM Myanmar · NP Nepal · NI Nicaragua · PK Pakistan · PA Panama · PE Peru · PH Philippines · PT Portugal (EU) · SG Singapore · KR South Korea · LK Sri Lanka · TW Taiwan · TH Thailand · TR Türkiye · GB United Kingdom · UY Uruguay · VN Vietnam

API access comes with the Team plan

10,000 requests a month, 1,000 tracked SKUs, up to 5 team members. 14-day free trial.