python - Why am I limited to 1,000 rows on SODA API when I have an App Key -
i'm trying load consumer financial protection bureau (cfpb) pandas data frame in python 3.4. code works, appears i'm limited 1,000 rows through soda api. i'm using app token , referencing url here
df = pd.read_json('http://data.consumerfinance.gov/resource/x94z-ydhh.json?$$app_token=xxxxxxxxxxxxxxxx')
the data structure perfect, i'm limited 1,000 rows of data (should closer 300,000 rows of data).
when access same url through browser (with app token), appears pulling in 1,000 rows well. under impression app token access entire data set, incorrect?
check out docs on $limit
parameter
the $limit parameter controls total number of rows returned, , defaults 1,000 records per request.
note: maximum value $limit 50,000 records, , if exceed limit you'll 400 bad request response.
so you're getting default number of records back.
you will not able 300,000 records in single api call - take multiple calls using $limit
$offset
try:
http://data.consumerfinance.gov/resource/x94z-ydhh.json?$limit=50000&$$app_token=xxxxxxxxxxxxxxxx
Comments
Post a Comment