sstrickx / yahoofinance-api

Java Client API for Yahoo Finance
MIT License
511 stars 222 forks source link

HTTP 404 errors (Yahoo has locked down their APIs) #209

Open alwa opened 1 year ago

alwa commented 1 year ago

Example of a query that this library does for me: https://query1.finance.yahoo.com/v6/finance/quote?symbols=CADSEK%3DX

It now returns: {"finance":{"result":null,"error":{"code":"Not Found","description":"HTTP 404 Not Found"}}}

It used to work. I've already applied a workaround for another breaking change: https://github.com/sstrickx/yahoofinance-api/issues/206#issuecomment-1548442087

alwa commented 1 year ago

It looks like Yahoo has closed down the APIs:

https://docs.google.com/forms/d/e/1FAIpQLSeyb7xMtZFjoNYI7XG1rjlhUopKAxdLAfSRcaPxg9p-9ii-_g/viewform

Yahoo Finance | API Feedback We’re sorry for the inconvenience, but API-level access to Yahoo Finance quotes data has been disabled.

Game over.

oauthtester01 commented 1 year ago

It's time to say good bye to yahoo api !

ITOT

description":"Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback"

Yahoo Finance | API Feedback Again, we’re sorry for the inconvenience, but API-level access to Yahoo Finance quotes data has been disabled. Thank you for your feedback.

turing-d-gr8 commented 1 year ago

Strange, they're still allowing python libraries it seems. Why stop API access?

IoIxD commented 1 year ago

Because you can still get the crumb by querying https://query1.finance.yahoo.com/v1/test/getcrumb, and then you can pass it into the url with the &crumb= argument. Yahoo has tightened their APIs but not locked them down.

The crumb thing is blank if you're not accessing it from a browser. Curious to know how they detect that.

gilbertoca commented 1 year ago

It looks like Yahoo has closed down the APIs:

https://docs.google.com/forms/d/e/1FAIpQLSeyb7xMtZFjoNYI7XG1rjlhUopKAxdLAfSRcaPxg9p-9ii-_g/viewform

Yahoo Finance | API Feedback We’re sorry for the inconvenience, but API-level access to Yahoo Finance quotes data has been disabled.

Game over.

I don't think so! @alwa @IoIxD Well, it is working for my country #210

dev-marcel commented 1 year ago

So i noticed v11 API also gives 404's sinds a fews days, but the v6 version still works correctly.

For example.: https://query1.finance.yahoo.com/v11/finance/quoteSummary/WIZZ.L?modules=price gives 404 https://query1.finance.yahoo.com/v6/finance/quoteSummary/WIZZ.L?modules=price gives results

IoIxD commented 1 year ago

~~By the way Google has just proposed a feature that will let browsers provide secure keys to websites in order for them to verify that you are human; one of the explicit, stated goals from them is to stop scraping, and in general it can be used to deny access to users who aren't using certain browsers. Yahoo will most likely take advantage of this. https://github.com/RupertBenWiser/Web-Environment-Integrity/blob/main/explainer.md~~

If you are using this API you should move on before your app permanently breaks.

They cancelled it.

widarlein commented 1 year ago

Ah, I found this lib today. Too bad it's out of commission. It seems the yfinance python lib "solved" this by using the v6 api. https://github.com/ranaroussi/yfinance/pull/1595