Classify
Classify a product
Get HS code suggestions for a product description, image, or listing URL.
POST
Requires the
classify:read scope.
Provide a description, an image_url, a product_url, or a combination
(image_url and product_url are mutually exclusive). Image and URL inputs
require a vision/url-enabled mode — see
GET /classify/modes.
string
What the product is, in plain language (up to 2000 chars). The more
specific — material, use, who it’s for — the better the suggestion.
string
A product photo: an
http(s):// URL, a gs:// Cloud Storage URI, or a
data:image/*;base64, data URL (max ~9 MB). Vision-enabled modes only —
a mode without image support returns 400.string
An
http(s):// product-listing URL (up to 2000 chars). The page is read
and the product identified from it (url-enabled modes only). The response
carries used_url: true and echoes what was read as url_description.string
required
ISO 3166-1 alpha-2 destination (case-insensitive) — determines which
tariff schedule the code is resolved against.
string
Classification mode slug. See
GET /classify/modes; omit for the
default mode.string
Product title (e.g. the listing name), up to 500 chars.
string
Brand name, up to 200 chars.
string
Your item reference, up to 100 chars.
string
Product type/category hint, up to 200 chars.
string
ISO alpha-2 origin, if known.
number
Unit price — some headings split on value.
string
ISO 4217 currency of
price (3 letters).string
A known partial code (2–10 digits, dots allowed) to narrow the search.
Response
Returns200 with the suggestions, or 422 when the input could not be
classified (success: false with unclassifiable: true and a reason).
boolean
Whether a classification was produced.
string
Empty on success; the failure reason otherwise.
string
The description you sent (or the derived one for image/URL requests).
string | null
The customs-style description the classifier worked from.
object | null
The best suggestion:
chapter, heading, subheading, and tariff
blocks (each { name, number, description }), plus confidence
(high | medium | low), score (0–1), and reasoning when the mode
produces one.array
All suggestions, best first. Each entry carries
code (the full tariff
code), country, the same chapter/heading/subheading/tariff
hierarchy blocks, score, confidence, and optional reasoning.string
The destination you asked for.
string
Present when the destination classifies via a shared schedule (e.g.
DE → EU): the schedule that answered.string
The mode that ran.
object | null
Which dataset version answered:
{ version, source, imported_at }.string | null
Log id of this request — appears in your classification history
(
GET /usage-history/classify).boolean
Present (
true) when an image was classified; image_description then
carries what the vision pass saw.boolean
Present (
true) when a product_url was read; url_description then
carries what the page said.array
Present when the mode consulted precedent rulings: citations of
{ ruling_number, code, subject, url }.