Find and browse classifications
Search for a classification like NAICS or NOC, retrieve its full hierarchical code tree, and load all codes into a lookup table or validator.
This guide walks through a realistic scenario: your dataset contains NAICS codes and you need to understand the hierarchy — what sector does code 5415 belong to? What are all the valid codes at the 3-digit level? How do you build a lookup table that maps any code to its descriptor?
Step 1 — Find the right classification
Use searchClassifications to locate the classification you want. Filter by status: 'RELEASED' to skip archived or retired versions.
The found field reflects the total number of matches, not just the current page. Use start and limit to paginate:
To see what filter values the API supports (audience and status options):
Step 2 — Extract the ID and retrieve full detail
The @id field is a full URI. Extract the trailing segment before passing it to getClassification:
Step 3 — Walk the hierarchical code tree
getClassification returns codes as a recursive tree. Each ClassificationCode node can have children, which in turn have their own children:
Collect all codes at a specific level depth (e.g. all 3-digit Subsectors):
Step 4 — Load all codes into a flat lookup table
When you need to resolve any code to its descriptor quickly, use getClassificationCategories to retrieve every code at every level as a flat list — no recursion needed:
Step 5 — Validate against only leaf codes
If you want to accept only the most-specific (leaf-level) codes — the ones with no children — use getClassificationCategoriesDetailed:
Complete example — explore "Information and Cultural Industries"
The getClassification tree and getClassificationCategories flat list contain the same codes. Use the tree when you need to traverse parent-child relationships; use the flat list when you need fast lookups by code string or want to filter by levelDepth.