Look up codes from plain-English terms
Use a classification's alphabetic index to find the correct code for a business description, occupational title, or product category — and verify it against the exclusion list.
Every classification in RDaaS includes an alphabetic index — a searchable list of plain-English terms, each mapped to the code it belongs to. This is the authoritative lookup tool for questions like "what NAICS code applies to custom software development?" or "is residential renovation classified under construction?"
Each index entry has:
primaryTerm— the main heading (e.g. "Software publishers")illustrativeExamples[]— specific examples that belong to this codeinclusions[]— terms explicitly included in scopeotherExamples[]— additional examples, often more specificindexCodeValue— the code these terms map toindexCodeDescriptor— the code's label
Step 1 — Load all index entries
Get the classification ID first (see Find and browse classifications), then load the full index:
Step 2 — Search the index for a keyword
The API does not provide server-side full-text search over the index. Load the full index once, then search in memory. A single NAICS index contains a few thousand entries — well within a comfortable in-memory footprint.
Step 3 — Retrieve a single index entry
If you have an indexId and want to fetch just that one entry:
getClassificationIndex returns a flat object directly. getClassificationIndexes returns { '@graph': IndexEntry[] }. Destructure accordingly — don't expect the single-entry response to have a '@graph' wrapper.
Step 4 — Check exclusions for a candidate code
Once you have a candidate code, verify it against the classification's exclusion list. Exclusions document terms that might seem to belong to a code but are explicitly assigned elsewhere:
An exclusion entry like { term: 'packaged software publishing', sourceCodeValue: '5415', targetCodeValue: '5112' } means that while 5415 covers custom software development, packaged software publishers belong to 5112, not 5415.
Complete example — classify a business description
Caching the index
The classification index changes only when Statistics Canada releases a new classification version — typically every 5 years. In a production application, load and cache the index at startup rather than fetching it on every classification request:
If your application serves many concurrent classification requests, consider persisting the index to a cache (Redis, a database table, or a local JSON file) and refreshing it on a schedule rather than loading it into memory on every process start. The index for a major classification like NAICS is a few hundred kilobytes of JSON.