Yahoo Finance changed its web page formats last week (again) and the data isn't copyable, downloadable, or scrapeable, since the data is apparently loaded indirectly. (I can see it in the debugger.)
The Yahoo Finance API doesn't currently return option data for a single option symbol, much less tables of or for expiration dates, nor apparently does YQL.
Has anyone successfully downloaded or scraped Options data from Yahoo finance in the past week? If so, how?
It probably isn't relevant, but I mainly use perl.
This question is about programming, since surely downloading data is part of programming.
I have found an API that works since the change in Yahoo Finance. I'm still trying to find any clues to other APIs available.
Here's the base call. The {}
is for either the number 1 or 2 as both work: query{}.finance.yahoo.com/v7/finance/
Now, as @Yago notes, you can append chart/
and you can also append options/
. I'm looking for other options to append. Specifically I'd like to find Fundamental and Technical analysis like you can get from this oldie but goodie: http://finance.yahoo.com/d/quotes.csv?s=amd&f=nb4t8
(which returns: n=Name; b4=book value; t8=1yr target price)
The /v7
returns JSON which is nice. Thanks.
And to actually answer your question about option chains:
https://query{1|2}.finance.yahoo.com/v7/finance/options/{ticker}
you can also add a specific epoch date (with Hour,Min,Sec as zeros which will match up with output from Yahoo Finance) of an option expiry:
https://query2.finance.yahoo.com/v7/finance/options/amd?date=1487289600
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With