Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

403 error when running wget #262

Open
chrismp opened this issue Apr 26, 2018 · 2 comments
Open

403 error when running wget #262

chrismp opened this issue Apr 26, 2018 · 2 comments

Comments

@chrismp
Copy link

chrismp commented Apr 26, 2018

Hello, I received a 403 error when I ran wget "https://api.consumerfinance.gov/data/hmda/slice/hmda_lar.csv?$select=state_code%2C+county_code%2C+census_tract_number%2C+loan_purpose_name%2C+SUM(population)%2C+COUNT()&$where=as_of_year%3D2016+and+loan_purpose%3D1&$group=state_code%2C+county_code%2C+census_tract_number%2C+loan_purpose_name&$orderBy=state_code%2C+county_code%2C+census_tract_number&$limit=100000&$offset=0".

But when I navigate to that address in my browser, the file downloads correctly. Is there a way to use wget to download CSVs or other files via HMDA API?

@marcesher
Copy link
Contributor

Please try curl

@chrismp
Copy link
Author

chrismp commented Apr 27, 2018

curl "https://api.consumerfinance.gov/data/hmda/slice/hmda_lar.csv?$select=state_code%2C+county_code%2C+census_tract_number%2C+loan_purpose_name%2C+SUM(population)%2C+COUNT()&$where=as_of_year%3D2016+and+loan_purpose%3D1&$group=state_code%2C+county_code%2C+census_tract_number%2C+loan_purpose_name&$orderBy=state_code%2C+county_code%2C+census_tract_number&$limit=100000&$offset=0" >> file.txt

This gives me a file with 101 rows, including headers, instead of a file with 70K+ rows of the data I requested. Here's file.txt: https://www.dropbox.com/s/boman5zxol07ncb/file.txt?dl=1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants