Pulling fundamentals from SEC EDGAR is harder than it looks
EDGAR is one of the best deals in finance. Every US public company files there, the data is public, and there's no paywall. So the first time you need fundamentals for a side project, reaching for EDGAR feels obvious. Then you open a companyfacts file and the mood changes.
The tags move around
XBRL is supposed to make filings machine-readable, and it does, sort of. The catch is that the
same line item can be tagged differently from one company to the next, and from one year to the next
for the same company. Revenue might be Revenues for one filer and
RevenueFromContractWithCustomerExcludingAssessedTax for another. If you only look for one
tag, you silently miss data and never know it.
Periods are a trap
A 10-Q can carry both a three-month figure and a trailing-twelve-month one under the same concept. Pick the wrong one and your quarterly revenue is suddenly four times too big. You end up keying values by their period end date and the filing form just to keep things straight.
What we ended up doing
Edgrapi exists because we got tired of rewriting that parser. We merge across the tags companies actually use, key everything by period, drop the trailing-twelve-month noise, and hand back one JSON shape that looks the same whoever you query. If you'd rather not build that yourself, grab a free key and the first call is a couple of minutes away.