Using Data

API Query Dissection

A dissection of the API query string for the Census API

I have posted this in another topic, however it is hard to find.

 

Host name, API sub-folder (this triggers our api to parse the following data).

 

http://api.census.gov/data/

 

This portion refers to the DataSet/Instance pair (without both, it's difficult to determine what number you want back)

 

2010/sf1?

 

This determines what variables to retrieve (required, must exist within the variable documentation for the API)

 

get=P012D007,P012D008,P012D009,P012D010,P012D011,P012D012

 

Geography, all currently available data sets require this to return proper numbers

 

&for=block+group:1&in=state:2+county:170+tract:000101

 

The reason for this is two-fold, allowing us to limit users, as well as providing us with information as to how many people are using what dataset.

 

&key=(yourkeyhere)

Tags

Voting

2 votes
2 up votes
0 down votes
Active
Idea No. 156