NAICS Lookup API

Comprehensive NAICS (North American Industry Classification System) code lookup API with hierarchy navigation, year-to-year crosswalks, SIC mapping, and full-text search. All data sourced from the U.S. Census Bureau, hosted locally for sub-20ms response times.

https://naics.datasourceapi.com/api/v1

Response Format

All endpoints return JSON with this envelope structure:

{ "request_status": "success", "message": "Found NAICS code 511210 (2022)", "data": { ... }, "data_sources": [{ "source": "census_naics", "dataset": "NAICS 2022", "cache": "hit" }] }

Valid years: 2022 (default), 2017, 2012, 2007

Endpoints

GET /code/{code} Look up a NAICS code

Returns the full profile for a NAICS code including title, hierarchy, children, description, examples, and crosswalks.

ParameterLocationDescription
code requiredpathNAICS code (2-6 digits, e.g. 511210)
year optionalqueryNAICS revision year (default: 2022)
{ "code": "511210", "year": 2022, "title": "Software Publishers", "level": 6, "level_name": "National Industry", "sector_code": "51", "ancestors": [...], "children": [], "crosswalks": [...] }
GET /search Search NAICS codes by keyword or code prefix

Autocomplete-ready search. Matches code prefixes (numeric query) or title keywords (text query).

ParameterLocationDescription
q requiredquerySearch query (min 2 chars). E.g. software or 5112
year optionalqueryNAICS revision year (default: 2022)
level optionalqueryFilter by hierarchy level (2-6)
limit optionalqueryMax results (default: 20, max: 50)
GET /code/{code}/children Get direct children in hierarchy

Returns all direct sub-categories of a NAICS code. E.g. for sector 51, returns subsectors like 511, 512, etc.

ParameterLocationDescription
code requiredpathNAICS code
year optionalqueryNAICS year (default: 2022)
GET /code/{code}/ancestors Get path from sector to this code

Returns the full hierarchy path from the root sector down to this code.

ParameterLocationDescription
code requiredpathNAICS code
year optionalqueryNAICS year (default: 2022)
GET /code/{code}/history Code across all NAICS revisions

Shows how a code has existed across NAICS revision years, including title changes.

GET /sectors List all 20 economic sectors

Returns all 20 NAICS economic sectors for the specified year.

ParameterLocationDescription
year optionalqueryNAICS year (default: 2022)
GET /sector/{code} Sector details with subsectors

Returns a sector profile with its subsector tree.

GET /year/{year} Year summary with code counts

Summary of a NAICS revision year: total codes, breakdown by level, and sector list.

GET /crosswalk Map a code between NAICS years

Returns the concordance mapping for a code from one NAICS revision to another. Shows splits, merges, and 1:1 mappings.

ParameterLocationDescription
code requiredqueryNAICS code to map
from requiredquerySource year
to requiredqueryTarget year
GET /changes Changes between NAICS revisions

Lists all codes that changed between two NAICS revision years (new, split, merged, title changes).

ParameterLocationDescription
from optionalqueryFrom year (default: 2017)
to optionalqueryTo year (default: 2022)
GET /sic/{code} SIC to NAICS mapping

Maps a 4-digit Standard Industrial Classification (SIC) code to its NAICS equivalents.

GET /compare Compare multiple NAICS codes

Returns profiles for multiple codes side-by-side. Useful for comparing related industries.

ParameterLocationDescription
codes requiredqueryComma-separated codes (2-10)
year optionalqueryNAICS year (default: 2022)
POST /bulk/lookup Bulk code lookup (up to 500)

Look up multiple NAICS codes in a single request. Send a JSON body with an array of codes.

POST /api/v1/bulk/lookup Content-Type: application/json { "codes": ["511210", "722511", "541511"], "year": 2022 }
GET /stats Dataset metadata and statistics

Returns global dataset statistics: total codes, available years, sector count, and data source info.

Rate Limits & Usage

  • No API key required — all endpoints are publicly accessible
  • CORS enabled — call from any origin
  • Rate limit: 1,000 requests per minute per IP (generous for most use cases)
  • Response format: JSON only
  • Caching: KV-backed responses typically resolve in <20ms
  • Data freshness: Updated when new NAICS revisions are published (approximately every 5 years)

NAICS Hierarchy Levels

LevelNameDigitsExample
2Sector2-digit51 Information
3Subsector3-digit511 Publishing Industries
4Industry Group4-digit5112 Software Publishers
5NAICS Industry5-digit51121 Software Publishers
6National Industry6-digit511210 Software Publishers
Data Source: U.S. Census Bureauwww.census.gov/naics/ • All data hosted locally for maximum performance