Home / API

The trade compliance API.

One endpoint to classify any product. One endpoint to price it across every market. REST, OpenAPI 3.1, SDKs for Node, Python, Go, Ruby.

One call

Classify a product in three lines.

Hand us a description, a photo URL, or a marketplace link. We return up to 3 candidate HS codes with confidence scores, multi-market tariffs, and the CBP CROSS rulings we used to reason about it. Median response time is 340 ms.

All systems operational · 99.97% uptime · status.hscodelab.com
# Classify a product from a text description
curl https://api.hscodelab.com/v1/classify \
  -H "Authorization: Bearer $HSCODELAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Wireless Bluetooth headphones, over-ear, with noise cancelling",
    "origin": "CN",
    "destination": "US"
  }'
Endpoints

Six endpoints. Everything else is a query.

POSTapi.hscodelab.com/v1/classifyClassify a product from text, image, or URL
GETapi.hscodelab.com/v1/hs/{code}Fetch full HS code details and tariffs
POSTapi.hscodelab.com/v1/calculateCompute landed cost for a shipment
GETapi.hscodelab.com/v1/rulingsSearch CBP CROSS rulings full-text
POSTapi.hscodelab.com/v1/classify/bulkClassify up to 1,000 products in one call
GETapi.hscodelab.com/v1/policiesPull latest Section 301 / TARIC / CBAM changes
Response

Structured, typed, predictable.

Every response is camelCased JSON with a stable shape. Flags surface Section 301, T86, CBAM, anti-dumping, and origin-marking requirements as enumerated constants — never free text.

OpenAPI 3.1 spec with generated TypeScript types
Idempotency keys on all POST endpoints
Webhooks for policy changes affecting your codes
SOC 2 Type II · GDPR · 30-day data retention
200 OK · application/json~340ms
{
  "request_id": "req_4f9a3b21c0d8",
  "candidates": [
    {
      "code": "8518.30.20",
      "confidence": 0.96,
      "description": "Headphones and earphones, with or without microphone",
      "tariffs": {
        "us": { "base": 0.049, "section_301": 0.25 },
        "eu": { "base": 0.0, "vat": 0.20 }
      },
      "cross_rulings": ["N324581"]
    }
  ],
  "flags": ["section_301_list_3", "t86_eligible"]
}
99.97%
Uptime · last 12 months
340 ms
Median classification latency
5,012
HS subheadings in the index

Built for the people who ship globally. HS codes, tariffs, and policy — all in one place.

© 2026 HSCodeLab. Built for the people who ship globally.

HSCodeLab is an information and decision-support tool. Results are for reference only and do not constitute legal, tax, or customs advice. Always verify classifications with a licensed customs broker before declaration.