Edgrapi in Google Sheets
Pull SEC filings, financials, insider trades, 13F holdings and government data into a spreadsheet. Two ways that work today, both with Apps Script, which is built into Google Sheets.
1. A custom function: =EDGRAPI()
Paste a short script once and any cell can call the API, for example a company's revenue or the latest congress trade. The Google Sheets guide has the script and examples.
=EDGRAPI("company/AAPL", "company")
=EDGRAPI("congress?limit=1", "trades.0.ticker")
2. A 13F holdings tracker that refreshes itself
A full tracker: one tab per fund, every position with its quarter-over-quarter change, and a weekly refresh. Script and walkthrough in the 13F tracker tutorial.
Good to know
- Keep your API key in Script Properties, not in a cell. Edgrapi never accepts a key in a URL, so
IMPORTDATAandIMPORTJSON-style URL formulas can't be used. - Each recalculation is a metered call. Avoid volatile formulas that refresh constantly.
- An Excel add-in is planned.