Tariff Code & Duty Lookup API: US HTS (UK coming soon)
Coming soon to the StoreSend a US HTS code and get the official description hierarchy, the general (MFN) duty rate, preferential rates, linked Chapter 99 references and units, with a source link. No code yet? Send a plain product description and get up to 5 candidate codes from the official USITC search. Built for AI agents, customs brokers and e-commerce teams who need a sourced duty rate, not a guess. UK Trade Tariff (with VAT and anti-dumping duties) is coming soon: it is built and tested, and switches on once this deployment holds HMRC production API credentials. Until then a UK request fails at once and costs nothing.
Pricing (pay per event): $0.005 per code lookup (code-lookup) and $0.005 per description search however many candidates it returns (code-search). Bad input, unknown or non-declarable codes, searches without results, UK requests (for now) and source outages fail in seconds and cost nothing. The data is free from USITC (hts.usitc.gov) and HMRC (trade-tariff.service.gov.uk); you pay for the one-call summary across both tariffs and the hosted API.
Questions agents ask
- “What US import duty applies to kids' bicycles (wheels under 63.5 cm) from Vietnam? Give the HTS code and cite the source.”
Example
Input
{ "code": "8712.00.15", "market": "US" }Output
{
"schema_version": "1",
"match_type": "code",
"query": null,
"candidate_rank": null,
"market": "US",
"code": "87120015",
"code_formatted": "8712.00.15",
"description": "Bicycles having both wheels not exceeding 63.5 cm in diameter",
"hierarchy": [
{ "code": "8712.00", "description": "Bicycles and other cycles (including delivery tricycles), not motorized:" },
{ "code": "8712.00.15", "description": "Bicycles having both wheels not exceeding 63.5 cm in diameter" }
],
"declarable": null,
"general_rate": "11%",
"rate_line": "8712.00.15",
"column_2_rate": "30%",
"special_rates_text": "Free (A+,AU,BH,CL,CO,D,E,IL,JO,KR,MA,OM,P,PA,PE,S,SG) 5.5% (JP)",
"preferential_rates": [
{ "rate": "Free", "applies_to": ["A+", "AU", "BH", "CL", "CO", "D", "E", "IL", "JO", "KR", "MA", "OM", "P", "PA", "PE", "S", "SG"] },
{ "rate": "5.5%", "applies_to": ["JP"] }
],
"preferential_rates_total": 2,
"additional_duties": [],
"temporary_reductions": [
{
"reference": "9902.17.07",
"rate": "Free",
"description": "Bicycles each with no seat, no seat tube and no seat stay, designed to be pedaled by a user in a standing position only, such bicycles having both wheels not exceeding 63.5 cm in diameter (provided for in subheading 8712.00.15)."
}
],
"vat": [],
"units": [],
"origin_country": null,
"edition": "2026 HTS Revision 22",
"source_url": "https://hts.usitc.gov/search?query=8712.00.15",
"provided_by": "Bosco Labs (boscolabs.dev)",
"api_url": "https://hts.usitc.gov/reststop/exportList?from=8712&to=8712.99.99.99&format=JSON",
"attribution": "Source: Harmonized Tariff Schedule of the United States (HTS), U.S. International Trade Commission, hts.usitc.gov. A U.S. Government work, not covered by copyright in the United States. Text and rates reproduced as published (HTML tags removed); not endorsed by USITC.",
"warnings": [
"Chapter 99 measures applied by note lists (Section 301 duties on goods of China, Section 232, IEEPA and other temporary duties) are usually not linked to the line in the HTS data, so additional_duties can be incomplete. Check HTS Chapter 99, subchapter III and IV.",
"temporary_reductions (HTS 9902) apply only to the goods each one describes, within their effective dates; check eligibility before using that rate instead of general_rate."
],
"disclaimer": "Not a binding classification ruling. Reference data only, not legal advice; the importer is responsible for the correct HTS classification. Binding rulings: U.S. Customs and Border Protection (CBP).",
"as_of": "2026-11-06",
"retrieved_at": "2026-11-06T08:58:34+00:00",
"duration_seconds": 0.76
}What you get
| Field | Type | Meaning |
|---|---|---|
schema_version | string | Output schema version, "1". |
match_type | string | "code" for a code lookup, "search_candidate" for a candidate returned by a description search. |
query | string | null | The product description searched for; null for a code lookup. |
candidate_rank | integer | null | 1-5 rank of a search candidate (US: ranked by Bosco Labs from the USITC hits; UK: the search's own relevance order); null for a code lookup. |
market | string | Importing market whose tariff was read. |
code | string | The commodity code, digits only (US 8 or 10, UK 10). |
code_formatted | string | The code as the source writes it (US 8712.00.15.10, UK 8712003010). |
description | string | null | Official description of this line, as published (often short, like "Other": read it with hierarchy). |
hierarchy | array | Official descriptions from the top (UK chapter, heading, ...; US heading level) down to this line: [{code, description}]. code is null for US sub-headers without a number. |
declarable | boolean | null | UK: true (only declarable codes are returned). US: null (not stated by the HTS data). |
general_rate | string | null | General / MFN duty rate as published: US column 1 General (e.g. "11%", "Free", "2.4¢/kg"); UK third-country duty for all origins (e.g. "14.00%", "£26.00 / 100 litre (hl)"). |
rate_line | string | null | The line that carries general_rate (US 10-digit statistical lines inherit the rate of their 8-digit line). |
column_2_rate | string | null | US column 2 rate (goods of Cuba, North Korea, Belarus, Russia). null for UK. |
special_rates_text | string | null | US column 1 Special text as published, e.g. "Free (A+,AU,...) 5.5% (JP)". null for UK. |
preferential_rates | array | Preferential rates. US: [{rate, applies_to: [program codes]}] parsed from special_rates_text. UK: [{rate, applies_to: [area], measure_type, quota_order_number}] for tariff preferences, preferential quotas, suspensions and other non-general duty measures. Filtered when originCountry is given; UK without originCountry lists at most 10 (see preferential_rates_total). |
preferential_rates_total | integer | How many preferential rates apply before the 10-row cap (UK without originCountry); equals the list length otherwise. |
additional_duties | array | [{reference, type, rate, applies_to, additional_code, description}]. US: Chapter 99 references from footnotes and Chapter 99 lines whose text names this code (9903 additional duties; 9902 reductions are in temporary_reductions). UK: anti-dumping, countervailing, additional duties and excise measures, with additional codes (e.g. company-specific anti-dumping). rate null = depends on conditions; see source_url. |
temporary_reductions | array | US only: HTS 9902 temporary duty reductions whose text names this code, [{reference, rate, description}]. Each applies only to the narrower goods it describes, within its effective dates; check eligibility before using its rate. Empty for UK. |
vat | array | UK VAT measures [{rate, additional_code, description}] (e.g. 20.00%, or 0.00% with additional code VATZ). Empty for US. |
units | array | Units of quantity: US units (e.g. "No.", "kg"); UK supplementary unit (e.g. "items (p/st)"). |
origin_country | string | null | The originCountry used for filtering (ISO alpha-2), or null. |
edition | string | null | US HTS edition read (e.g. "2026 HTS Revision 22"); null for UK (the API serves today's tariff). |
source_url | string | Official page for this code (hts.usitc.gov search or trade-tariff.service.gov.uk commodity page). |
provided_by | string | "Bosco Labs (boscolabs.dev)". |
api_url | string | The official API call the data came from. |
attribution | string | Required source notice: USITC (U.S. Government work) or UK Open Government Licence v3.0 attribution. |
warnings | array | Limits that apply to this row, e.g. Chapter 99 measures not linked in the US data, UK import controls not listed, the candidate notice. |
disclaimer | string | Not a binding classification ruling; where to get one (CBP ruling, HMRC Advance Tariff Ruling). |
as_of | string | Date (YYYY-MM-DD, UTC) the tariff was read; rates are those in force at the source on that day. |
retrieved_at | string | ISO-8601 time of retrieval (UTC). |
duration_seconds | number | Seconds from start of the run to this row. |
Use with AI agents (MCP)
Add this URL to your MCP client (Claude, Cursor, VS Code, ...) to load the Actor as a tool through the Apify hosted MCP server. It signs you in with OAuth or accepts Authorization: Bearer <APIFY_TOKEN>. It works once the Actor is live on the Apify Store.
https://mcp.apify.com?tools=bosco_labs/tariff-lookup
For “What US import duty applies to kids' bicycles (wheels under 63.5 cm) from Vietnam? Give the HTS code and cite the source.” the agent passes:
{ "query": "bicycle", "market": "US", "originCountry": "VN" }
one 2-5 KB JSON item per code, stable snake_case fields, rates exactly as published (strings like "11%", "Free", "£26.00 / 100 litre (hl)"), null for unknown, a source link, the API call, the licence notice and the disclaimer per row. A US lookup takes about 1 s; a search 1-3 s. Each request has a 20-second limit with two retries.
Or call the Apify API: POST https://api.apify.com/v2/acts/bosco_labs~tariff-lookup/run-sync-get-dataset-items with the input as JSON body. Cost: $0.005 per lookup or search.
HTTP API
Also on the Bosco Labs HTTP API (beta, test mode): same input and same rows as the Actor, $0.005 per code lookup or code search (US) from prepaid credits (max 1 code or 5 candidates per call). Get a key with a $0.50 free trial; see prices and limits.
curl https://api.boscolabs.dev/v1/tariff-lookup \
-H "Authorization: Bearer $BOSCO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "bicycle", "market": "US", "originCountry": "VN"}'
Input fields
| Field | Type | Meaning |
|---|---|---|
code | string | A US HTS code (8 or 10 digits, e.g. "8712.00.15" or "8712001510") or a UK commodity code (10 digits, e.g. "8712003010"; UK coming soon). Dots and spaces are ignored. 4 or 6 digits (or a UK code that is not declarable) fail for free with a list of the codes under it. Empty = use query instead. Charged as one code-lookup. |
query | string | Plain product description, 2-200 characters, e.g. "bicycle" or "cotton t-shirt". Returns up to 5 candidate codes from the official tariff search (USITC or UK Trade Tariff), each with its rates. Candidates are not a classification: confirm them. Empty = use code. Charged as one code-search however many candidates come back. |
market | string | Which tariff to read: "US" (Harmonized Tariff Schedule, USITC) or "UK" (UK Global Tariff, HMRC; "GB" is the same). UK is coming soon: until this deployment has HMRC production API credentials, UK requests fail at once and cost nothing. Empty = "US". |
originCountry | string | ISO 3166 alpha-2 code of the country the goods come from, e.g. "CN" or "DE". UK: preferential rates, additional duties and VAT are filtered to measures that apply to that country. US: preferential programs are filtered to ones named by that country code (plus USMCA for CA/MX), and column 2 and China Section 301 notes are added. Empty = all rates, unfiltered. |
Sources, licence and limits
Is this a classification? No. A code lookup returns what the official tariff says for the code you give. A search returns the official search engine's hits (for the US, ranked by us: lines under a heading that matches your words first). Neither is a binding ruling; the importer or declarant remains responsible. Get a binding ruling from U.S. CBP or an HMRC Advance Tariff Ruling.
Does it give the total duty I will pay? No. It gives the rates the tariff publishes. It does not apply rules of origin, quotas, end-use relief, valuation or the duty calculator.
US: are Section 301, 232 and IEEPA tariffs included? Only where the HTS data links them to the line: Chapter 99 footnotes on the line and Chapter 99 lines whose text names the code. Duties applied through Chapter 99 note lists (most Section 301 China lists, Section 232 derivatives, IEEPA reciprocal tariffs) are not linked per line in the HTS data, so every US row says so in warnings. Check HTS Chapter 99 for goods of China and for steel, aluminium and autos.
When does UK work? As soon as this deployment holds HMRC Trade Tariff production API credentials (HMRC asks production users to authenticate; the keyless host is for trying the API). Until then UK requests fail in a second with that message and cost nothing.
UK: what will be left out? Import controls and prohibitions (licences, certificates) are counted in warnings, not listed. Excise and some company-specific anti-dumping rates depend on conditions and come back with rate: null; follow source_url. Export measures, quotas' balances and Northern Ireland (XI) tariffs are not included.
How fresh is it? Each run reads the current US HTS edition (named in edition) live. UK responses are cached for up to 24 hours, as HMRC recommends ("It is recommended you cache requests for 24 hours"): within a run on Apify, and per server process in the Bosco Labs API.
Where does the data come from, and may I reuse it? USITC's HTS REST API (a U.S. Government work, public domain in the US) and HMRC's UK Trade Tariff API (Open Government Licence v3.0: keep the attribution text when you republish UK data). USITC's disclaimer says the site is "only intended to be general summary information to the public. It is not intended to provide legal advice". HMRC's terms say "If you use the Trade Tariff APIs, you must follow published guidance and usage limits", which we do: managed OAuth credentials on HMRC's production host, the 24-hour cache, retries with backoff and a 20-second limit. Neither forbids automated access within those limits.
Which codes work? US: 8- and 10-digit HTS lines (description searches skip Chapters 98 and 99, which are special provisions). UK: declarable 10-digit commodity codes; anything shorter lists the declarable codes under it for free.