HTS Code Lookup API for Customs Compliance (2026)

htsapi.dev provides a REST API that classifies products into 10-digit US HTS codes with CBP ruling evidence, Census effective duty rates, and GRI legal notes — built for compliance teams who need defensible classifications.

Last updated: April 2026

Why Customs Compliance Teams Need an HTS API

Manual HTS classification does not scale. A compliance team handling 500 SKUs spends weeks researching codes, cross-referencing USITC schedules, and verifying rulings. When product catalogs grow to thousands of items or new tariff provisions change overnight, spreadsheet-based processes break.

Misclassification is expensive. CBP can assess penalties up to four times the duty owed for negligent classification errors. Intentional misclassification triggers fraud penalties with no statutory cap. In FY2025, CBP recovered $192.77M through focused assessments and audits.

An API solves both problems. Every classification call returns a 10-digit HTS code plus the rationale behind it: which GRI rule was applied, which CBP ruling supports the classification, and what the effective duty rate is. That rationale is your audit trail — a documented, reproducible record that your classification followed established methodology.

What the API Returns

A single POST to /v1/classify with a product description returns:

One API call, complete picture. Other APIs return just a code. This API returns the code, the evidence, the duty rate, and the legal reasoning — everything a compliance team needs to justify the classification.

CBP Ruling Evidence — Not Just a Code

The API indexes 134,050 CBP CROSS rulings — the full history of classification decisions published by U.S. Customs and Border Protection. Before the LLM classifies a product, it searches this database for precedent.

This matters because a CBP ruling is the strongest evidence available for how customs classifies a specific product. It is not legally binding on other importers, but it shows how a government agency actually decided the question for a substantially similar product.

Example: Leather iPhone Case

Input: "leather case for iPhone 15, exterior genuine cowhide"

The API identifies heading 4202 ("trunks, suitcases, vanity cases ... and similar containers") via GRI 1 — the heading terms explicitly cover cases with an outer surface of leather. Result: 4202.31.6000.

Example: Rubber Examination Gloves

Input: "nitrile rubber examination gloves, powder-free, non-sterile"

The API finds ruling N342078, which classified substantially similar nitrile gloves under 4015.19.1110. The ruling provides an exact match — same material, same use, same subheading.

When no ruling exists for a product, the API still classifies using the GRI methodology and notes that no precedent was found. Transparency about evidence strength is part of the compliance value.

Census Bureau Effective Duty Rates

The statutory duty rate published in the HTS schedule is not what importers actually pay. A code listed as "Free" or "6.5%" may carry 30%+ in real duties once Section 301, Section 232, and reciprocal tariffs are applied.

The API returns effective duty rates from the US Census Bureau — calculated from actual import data (duties collected divided by customs value). This shows what CBP actually charged at the port, not what the schedule says in theory.

Rate provision breakdown

Each effective rate is decomposed into its component provisions:

ProvisionDescriptionExample Rate
MFN baseStandard duty rate for WTO members8.0%
Section 301Additional tariff on Chinese goods (Lists 1-4)+25.0%
Section 232Steel/aluminum national security tariffs+25.0%
ReciprocalCountry-specific reciprocal tariffsvaries
FTA programsPreferential rates under trade agreements-8.0%
ExclusionsProduct-specific tariff exemptions-25.0%

Country-specific rates

Pass country_of_origin in your API request for targeted rates. For example, a cotton t-shirt (6109.10) imported from China shows a 42.7% effective rate versus the 8% MFN statutory rate — the difference is Section 301 List 4a surcharges plus reciprocal tariffs stacked on top of the base duty.

Statutory vs. effective. Quoting the MFN rate to your CFO underestimates landed cost by 5x for many Chinese imports. Always use the effective rate for duty calculations.

Compliance Workflow Integration

The API fits into four stages of a compliance workflow:

Pre-classification

Screen products before customs filing. Run new SKUs through the API during product onboarding to flag duty exposure, identify potential Section 301 impacts, and catch classification issues before they become CBP audit findings.

Audit defense

Every API response includes the classification rationale, GRI rule applied, and CBP ruling citation. Store these responses as part of your compliance records. When CBP requests documentation during a focused assessment, you have a timestamped, reproducible classification with legal reasoning attached.

Duty calculation

Combine the HTS code with the Census Bureau effective duty rate for accurate landed cost estimates. The rate provision breakdown lets you model scenarios: what happens if a Section 301 exclusion expires, or if you shift sourcing to an FTA-eligible country.

Batch processing

Classify an entire product catalog via API. A 5,000-SKU catalog processes in hours, not weeks. Each result includes the same evidence package — ruling citation, GRI notes, effective rate — that a manual classification would require.

API Quick Start

Three ways to call the API. All return JSON with the HTS code, confidence level, ruling evidence, and duty rates.

Python Node.js curl
import requests

r = requests.post("https://htsapi.dev/v1/classify",
    headers={"X-API-Key": "YOUR_KEY"},
    json={"description": "stainless steel water bottle",
          "country_of_origin": "China"})
print(r.json())

The response includes hts_code, confidence, rationale, rulings (cited CBP rulings), census_duties (with rate provision breakdown), and legal_notes (Section/Chapter/Heading GRI notes). See the developer guide for the full response schema.

Pricing for Compliance Teams

PlanPer ClassificationCost
100 credits$0.10$10
1,000 credits$0.05$50
Volume pricing. At $0.05 per classification, a 5,000-SKU catalog costs $250 — roughly the cost of a single hour of customs broker time. Get an API key.

Frequently Asked Questions

Is the API compliant for customs filing?
The API provides classification guidance with CBP ruling citations and GRI rationale. It is not a licensed customs broker and does not file entries on your behalf. Compliance teams use API results as supporting evidence alongside their own review. The ruling citations and legal reasoning are designed to support defensible classifications.
How often is the HTS data updated?
HTS schedule data refreshes automatically when USITC publishes a new revision (approximately monthly). CBP rulings are indexed continuously as new rulings are published to the CROSS database. Census Bureau duty rate data is updated quarterly with the latest import statistics.
Can I use the API for audit defense?
Yes. Every API response includes the classification rationale, GRI rule applied, and CBP ruling citation when precedent exists. This creates a documented audit trail showing that your classification followed established CBP precedent and GRI methodology — exactly what auditors look for.
What is the difference between statutory and effective duty rates?
Statutory rates are published in the HTS schedule (e.g., "Free" or "6.5%"). Effective rates are what importers actually pay after all additional duties (Section 301, Section 232, reciprocal tariffs) and savings (FTA programs, exclusions) are applied. The Census Bureau effective rate is calculated from real import data — actual duties collected divided by actual customs value.
How does the API handle Section 301 tariffs?
When you pass a country_of_origin parameter, the API returns a full rate provision breakdown including Section 301 surcharges, Section 232 duties, reciprocal tariffs, FTA savings, and exclusions. For Chinese imports, this shows the combined effective rate (e.g., 42.7% effective vs 8% MFN base) with each provision identified by code and label.

Sources and External References

Related Guides