-1

I've written a code which, when I add in a ticker for a company, should give me the revenue data for every year available in SEC API. Specifically, from https://data.sec.gov/api/xbrl/companyfacts/CIK##########.json.

The hashtags are substituted for a CIK code.

The code works, until it doesn't. This is because one company can have their revenue listed under Revenues, while another may have it listed under RevenueFromContractWithCustomerExcludingAssessedTax or sometimes they're split between both for some reason.

Here is my code, this one will show me any headings with the word revenue in them

I'll run it with two companies to show my problem.

This is the outcome when I look up aapl's ticker. The revenue is in Revenues, SalesRevenueNet and RevenueFromContractWithCustomerExcludingAssessedTax

I've ran it with GME and my problem becomes apparent. Now it shows RevenueFromContractWithCustomerExcludingAssessedTax, Revenues and SalesRevenueGoodsNet

Is there a way I could find the revenue by using one term that will work for all tickers? In the forms this data belongs to, the 10-K's, they're all under the term 'Net Sales.'

Please help.

I've tried to search through all the possible terms which could mean revenue but I got like 3 pages worth of text and it's too much ;-;.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Rinder
  • 1

0 Answers0