Annual revenue for public companies is free from the SEC and needs no API key. Getting it into a spreadsheet is still fiddly. Here is what the work involves, a Python script that does it for one company, and a way to do 50 at once.
Disclosure: I maintain the Actor mentioned in the second half. The script in the first half is free and stands on its own.
The problem
data.sec.gov has everything you need, but a few things get in the way:
Ticker to CIK. The API is keyed by a 10-digit, zero-padded CIK, not a ticker. The SEC publishes a mapping file you have to fetch and search.
Nested XBRL. The companyfacts endpoint returns one JSON document per company, with every reported fact nested under taxonomy, concept and unit. For big filers that is tens of MB.
Concept names change. Apple reports revenue as RevenueFromContractWithCustomerExcludingAssessedTax . Other companies, or the same company in older years, use Revenues or SalesRevenueNet . There is no single "revenue" field.
Repeated facts.…