Vote up to Idea API Query Dissection Vote down to Idea API Query Dissection

Rank52

Idea#105

This idea is active.
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)

Comment

Submitted by Phillip Thomas 1 year ago

Vote Activity

  1. Approved
    1 year ago
  2. Approved
    1 year ago

Events

  1. The idea was posted
    1 year ago

Comments (6)

  1. Phillip Thomas Idea Submitter

    Note to the Moderators: This idea should be pinned to make it easier to find.

    1 year ago
  2. Sorry... I probably miss something here, but I don't see a link to a document :)

    Thanks,

    Eitan

    11 months ago
  3. Phillip Thomas Idea Submitter

    You were asking about how to format api queries, this thread does that.

    11 months ago
  4. Hi,

    I am looking for a document that will have the definitions of the "P......" commands, the denitions (values) of "block+group:1&in=state:2+county:170+tract:000101"

    Is there such a document?

    Thanks again,

    Eitan

    11 months ago
  5. Phillip Thomas Idea Submitter

    Those are not commands, they are variables, as I describe above. A full list of variables can be found at http://www.census.gov/developers/data/ however you do need to know which dataset you are looking at.

    11 months ago
  6. Thanks,

    Eitan

    11 months ago