WCO Trade Tools APIwcotradetools.org ↗
Access the full HS 2022 classification hierarchy — 21 sections, chapters, headings, and subheadings — via 4 endpoints. Search by keyword or browse by section and chapter.
What is the WCO Trade Tools API?
This API exposes the complete WCO Harmonized System 2022 classification hierarchy across 4 endpoints, covering all 21 sections, their chapters, 4-digit headings, and 6-digit subheadings. Use get_sections to retrieve every section with its Roman numeral code, or search_hs_codes to find matching codes by keyword or partial code string. Every record carries full hierarchy context — section, chapter, heading, and subheading — in a flat, normalized structure ready for database ingestion.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/9993404f-cb0d-4550-81ef-69696fd6c8fd/get_sections' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace wcotradetools-org-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.hs_2022_classification_api import HSClassification, Section, Chapter, ClassificationRecord, ClassificationMatch, SectionCode
client = HSClassification()
# List all HS 2022 sections
for section in client.sections.list():
print(section.section_code, section.section_description)
# Navigate from a specific section to its chapters using the enum
animal_section = client.section(SectionCode.I)
for chapter in animal_section.chapters():
print(chapter.chapter_code, chapter.chapter_description)
# Get detailed headings and subheadings for a chapter
for chapter in animal_section.chapters(limit=1):
for record in chapter.headings(section_code=SectionCode.I):
print(record.heading_code, record.heading_description, record.subheading_code, record.subheading_description)
# Search for HS codes by keyword
for match in client.classificationmatches.search(query="coffee"):
print(match.type, match.code, match.path, match.excerpt)
List all 21 HS 2022 sections with their Roman numeral codes and descriptions. Returns the complete top-level classification hierarchy. No pagination — always returns all 21 sections in one response.
No input parameters required.
{
"type": "object",
"fields": {
"total": "integer count of sections",
"sections": "array of section objects with section_code and section_description"
},
"sample": {
"data": {
"total": 21,
"sections": [
{
"section_code": "I",
"section_description": "LIVE ANIMALS; ANIMAL PRODUCTS"
},
{
"section_code": "II",
"section_description": "VEGETABLE PRODUCTS"
}
]
},
"status": "success"
}
}About the WCO Trade Tools API
Browsing the HS 2022 Hierarchy
get_sections returns all 21 HS 2022 sections as an array, each with a section_code (Roman numeral, e.g. I, XIV) and a section_description. From there, get_chapters accepts a section_code and returns all 2-digit chapter_code values within that section, plus the parent section's description repeated on each record for easy joining. This top-down traversal maps cleanly to a relational schema.
Headings and Subheadings
get_headings_and_subheadings takes a chapter_code (1- or 2-digit; leading zeros are normalized) and an optional section_code. Providing section_code narrows the search scope and reduces response time; omitting it causes all 21 sections to be searched. Each record in the records array contains section_code, section_description, chapter_code, chapter_description, heading_code (4-digit), and subheading_code (6-digit) alongside their descriptions, giving you the full ancestry in a single flat row.
Keyword and Code Search
search_hs_codes accepts a free-text query — a commodity name like coffee or a partial code like 0901 — and returns up to 10 results. Each result includes a type field indicating whether the match is at the section, chapter, heading, or subheading level, the matching code, a path string showing the breadcrumb hierarchy, and an excerpt. This makes it suitable for autocomplete fields in customs declaration or ERP interfaces where users type a description and need a code suggestion.
The WCO Trade Tools API is a managed, monitored endpoint for wcotradetools.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when wcotradetools.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official wcotradetools.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Populate a product catalog with official 6-digit HS subheading codes for cross-border shipping compliance
- Build an autocomplete field for customs declaration forms using
search_hs_codesresults - Seed a trade compliance database with the full HS 2022 section-to-subheading hierarchy from
get_headings_and_subheadings - Validate user-submitted HS codes by checking them against the canonical chapter and heading structure
- Generate a browsable tariff-classification reference by chaining
get_sections→get_chapters→get_headings_and_subheadings - Map product SKUs to HS headings for duty-rate estimation in an e-commerce checkout flow
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does WCO Trade Tools have an official developer API?+
What does `get_headings_and_subheadings` return, and why is `section_code` optional?+
section_code, section_description, chapter_code, chapter_description, heading_code (4-digit), and subheading_code (6-digit) with descriptions. The section_code parameter is optional — omitting it causes the API to search all 21 sections to locate the chapter, which is noticeably slower. Supplying it keeps the lookup scoped and faster.How many results does `search_hs_codes` return, and can it search by numeric code?+
live animals) and numeric code strings (e.g. 0901). Each result includes a type field (section, chapter, heading, or subheading) and a path breadcrumb so you can see where in the hierarchy the match falls. Pagination beyond 10 results is not currently supported; you can fork this API on Parse and revise it to add offset-based pagination.