HS code classification workflow
What HS codes are
Harmonized System codes classify traded goods. The first 6 digits are international; the U.S. HTS adds digits up to 10.
Workflow
### Step 1: search for candidates
curl -H "x-api-key: $CG_API_KEY" \ "https://api.compliancegrid.ai/v1/hs/search?q=smartphone"
The search reads each tariff line together with its parent lines (a line that just says 'Of cotton' is searched with the heading above it), understands plurals and a few everyday words (laptop, jeans, solar panel), and ranks lines that contain all your words first. Chapters 98 and 99 (temporary and special provisions) are not searched, and lines without a rate of their own show their parent's rate. It is a keyword search, not a classifier: treat the results as candidates.
### Step 2: AI-assisted classification
curl -X POST https://api.compliancegrid.ai/v1/hs/classify \
-H "x-api-key: $CG_API_KEY" -H "Content-Type: application/json" \
-d '{"description": "Stainless steel kitchen knife set", "countryOfOrigin": "CN", "material": "stainless steel", "intendedUse": "kitchen cutlery"}'The response has up to three suggestions, each with htsNumber, scheduleBNumber, confidence (HIGH, MEDIUM or LOW) and reasoning. It does not include duty rates. The call needs the AI provider: it returns 503 AI_PROVIDER_UNAVAILABLE if the provider is down and 403 AI_DISABLED when AI is switched off (aiMode: "off" or the x-ai-mode: off header). Description is 3 to 500 characters.
### Step 3: verify
Check the suggestion against your product facts and the HTS. Review AI classifications by a person for high-value or complex goods; the classification is a suggestion, not a binding ruling.
Duty rates
GET /v1/hs/lookup/{htsNumber} returns the general, special and other rates for a code. For a full landed-cost calculation use POST /v1/tariffs/calculate.
Was this article helpful?