NAICS Code API
The NAICS Code API covers the full North American Industry Classification System: all 2,125 codes with their official titles, descriptions and hierarchy, the 20,373 Census index terms and the 4,601 cross-reference rules.
On top of the taxonomy it answers the questions people actually look a code up for — whether a business is small under SBA rules, which single code a description belongs to, and how risky an industry is to onboard.
NAICS is published by the U.S. Census Bureau under the Office of Management and Budget and is in the public domain. Size standards come from 13 CFR 121.201.
Available endpoints:
- /v1/naics - Look up a code
- /v1/naicssearch - Search codes by keyword
- /v1/naicssizestandard - SBA small-business size standard
- /v1/naicsclassify - Classify a business description
- /v1/naicsrisk - Industry risk profile
From 7,915 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 175ms | 218ms | 267ms | 596ms | 1059ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
https://api.api-ninjas.com/v1/naics
Returns the official title, description, full hierarchy, children, index terms and cross-reference rules for a NAICS 2022 code. Available on all plans, including Free.
Pass crosswalk_to to also map the code to an earlier NAICS revision.
Parameters
codeoptionalA 2 to 6 digit NAICS code, for example
541511. Required unlesscodesortitleis supplied. Sector aliases resolve automatically:32returns the published31-33sector.codesoptionalComma-separated codes for a batch lookup. Up to 50 on Developer and 500 on Business and above.
titleoptionalLook up by official title instead of code. Partial matches are supported and up to 25 results are returned.
yearoptionalNAICS revision. Currently
2022only; NAICS 2027 is not published by the Census Bureau until January 2027.countryoptionalCurrently
USonly. NAICS Canada and SCIAN Mexico are not yet available.crosswalk_tooptionalMap the code to an earlier revision. Currently
2017only.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields:
codeThe NAICS code.
titleOfficial Census title for the code.
levelDigit length:
2sector through6national industry.level_nameOne of
sector,subsector,industry_group,industry,national_industry.descriptionThe official Census definition of the industry.
hierarchyArray of every ancestor from sector down to this code, each with
code,levelandtitle.parentThe immediate parent code, or
nullfor a sector.childrenArray of immediate child codes.
index_termsThe official Census index terms assigned to this code — the phrases the Census Bureau itself files under it.
cross_referencesThe “classified elsewhere” rules that bear on this code.
crosswalkOnly when
crosswalk_tois supplied. Containschange_type(unchanged,renumbered,split,mergedornew) and the predecessormappings.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/naics?code=541511&crosswalk_to=2017Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/naics?code=541511&crosswalk_to=2017" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/naicssearch
Returns ranked candidate codes for a keyword or phrase, scored against the 20,373 official Census index terms plus titles and descriptions. Available on all plans, including Free.
Every result names the index term that matched, so you can see why it ranked. No classification rules are applied — use /v1/naicsclassify when you need one decided answer.
Parameters
queryrequiredA keyword or phrase describing an industry or activity, for example
coffee shop. Limited to 300 characters.leveloptionalRestrict results to codes of this digit length,
2to6.limitoptionalMaximum results to return. Capped at 5 on Free and Learner, 25 on Developer and above.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields:
queryThe query as submitted.
countNumber of results returned.
resultsArray of matches, ranked best first.
results[].codeThe matching NAICS code.
results[].titleOfficial title for that code.
results[].scoreRelevance from 0 to 1, normalised so the best match is
1.results[].matched_onWhich text matched:
index_term,titleordescription.results[].matched_textThe exact official text that matched.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/naicssearch?query=coffee%20shop&limit=5Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/naicssearch?query=coffee%20shop" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/naicssizestandard
Returns the SBA small-business size standard for a NAICS code, taken from 13 CFR 121.201. Requires a Developer subscription or above.
Supply revenue or employees and the response adds an eligibility verdict with remaining headroom. This is informational and is not an SBA size determination.
Parameters
codeoptionalA 6-digit NAICS code. Required unless
codesis supplied.codesoptionalComma-separated codes for a batch lookup.
revenueoptionalAnnual receipts in USD. Used when the standard for the code is receipts-based.
employeesoptionalEmployee count. Used when the standard for the code is employee-based.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields:
size_standard.basisEither
annual_receiptsoremployees.size_standard.threshold_usdThe receipts ceiling in USD, or
nullfor employee-based codes.size_standard.threshold_employeesThe employee ceiling, or
nullfor receipts-based codes.eligibility.is_smallWhether the supplied figure falls at or below the ceiling.
eligibility.headroom_pctHow much room remains below the ceiling, as a percentage.
footnotesFootnote numbers from the CFR table that apply to this code.
authorityAlways
13 CFR 121.201.effective_dateEffective date of the size-standard table in use.
calculation_basisBusiness and above. The 5-year receipts and 24-month employee averaging rules.
affiliation_noteBusiness and above. How affiliation under
13 CFR 121.103affects the measurement.exceptionsBusiness and above. Footnoted sub-standards for the code, such as the three exceptions under
541330.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/naicssizestandard?code=541511&revenue=18000000Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/naicssizestandard?code=541511&revenue=18000000" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/naicsclassify
Assigns one primary NAICS code to a free-text business description by applying NAICS’s own rules: the primary-activity test, the cross-reference exclusions, and establishment scope. Requires a Business subscription or above.
The deciding rule and the official index term that matched are both returned, so the classification can be justified during an audit.
Parameters
descriptionrequiredA description of the business or establishment to classify. Limited to 2,000 characters.
include_alternativesoptionalWhether to return rejected candidate codes and the rule that rejected each. Defaults to
true.min_confidenceoptionalSuppress the result when confidence falls below this value, from
0to1.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields:
primary.codeThe single assigned NAICS code.
primary.titleOfficial title for that code.
primary.confidenceConfidence in the assignment, from 0 to 1.
primary.decided_byWhich rule settled it, such as
primary_activity_test.secondary_codesOther activities the description covers.
ancillary: truemarks an activity that supports the primary one rather than standing alone.adjudication.reasoningA short statement of the deciding activity.
adjudication.rules_appliedEach NAICS rule evaluated, with the
source_textrelied on and anoutcomeofexcludedornot_excluded.adjudication.evidenceThe official Census index term that matched, with its score.
establishment_notePresent when the description implies more than one establishment.
alternativesCandidate codes that were considered and rejected, each with
rejected_by.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/naicsclassify?description=We%20manufacture%20kitchen%20cabinets%20and%20also%20install%20them%20in%20customers'%20homes.Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/naicsclassify?description=We%20manufacture%20kitchen%20cabinets%20and%20also%20install%20them" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/naicsrisk
Returns an industry-level KYB and underwriting risk profile for a NAICS code. Requires a Business subscription or above.
This describes an industry, never a specific business. It is API Ninjas analysis derived from public FinCEN and FFIEC guidance and published card-network restricted-business lists, and it is not a compliance determination or a consumer report.
Parameters
codeoptionalA NAICS 2022 code. Required unless
codesis supplied.codesoptionalComma-separated codes for a batch lookup.
frameworkoptionalWhich lens to apply:
kyb(default),cardorlending.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields:
risk_levellow,moderateorhigh.flagsEvery risk flag is returned, including the ones that are
false, so you can see what was checked rather than only what fired. Includesmoney_services_business,cash_intensive,cannabis_related,firearms,gambling,crypto_relatedand others.rationaleWhy the flags were set, citing the guidance relied on.
review_recommendationstandard,standard_plus_documentation,enhanced_due_diligenceordecline_typical.typical_mccMerchant category codes commonly used for this industry.
commonly_prohibited_byThe kinds of counterparty that typically refuse this industry outright.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/naicsrisk?code=522320&framework=kybHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/naicsrisk?code=522320" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the NAICS Code API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the NAICS Code API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the NAICS Code API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the NAICS Code API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.Where does the NAICS data come from, and can I use it commercially?
The classification itself is published by the U.S. Census Bureau under the Office of Management and Budget. It is a work of the U.S. Government and therefore in the public domain under17 U.S.C. 105, so the codes, titles, descriptions, index terms and cross-references carry no licence restrictions. API Ninjas is not affiliated with or endorsed by the Census Bureau or the SBA. Every response includes asourceanddisclaimerblock.What is the difference between /v1/naicssearch and /v1/naicsclassify?
/v1/naicssearchis retrieval: give it a keyword likecoffee shopand it returns every code that plausibly covers that activity, ranked, with the official Census index term that matched. It applies no judgement./v1/naicsclassifyis adjudication: give it a full business description and it returns one primary code chosen by NAICS's own rules, with the deciding rule recorded. Use search behind a picker, and classify when you need a single code to store.Why does classify return only one code when my business does several things?
NAICS assigns exactly one primary code per establishment, determined by the principal activity measured by revenue. Additional activities are returned insecondary_codes, withancillary: truemarking those that support the primary activity rather than standing alone — installing cabinets you manufactured yourself, for example. Theadjudication.rules_appliedarray records which rule decided it, so the answer can be justified later.How do I check whether a business is small under SBA rules?
Call/v1/naicssizestandardwith acodeplusrevenueoremployees. The response gives the threshold from13 CFR 121.201, whether the standard is receipts-based or employee-based, and anis_smallverdict with headroom. Business and above also returns the averaging rules, the affiliation note, and the footnoted exceptions. This is informational and is not an SBA size determination.Can I map codes between NAICS revisions?
Yes. Passcrosswalk_to=2017to/v1/naicsand the response adds acrosswalkblock with achange_typeofunchanged,renumbered,split,mergedornew, plus the predecessor codes. The Census concordance covers 6-digit national industries only. NAICS 2027 is not published by the Census Bureau until January 2027 and will be added when it lands.Which endpoints require a paid plan?
/v1/naicsand/v1/naicssearchare available on every plan, including Free./v1/naicssizestandardrequires Developer or above./v1/naicsclassifyand/v1/naicsriskrequire Business or above. Batch lookups with thecodesparameter allow 50 codes on Developer and 500 on Business and above. See the pricing page.What is the risk endpoint for, and is it a compliance decision?
/v1/naicsriskreturns an industry-level KYB and underwriting profile: flags such asmoney_services_business,cash_intensive,cannabis_related,gamblingandcrypto_related, arisk_level, typical merchant category codes, and a review recommendation. It is API Ninjas editorial analysis derived from public FinCEN and FFIEC guidance and published card-network restricted-business lists. It describes an industry, never a specific business, and it is not a compliance determination or a consumer report.