I don’t know why this was so difficult to find this on google, but eventually I found it in the code of a node js library.

Deep inside the nodejs library is the url to query option data. I don’t think this is a secret but yahoo sure wants it that way with there use of YSQL nonsense.

Regardless, here is the url: https://query1.finance.yahoo.com/v7/finance/options/AAPL

Obviously, AAPL is apple computers. This will return nicely formed JSON data. It will also return all the existing expiration dates at the top of the json object.

If you want a specific date the you just add the ?date=1505433600 to the end of the URL.  The date is converted into unix time, which you can translate here.

https://query1.finance.yahoo.com/v7/finance/options/CMG?date=1505433600

I will use php to parse the json object, drop it into database, which wasn’t that difficult. The key take away is the formation of the URL call to Yahoo. One can use any language to parse the data.

Surprisingly, this is pretty simple.

Leave questions or concerns in the comments. I’m also available for hire.

 

 

 

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *