Related Info

Census Data API

 

2013 Computerworld Honors Laureate Recipient
award scroll

Click to Print this page

Application Programming Interface (API)

The Application Programming Interface (API) is a service that enables data sponsors to have control and expose data in a standardized way. This service allows developers to reduce the development learning curve by standardizing the API query language across multiple datasets, which allows rapid development of mobile and web applications. Any data that are available in TheDataWeb can be accessible though the API service. The Census Data API is currently using this service to provide access to the Census Bureau public use datasets. Any organization with data published in TheDataWeb, or with their own DataWeb services, can make their data available through the API.

Data are accessible to software developers through a stateless HTTP GET request.

Here is an example of a simple API request:
http://api.census.gov/data/2010/sf1?get=P0010001,NAME&for=state:*

And here is part of the query response:
[["P0010001","NAME","state"],
["710231","Alaska","02"],
["4779736","Alabama","01"],
["2915918","Arkansas","05"],
["6392017","Arizona","04"],
["37253956","California","06"],

The response for all queries is formatted as a two dimensional JSON array where the first row provides column names and subsequent rows provide data values.