A monorepo containing packages for working with Canadian National Occupational Classification (NOC) data.
A JavaScript package providing access to NOC data and utilities.
npm install @canoeh/nocs
# or
pnpm add @canoeh/nocsimport { getNOCByCode, getAllNOCs, searchNOCs } from "@canoeh/nocs";
// Get a specific NOC
const noc = await getNOCByCode("00010");
console.log(noc.title_en); // "Legislators"
// Get all NOCs
const allNocs = await getAllNOCs();
// Search NOCs by text
const searchResults = await searchNOCs("software engineer");For more details, see the package documentation.
A RESTful API for accessing NOC data.
# Install dependencies
pnpm install
# Start the API server
cd apps/noc-api
pnpm devThe API will be available at http://localhost:3000.
Swagger documentation is available at http://localhost:3000/api-docs.
-
GET /api/nocs- Get all NOC codes with pagination
- Query parameters:
search: Filter NOCs by search termpage: Page number (default: 1)limit: Items per page (default: 10)
-
GET /api/nocs/{code}- Get a specific NOC by code
- Parameters:
code: NOC code (e.g., "00010")
-
GET /api/metadata- Get NOC system metadata
- Returns version, source, and statistics
Example Response:
{
"data": [
{
"noc_code": "21231",
"title_en": "Software engineers and designers",
"title_fr": "Ingénieurs/ingénieures et concepteurs/conceptrices en logiciel",
"description_en": "Software engineers and designers...",
"description_fr": "Les ingénieurs et les concepteurs en logiciel...",
"level": "Unit Group",
"hierarchy": {
"broad": {
"code": "2",
"title_en": "Natural and applied sciences and related occupations"
},
"major": {
"code": "21",
"title_en": "Professional occupations in natural and applied sciences"
},
"minor": {
"code": "212",
"title_en": "Professional occupations in engineering"
}
}
}
],
"pagination": {
"total": 516,
"page": 1,
"limit": 10,
"totalPages": 52
}
}This repository uses pnpm workspaces. To get started:
# Install pnpm if you haven't already
npm install -g pnpm
# Install dependencies
pnpm installThe NOC data is sourced from Statistics Canada and is provided under the Open Government Licence - Canada.
MIT