0
$\begingroup$

Is there any API for getting past/future earnings date for a specific symbol?

I tried TDAmeritrade API, Ally and IEX, none of them provide this information yet.

$\endgroup$
1
$\begingroup$

I just found this free simple API, returning today's earnings by default and symbols with earnings call if you pass date:

https://api.earningscalendar.net/

or

https://api.earningscalendar.net/?date=20190925
$\endgroup$
0
$\begingroup$

Here is a short python3 script that will parse the info that you're looking for from Yahoo Finance:

import requests
import json
import pprint

symbol='T'
url='https://finance.yahoo.com/quote/' + symbol
resp=requests.get(url)
r=resp.text

i1=0
i1=r.find('root.App.main', i1)
i1=r.find('{', i1)
i2=r.find("\n", i1)
i2=r.rfind(';', i1, i2)
jsonstr=r[i1:i2]      

data = json.loads(jsonstr)
pprint.pprint(data['context']['dispatcher']['stores']['QuoteSummaryStore']['calendarEvents']['earnings'])
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.