NAICS API

The North American Industry Classification System (NAICS) is used by the U.S. Federal Government to organize different types of businesses economic analysis purposes, and while there are different types of numbering systems out there that do this, a lot of local municipalities have also started adopting it for their own business classification purposes. The NAICS codes and descriptions are revised every five years (latest: 2012; next: 2017), and while information is freely provided as PDFs or Excel spreadsheets and hosted by the U.S. Census Bureau, no machine-readable API exists for retrieving this data that can be easily used in applications.

Until now.

With the NAICS API, you can:

NAICS API is a product of Code for America’s 2013 Team Las Vegas, Lou Huang and Ryan Closner, with Michal Migurski, Richa Agarwal and Shaunak Kashyap. Source code on Github.

One NAICS Code

Retrieve available data for a single NAICS code from a given year, including title, description, cross references, and index text.

Endpoint

/v0/q

Arguments

year
The NAICS dataset year to request. Currently 2007 and 2012 are available.
code
The NAICS code to retrieve.

Response Dictionary

code
2-6 digit NAICS code.
title
Name of the NAICS code.
seq_no
Sequence number. Appears to be used as a primary key in databases by some agencies.
change_indicator (2012 NAICS only)
If present, indicates whether this code changed from the previous (2007) NAICS.
1 = title changed from 2007 NAICS, but no content has changed.
2 = new code in 2012 NAICS.
3 = content changed from 2007 NAICS, and title may or may not have changed.
trilateral (2012 NAICS only)
If present, indicates that there is a trilateral agreement between Canada, Mexico, and the United States to use a comparable definition of this industry for this code.
description
If present, a text description in an array of paragraph strings.
description_code
If present, refers to another NAICS code description. If present, ignore the given description.
examples
If present, an array of illustrative examples.
crossrefs
If present, an array of cross-references to other NAICS codes that should be used to fine-tune a business classification. Both the text description of a cross-reference and its reference NAICS code is provided.
index (2012 6-digit codes only)
If present, an array of other titles that belong under this NAICS code. Useful as a keyword search to determine where specific businesses should be classified.
NOTE: Index entries exist for 2007 but are not currently available in NAICS API.

Definition

http://naics.codeforamerica.org/v0/q?year={year}&code={code}

Example Request

http://naics.codeforamerica.org/v0/q?year=2012&code=519120

Response

{ "code": 519120, "title": "Libraries and Archives", "seq_no": 1475, "description": [ "This industry comprises establishments primarily engaged in providing library or archive services. These establishments are engaged in maintaining collections and facilitating the use of such documents as are required to meet the informational, research, educational, or recreational needs of their user." ], "crossrefs": [ { "code": "512199", "text": "Providing stock footage to the media, multimedia, and advertising industries --are classified in U.S. Industry 512199, Other Motion Picture and Video Industries;" }, ... ], "index": [ "Archives", "Bookmobiles", "Centers for documentation (i.e., archives)", ... ] }

Searching for a NAICS code

Search for NAICS codes by term, get a list of matching codes in approximate order of relevance.

Endpoint

/v0/s

Arguments

year
The NAICS dataset year to request. Currently 2007 and 2012 are available.
code
The NAICS code to retrieve descendant codes for.
terms
Words to use when searching. Single words or pairs of words are best here, such as “software” or “software publishing”.

Response

List of matching NAICS codes.

Definition

http://naics.codeforamerica.org/v0/s?year={year}&terms={search terms}

Example Request

http://naics.codeforamerica.org/v0/s?year=2012&terms=Internet

Response

[ { "code": 511, "title": "Publishing Industries (except Internet)", "description": [ "Industries in the Publishing Industries (except Internet) subsector group establishments engaged in the publishing of newspapers, magazines, other periodicals, and books, as well as directory and mailing list and software publishing.", ... ], ... }, { "code": 515, "title": "Broadcasting (except Internet)", ... }, { "code": 519130, "title": "Internet Publishing and Broadcasting and Web Search Portals", ... }, ... ]

All NAICS information for a year

Complete information for a single year is available in one API request. The returned data will be large, up to 2.5MB for 2012 data.

Endpoint

/v0/q

Arguments

year
The NAICS dataset year to request. Currently 2007 and 2012 are available.

Response

List of NAICS codes for a year.

Definition

http://naics.codeforamerica.org/v0/q?year={year}

Example Request

http://naics.codeforamerica.org/v0/q?year=2012

Response

[ { "code": 11, "title": "Agriculture, Forestry, Fishing and Hunting", "description": [ "The Sector as a Whole", "The Agriculture, Forestry, Fishing and Hunting sector comprises establishments primarily engaged in growing crops, raising animals, harvesting timber, and harvesting fish and other animals from a farm, ranch, or their natural habitats." ], ... }, { "code": 21, "title": "Mining, Quarrying, and Oil and Gas Extraction", "description": [ "The Sector as a Whole", ... ], ... }, ... ]

Parent Codes

NAICS is a nested and hierarchical data set. For example, libraries and archives are a subcategory to information services. Retrieve a complete list of parent codes for a given code.

Endpoint

/v0/q

Arguments

year
The NAICS dataset year to request. Currently 2007 and 2012 are available.
code
The NAICS code to retrieve parent codes for.
above
1 to include parent codes.

Response

List of parent NAICS codes.

Definition

http://naics.codeforamerica.org/v0/q?year={year}&code={code}&above=1

Example Request

http://naics.codeforamerica.org/v0/q?year=2012&code=5191&above=1

Response

[ { "code": 51, "title": "Information", "description": [ "The Sector as a Whole", "The Information sector comprises establishments engaged...", ... ], ... }, { "code": 519, "title": "Other Information Services", "description": [ "Industries in the Other Information Services subsector...", ... ], ... } ]

Descendant Codes

NAICS is a nested and hierarchical data set. For example, information services include news syndicates as a subcategory. Retrieve a complete list of descendant codes for a given code.

Endpoint

/v0/q

Arguments

year
The NAICS dataset year to request. Currently 2007 and 2012 are available.
code
The NAICS code to retrieve descendant codes for.
below
1 to include descendant codes.

Response

List of descendant NAICS codes.

Definition

http://naics.codeforamerica.org/v0/q?year={year}&code={code}&below=1

Example Request

http://naics.codeforamerica.org/v0/q?year=2012&code=5191&below=1

Response

[ { "code": 51911, "title": "News Syndicates", "description": [ "See industry description for 519110." ], "description_code": "519110", ... }, { "code": 519110, "title": "News Syndicates", "description": [ "This industry comprises establishments primarily engaged in supplying information, such as news reports, articles, pictures, and features, to the news media." ], ... }, ... ]