AI HTS Classification: How It Works vs Rule-Based Systems (2026)

AI classification uses an AI agent that searches over 220,000 CBP ruling precedents to classify products by understanding natural-language descriptions. Rule-based systems rely on brittle keyword matching and static decision trees that fail on novel products.

The Problem with Manual and Rule-Based Classification

The US Harmonized Tariff Schedule contains over 20,000 unique 10-digit codes, revised multiple times per year by the USITC. Every product entering the United States must be assigned one. Getting it wrong means overpaying duties, underpaying and facing CBP penalties, or shipment delays at the port.

Rule-based classification systems attempt to solve this with keyword matching: map "headphones" to 8518.30, "t-shirt" to 6109.10, and so on. This works for common products with obvious mappings. It fails everywhere else:

Manual classification by trained staff costs $100-200 per classification at consulting rates. Training a new classifier takes weeks to months. Licensed customs broker exams have pass rates in the single digits to ~30% per sitting.

How AI Classification Works (htsapi.dev Architecture)

htsapi.dev uses an agent-based architecture: an LLM with access to specialized tools, rather than a single-pass model. The agent decides which tools to use based on the query.

Step 1: Search CBP rulings for precedent

The agent searches over 220,000 CBP CROSS rulings for products substantially similar to the query. These are real classification decisions made by U.S. Customs and Border Protection -- the strongest available evidence for how a product should be classified.

Step 2: If ruling matches, follow CBP precedent

When the agent finds a relevant ruling, it follows the classification that CBP assigned. This is not the AI's opinion -- it's the government's actual decision on a similar product. The ruling number is cited in the response so users can verify it.

Step 3: If no ruling, reason from the tariff schedule

When no ruling exists, the agent reads the relevant sections of the HTS schedule, applies General Rules of Interpretation (GRI), checks chapter and section notes, and verifies the classification against adjacent headings to ensure it's the most specific match.

Step 4: Commit or ask for clarification

The agent commits a classification with a confidence level (high, medium, low). If the answer depends on an unknown attribute -- material composition, intended use, method of construction -- the agent asks a specific clarification question instead of guessing.

Product Description
|
LLM Agent
|
220K+ CBP Rulings HTS Schedule GRI / Legal Notes Census Duty Data
|
HTS Code + Confidence + Evidence

AI vs Rule-Based: Feature Comparison

CapabilityAI (htsapi.dev)Rule-Based Systems
Novel products Handles -- reasons from rulings + GRI Fails -- no keyword match
Natural language input Understands free-text descriptions Needs structured/templated input
CBP precedent Searches 220,000+ rulings No access to rulings database
GRI reasoning Applies GRI 1-6, essential character, principal use Uses keyword decision trees
When uncertain Asks specific clarification questions Returns "unclassified" or guesses silently
Accuracy (novel products) 69-76% exact 10-digit on a 54-product test (method) Not measured by us
Response time Typically 15-35 seconds Varies
Cost per classification $0.05-0.10 per classification Varies

What Makes CBP Ruling Evidence Different

Most classification tools generate an answer from a model. htsapi.dev finds the answer CBP already gave for a similar product. The difference is authority: a CBP ruling is a government agency's actual classification decision, not an algorithm's best guess.

Example: "Smart fitness ring with heart rate and SpO2"

The agent finds CBP ruling N306418 (Everion Fitness Monitor -- a wrist-worn device measuring heart rate, SpO2, blood pressure). CBP classified it under 9031.80.8085 (measuring/checking instruments, not elsewhere specified). The agent follows this precedent and cites the ruling in its response.

A rule-based system would try to match "ring" (jewelry?) or "heart rate" (medical?) and likely return the wrong code or no result.

Example: "Cat 6 LAN cables, 10 feet, unshielded"

The agent finds 5 CBP rulings for ethernet/LAN cables, all pointing to 8544.49.3080 (electric conductors, for a voltage not exceeding 80V, fitted with connectors). With multiple rulings converging on the same code, the agent commits with high confidence.

This is the key differentiator. When 5 CBP rulings agree on a code, you're not trusting an AI's opinion. You're trusting the pattern of how CBP has actually classified these products. The AI's job is to find and synthesize these rulings, not to guess.

