Overview
A NAICS code API built from the Census Bureau's NAICS 2022 files and the SBA Table of Size Standards. Every one of the 2,125 codes, from the 20 sectors down to the 6-digit national industries, comes with its official title and description, its parent and full hierarchy, its children and whether it is shared with Canada and Mexico. On paid plans, six-digit codes carry the SBA size standard in receipts or employees, with any exceptions. Keyword search ranks codes by hits in the title, the 20,000 Census index entries and the description. Paid plans add details=true: the index entries, the cross-references to related codes and the NAICS 2017 codes each 2022 code replaced, plus batches of up to 500 codes.
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/naicslookup?code=541511&search=software%20publisher&level=6&details=true&limit=10" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/naicslookup?code=541511&search=software%20publisher&level=6&details=true&limit=10', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/naicslookup?code=541511&search=software%20publisher&level=6&details=true&limit=10",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/naicslookup?code=541511&search=software%20publisher&level=6&details=true&limit=10", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
codeOptional | string | One NAICS code, or several separated by commas (up to 10 on Free, 500 on paid plans) length 0–4000 |
searchOptional | string | Keywords to search titles, index terms and descriptions length 0–200 |
levelOptional | integer | Only return codes at this level when searching (2 to 6 digits)23456 |
detailsOptionalPremium | boolean | Include index terms, cross-references and the NAICS 2017 concordance |
limitOptional | integer | Maximum search results (1-50) default 10 · range 1–50 |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"count": 1,
"results": [
{
"code": "541511",
"title": "Custom Computer Programming Services",
"level": 6,
"levelName": "national_industry",
"trilateral": false,
"description": "This U.S. industry comprises establishments primarily engaged in writing, modifying, testing, and supporting software to meet the needs of a particular customer.",
"parent": {
"code": "54151",
"title": "Computer Systems Design and Related Services"
},
"hierarchy": [
{
"code": "54",
"title": "Professional, Scientific, and Technical Services",
"level": 2,
"levelName": "sector"
},
{
"code": "541",
"title": "Professional, Scientific, and Technical Services",
"level": 3,
"levelName": "subsector"
},
{
"code": "5415",
"title": "Computer Systems Design and Related Services",
"level": 4,
"levelName": "industry_group"
},
{
"code": "54151",
"title": "Computer Systems Design and Related Services",
"level": 5,
"levelName": "industry"
},
{
"code": "541511",
"title": "Custom Computer Programming Services",
"level": 6,
"levelName": "national_industry"
}
],
"children": [],
"sizeStandard": {
"revenueMillions": 34,
"employees": null,
"summary": "$34M average annual receipts",
"exceptions": []
},
"indexTerms": [
"Applications software programming services, custom computer",
"Computer program or software development, custom",
"Computer programming services, custom",
"Computer software analysis and design services, custom",
"Computer software programming services, custom",
"Computer software support services, custom"
],
"crossReferences": [
{
"text": "Software design, development, and publishing, or software publishing only--are classified in Industry 513210, Software Publishers;",
"codes": [
"513210"
]
},
{
"text": "Providing computing infrastructure, data processing services, Web hosting services (except software publishing), and related services, including streaming support services (except streaming distributi…",
"codes": [
"518210"
]
},
{
"text": "Planning and designing computer systems that integrate computer hardware, software, and communication technologies, even though such establishments may provide custom software as an integral part of t…",
"codes": [
"541512"
]
}
],
"naics2017": [
{
"code": "541511",
"title": "Custom Computer Programming Services"
}
]
}
],
"notFound": []
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
count | number | 1 | Number of codes returned |
results | array[1] | ||
code | string | "541511" | NAICS 2022 code (2 to 6 digits, or a sector range such as 31-33) |
title | string | "Custom Computer Programming Services" | Official title |
level | number | 6 | Number of digits: 2 sector, 3 subsector, 4 industry group, 5 industry, 6 national industry |
levelName | string | "national_industry" | sector, subsector, industry_group, industry or national_industry |
trilateral | boolean | false | The code and title are shared by the US, Canada and Mexico |
description | string | "This U.S. industry comprises establishments primarily engaged in writing, modifying, testing, and su…" | Official Census description of what the code covers |
parent | object | {...} | The code one level up ({code, title}); null for sectors |
code | string | "54151" | Parent code |
title | string | "Computer Systems Design and Related Services" | Parent title |
hierarchy | array[5] | Path from the sector down to this code: code, title, level, levelName | |
code | string | "54" | |
title | string | "Professional, Scientific, and Technical Services" | |
level | number | 2 | |
levelName | string | "sector" | |
children | array | [] | Codes one level down: code, title |
sizeStandardPremium | object | {...} | SBA small-business size standard (6-digit codes); null above that level |
revenueMillionsPremium | number | 34 | Average annual receipts limit in millions of US dollars; null when the standard is in employees |
employeesPremium | object | null | Employee limit; null when the standard is in receipts |
summaryPremium | string | "$34M average annual receipts" | The standard in words, e.g. $34M average annual receipts |
exceptionsPremium | array | [] | Activities with their own standard under this code: activity, revenueMillions, employees, summary |
indexTermsPremium | array | [Applications software programming services, custom computer, ...] | Census index entries classified under this code (details=true) |
crossReferencesPremium | array[3] | Activities classified elsewhere, each with text and the codes it points to (details=true) | |
textPremium | string | "Software design, development, and publishing, or software publishing only--are classified in Industr…" | |
codesPremium | array | [513210] | |
naics2017Premium | array[1] | NAICS 2017 codes this code came from: code, title (details=true) | |
codePremium | string | "541511" | |
titlePremium | string | "Custom Computer Programming Services" | |
notFound | array | [] | Requested codes that do not exist in NAICS 2022 |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- Business Onboarding
- Let applicants search for their industry in plain words and store the matching 6-digit NAICS code.
- Government Contracting
- Check a company against the SBA small-business size standard for the NAICS code on a solicitation.
- Data Normalisation
- Expand stored NAICS codes into titles, sectors and hierarchy for reporting and segmentation.
- Code Migration
- Map records coded under NAICS 2017 to their 2022 successors using the concordance.
Other ways to use NAICS Lookup
Set up NAICS Lookup on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Reference Data: