The Yahoo Finance API shut down awhile ago. I've been using the Intrinio Stock API and it's been great.
Usage is simple:
https://api.intrinio.com/prices?identifier=AAPL
(along with your basic auth tokens)
returns
{
"data": [
{
"date": "2018-09-06",
"open": 226.61,
"high": 227.35,
"low": 221.3,
"close": 223.1,
"volume": 33428527,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 226.61,
"adj_high": 227.35,
"adj_low": 221.3,
"adj_close": 223.1,
"adj_volume": 33428527
},
{
"date": "2018-09-05",
"open": 228.99,
"high": 229.67,
"low": 225.1,
"close": 226.87,
"volume": 33332960,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 228.99,
"adj_high": 229.67,
"adj_low": 225.1,
"adj_close": 226.87,
"adj_volume": 33332960
},
{
"date": "2018-09-04",
"open": 228.41,
"high": 229.18,
"low": 226.63,
"close": 228.36,
"volume": 27390132,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 228.41,
"adj_high": 229.18,
"adj_low": 226.63,
"adj_close": 228.36,
"adj_volume": 27390132
},
{
"date": "2018-08-31",
"open": 226.51,
"high": 228.87,
"low": 226,
"close": 227.63,
"volume": 43340134,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 226.51,
"adj_high": 228.87,
"adj_low": 226,
"adj_close": 227.63,
"adj_volume": 43340134
},
{
"date": "2018-08-30",
"open": 223.25,
"high": 228.26,
"low": 222.4,
"close": 225.03,
"volume": 48793824,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 223.25,
"adj_high": 228.26,
"adj_low": 222.4,
"adj_close": 225.03,
"adj_volume": 48793824
},
{
"date": "2018-08-29",
"open": 220.15,
"high": 223.49,
"low": 219.41,
"close": 222.98,
"volume": 27254804,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 220.15,
"adj_high": 223.49,
"adj_low": 219.41,
"adj_close": 222.98,
"adj_volume": 27254804
},
{
"date": "2018-08-28",
"open": 219.01,
"high": 220.54,
"low": 218.92,
"close": 219.7,
"volume": 22776766,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 219.01,
"adj_high": 220.54,
"adj_low": 218.92,
"adj_close": 219.7,
"adj_volume": 22776766
},
{
"date": "2018-08-27",
"open": 217.15,
"high": 218.74,
"low": 216.33,
"close": 217.94,
"volume": 20525117,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 217.15,
"adj_high": 218.74,
"adj_low": 216.33,
"adj_close": 217.94,
"adj_volume": 20525117
},
{
"date": "2018-08-24",
"open": 216.6,
"high": 216.9,
"low": 215.11,
"close": 216.16,
"volume": 18476356,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 216.6,
"adj_high": 216.9,
"adj_low": 215.11,
"adj_close": 216.16,
"adj_volume": 18476356
},
{
"date": "2018-08-23",
"open": 214.65,
"high": 217.05,
"low": 214.6,
"close": 215.49,
"volume": 18883224,
"ex_dividend": 0,
"split_ratio": 1,
"adj_factor": 1,
"adj_open": 214.65,
"adj_high": 217.05,
"adj_low": 214.6,
"adj_close": 215.49,
"adj_volume": 18883224
}
],
"result_count": 9526,
"page_size": 10,
"current_page": 1,
"total_pages": 953,
"api_call_credits": 1
}