When AI Classification Asks for Clarification

Rule-based systems either return a result or fail silently. They don't know what they don't know. AI classification identifies the specific attribute that would change the outcome and asks for it.

Real examples from the API:

The system only asks when the answer would change the HTS code. If the description is specific enough to classify unambiguously, it classifies directly.

Real-World Accuracy

On a 54-product test drawn from 2024+ CBP rulings (the source ruling hidden from the agent, 2 runs, 2026-10-01):

That is the only measurement of the current version. The accuracy page has the method and what high and medium confidence mean.

The remaining errors cluster in structurally hard categories:

Responses also carry Census Bureau duty figures (by country, if you give one): what importers paid in the latest published month, at the 10-digit line when there is enough trade, else the 6-digit subheading, with the last 3 months shown and a 12-month average as a footnote. They include Section 301/232 duties actually paid. Past imports, not the duty a specific shipment will owe. For the duty the schedule sets, GET /v1/hts/{code} (free with a key) gives the base rate. The API does not compute the additional Chapter 99 duties (Section 301, 232 and others).

No automated tool should be used for filing without human review. AI classification is a first-pass triage tool. It narrows 20,000+ codes to 1-3 candidates with evidence. A human reviewer verifies before filing.

Data Sources

SourceCoverageUpdate Frequency
USITC HTS Schedule Current USITC release -- Chapters 1-97, headings, subheadings, statistical suffixes; Chapter 98 not included Weekly
CBP CROSS Rulings Over 220,000 classification rulings spanning decades of decisions Weekly
US Census Bureau International Trade data -- duty collected, import values, rate-provision breakdown (historical averages) Latest 3 published months and a 12-month average (about 2 months behind)
3CE Legal Notes Section and chapter legal notes for tariff interpretation With schedule updates

Getting Started

Try free on the web: The htsapi.dev demo runs the full classification pipeline. Describe any product, see the HTS code with confidence level, CBP ruling evidence, and duty rates. No signup or API key required.

API integration: One endpoint, $0.05/classification at the 1,000-credit tier.

curl -X POST https://htsapi.dev/v1/classify \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description": "smart fitness ring with SpO2 sensor"}'

Response leads with an answer (the code at the depth your facts support, plus options and a question when a fact is missing), then candidates with confidence, CBP ruling citations, schedule duty and Census duty figures. See the developer integration guide for Python and Node.js examples, response schema, and error handling.

No credit card to start. The web demo is free. API credits are $10 for 100 classifications or $50 for 1,000. Credits never expire.

Frequently Asked Questions

How does AI classification differ from keyword matching?

Keyword matching maps specific words to HTS codes using static lookup tables. AI classification understands product descriptions in natural language, searches over 220,000 CBP rulings for precedent, applies the General Rules of Interpretation (GRI), and reasons about which heading best fits the product. This means AI handles novel products, ambiguous descriptions, and multi-material items that keyword systems fail on.

What happens when the AI can't classify a product?

Instead of returning "unclassified" or guessing silently, the AI identifies the specific missing attribute and asks a targeted clarification question. For example: "Is the fabric knit or woven?" or "Is the motor electric or combustion?" It only asks when the answer would change the resulting HTS code.

How current is the HTS data?

The system uses the current USITC HTS release (Chapters 1-97) and over 220,000 CBP CROSS rulings, both refreshed weekly. Census Bureau duty figures are the latest 3 months Census has published, about two months behind, with a 12-month average. Legal notes come from 3CE.

Can AI replace a customs broker?

No. AI classification is a first-pass triage tool, not a replacement for licensed customs brokers. It narrows 20,000+ possible HTS codes to 1-3 candidates with evidence and confidence levels. A human reviewer should verify the classification before filing. The value is speed: what takes a broker 15-30 minutes of research typically takes the API 15 to 35 seconds, giving the broker a strong starting point.

How accurate is AI HTS classification compared to rule-based systems?

On a 54-product test drawn from 2024+ CBP rulings (the source ruling hidden from the agent, 2 runs, 2026-10-01), htsapi.dev returned the exact 10-digit code 69-76% of the time, the right 6-digit subheading 83-89%, and the right 4-digit heading 85-91%. We have not measured rule-based systems on the same test.

Related guides