httphttp-headersyahoo-financeyahoo-api

Yahoo Finance API - GET quotes returns "Invalid Cookie"


For the past few years, I've been using the following link to fetch a full current quote for the symbols in the query:

https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL

All of a sudden, as of about 5 hours ago, I'm now getting the error response 'Unauthorised - Invalid Cookie' on every single device I call it from. Sometimes, I get the error response 'Unauthorised - Invalid Crumb'.

The historic data fetching still works fine:

(https://query1.finance.yahoo.com/v8/finance/chart/AAPL?metrics=high?&interval=1d&range=5d).

Is anyone else having this issue and/or knows how I can fix it??? Or have Yahoo discontinued this endpoint without telling anyone??


Solution

  • I had the same issue today. Change the "v7" to "v6" in the URL in your GET request. It will then work, at least for now. Because the Yahoo Finance API hasn't been officially supported since 2017, we do what we can with it.