cfpb / ccdb5-api

An API that provides an interface to search complaint data.
Creative Commons Zero v1.0 Universal
14 stars 16 forks source link

Trends API seems redirects to CFPB website #158

Closed gweissman86 closed 4 years ago

gweissman86 commented 4 years ago

The Trends API seems broken.

Using the following code: curl -X GET "https://www.consumerfinance.gov/data-research/consumer-complaints/search/api/v1/trends?lens=overview&trend_interval=yearly" -H "accept: application/json"

The URL redirectS to the site https://www.consumerfinance.gov/data-research/consumer-complaints/search/api/v1/trends?dataLens=Overview&dataNormalization=None&dateInterval=Month&dateRange=3y&date_received_max=2020-07-15&date_received_min=2017-07-15&from=0&page=1&searchField=all&size=25&sort=created_date_desc&tab=Map

And if used in command line, curl returns the page HTML, rather than anything useful.

Other APIs don't seem to give the same problem.

JeffreyMFarley commented 4 years ago

It should work after 11 AM EDT today

https://www.consumerfinance.gov/about-us/events/consumer-response-trends-capability-tool-launch-demo/

sephcoster commented 4 years ago

Indeed, the API was recently launched last week. The API documentation went live a bit ahead of the launch.

If you have any further questions please let us know (Github issues are a good spot for that). One note: your API URL indicated to us that our trend_interval documentation did not match production. We have updated the documentation accordingly via this pull request: https://github.com/cfpb/ccdb5-api/pull/159

Since this should be resolved I'll close this issue. Thank you for the inquiry!