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://api.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://api.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://api.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.
The API accepts 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.
These relationship files are provided as a tool to help data users compare the universe of Census geographies from the 1990, 2000 and 2010 Censuses. From these files, data users may determine how geographies from one Census relate to those from the prior Census.