Querying a variable using the ACS census API

747 views Asked by At
1

There are 1 answers

1
atkat12 On BEST ANSWER

I hit the same problem and I think I understand the solution thanks to this GitHub issue.

  • URLS with the piece acs/acs1 will work for the DETAILED TABLES.
  • You are looking to pull information from a DATA PROFILE, thus you must use URLs with the path acs/acs1/profile.
  • If you were looking for a SUBJECT TABLE variable it would be acs/acs1/subject.

I believe the appropriate paths can generally constructed from the "dataset name" column in the table here. For example, the following should work:

https://api.census.gov/data/2016/acs/acs1/profile?get=DP02_0001E&for=state:01

NB: For geographic queries, you should also note that you need to use one of the available geographies and you may need to provide the high-level geography, e.g.:

https://api.census.gov/data/2016/acs/acs1/profile?get=DP02_0001E&for=county:031&in=state:17