Looking for some help. This is my first attempt to pull data using an API. In the past I go out and download the U.S. Census American Community Survey files I need as CSV's and do a PROC IMPORT. I'd like to try and get only the few variables I need via their API.
This is my code to get totals for all census tracts (1249) in my state:
filename test "C:\Users\n00b\Desktop\API_Test\test.txt";
PROC HTTP
URL= "http://api.census.gov/data/2015/acs5?get=NAME,B01001_001E&for=tract:*&in=state:08&in=county:*"
method = 'GET'
out=test;
run;
I pull it into a text file but it generates the following green text
WARNING: Apparent symbolic reference FOR not resolved.
WARNING: Apparent symbolic reference IN not resolved.
WARNING: Apparent symbolic reference IN not resolved.
I'm assuming because I have wildcards to get all the different tracts?
Also now that I have the API data, how do I get it into a SAS dataset format? Is there a way besides PROC IMPORT?
Can I ask for multiple variables from different tables on the same call or is it one request per line (e.g. Var 1 on Table A and Var 1 on Table B in the same line of code)?
Sorry this is probably basic stuff but I'm getting stuck. Any help appreciated!