Look at the RESP file to see the error message that the API you are querying generated.
Two things.
There does not appear to be a variable named I_COMMODIT that you are requesting.
It does not like the spaces in the GET= option.
Also it looks like it includes all of the extra variables you mention in the filters, so you can remove I_COMMODITY from the list of variables provided to GET=.
filename resp temp;
proc http
method="get"
url='https://api.census.gov/data/timeseries/intltrade/imports/hs'
query=(
"get" = "CTY_CODE,CTY_NAME,CON_QY1_MO,I_COMMODITY_SDESC,GEN_VAL_MO"
"COMM_LVL" = "HS10"
"YEAR"="2025"
"MONTH"="01"
"I_COMMODITY"="76*"
)
verbose
out=resp
;
run;
Once you have the file it looks like you can read it simply by just removing the square brackets.
data want;
infile resp dsd firstobs=2 truncover ;
input @;
_infile_=compress(_infile_,'[]');
input (CTY_CODE CTY_NAME CON_QY1_MO I_COMMODITY_SDESC GEN_VAL_MO COMM_LVL YEAR MONTH I_COMMODITY)
(:$100.)
;
run;
... View more