U.S. Department of Commerce

Access Data with Census APIs

Geography

Every query must include a geography, and this API supports both FIPS and GNIS geography codes.

To query the API your request URL query string must include a for argument which defines the geography level and FIPS code(s).

For example:

http://metadata.dsd.census.gov/data/2010/sf1?key=...&get=P0010001&for=state:06

will find the total population for the state of California.

The "for" argument may include additional FIPS codes, separated by a comma. For example:

http://metadata.dsd.census.gov/data/2010/sf1?key=...&get=P0010001&for=state:06,24

will find the total population for the states of California and Maryland.

In some cases you must also include an in argument to fully qualify the geography. For example:

http://metadata.dsd.census.gov/data/2010/sf1?key=...&get=P0010001,NAME&for=county:001& in=state:06

will find the total population for Alameda County in the state of California.

Geocoding

The APIs accept calls using a geographic FIPS code. These codes are available recursively through the API but if you have an application that produces a geographic coordinate point, here are two ways you can convert that to a FIPS code.

  1. See the TIGERWeb Mapping Web Service
  2. Use the FCC's Census Block Conversions API

More on Census Geography

[PDF] or PDF denotes a file in Adobe’s Portable Document Format. To view the file, you will need the Adobe® Reader® Off Site available free from Adobe.
This symbol Off Site indicates a link to a non-government web site. Our linking to these sites does not constitute an endorsement of any products, services or the information found on them. Once you link to another site you are subject to the policies of the new site.
Source: U.S. Census Bureau | ADCOM/IT | | Last Revised: August 28, 2012