SEC EDGAR API: Get company financials
Looks up a public company by name or ticker on SEC EDGAR and returns its reported annual or quarterly financial figures from XBRL company facts. Quarterly flows are derived from year-to-date totals when no quarterly figure is filed. Unavailable figures are null.
Unofficial. Not affiliated with or endorsed by SEC EDGAR.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Years optional
years Number of fiscal years, for example 5.
2
Whole number from 1 to 15. Default
5.- Period optional
period Reporting frequency, for example annual.
quarterly
One of
annual,quarterly. Defaultannual.- Company, required
company Company name or stock ticker, for example Microsoft or MSFT.
MSFT
Input as JSON
{ "years": 2, "period": "quarterly", "company": "MSFT"}Output
{ "cik": "0000789019", "periods": [ { "cash": 20935000000, "quarter": 4, "revenue": 90007000000, "net_income": 35766000000, "fiscal_year": 2026, "total_assets": 758376000000, "period_end_date": "2026-06-30", "accession_number": "0001193125-26-323660", "total_liabilities": 315989000000, "shares_outstanding": 7427000000, "source_filing_date": "2026-07-29", "source_filing_form": "10-K", "source_filing_link": "https://www.sec.gov/Archives/edgar/data/789019/000119312526323660/" , "operating_cash_flow": 55441000000, "stockholders_equity": 442387000000, "diluted_earnings_per_share": 4.81 }, { "cash": 32105000000, "quarter": 3, "revenue": 82886000000, "net_income": 31778000000, "fiscal_year": 2026, "total_assets": 694228000000, "period_end_date": "2026-03-31", "accession_number": "0001193125-26-191507", "total_liabilities": 279861000000, "shares_outstanding": 7429000000, "source_filing_date": "2026-04-29", "source_filing_form": "10-Q", "source_filing_link": "https://www.sec.gov/Archives/edgar/data/789019/000119312526191507/" , "operating_cash_flow": 46679000000, "stockholders_equity": 414367000000, "diluted_earnings_per_share": 4.27 }, { "cash": 24296000000, "quarter": 2, "revenue": 81273000000, "net_income": 38458000000, "fiscal_year": 2026, "total_assets": 665302000000, "period_end_date": "2025-12-31", "accession_number": "0001193125-26-027207", "total_liabilities": 274427000000, "shares_outstanding": 7429000000, "source_filing_date": "2026-01-28", "source_filing_form": "10-Q", "source_filing_link": "https://www.sec.gov/Archives/edgar/data/789019/000119312526027207/" , "operating_cash_flow": 35758000000, "stockholders_equity": 390875000000, "diluted_earnings_per_share": 5.16 } ], "currency": "USD", "company_name": "Microsoft Corporation"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"sec.gov/get_company_financials","input":{"years":2,"period":"quarterly","company":"MSFT"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "sec.gov/get_company_financials" , "input": { "years": 2, "period": "quarterly", "company": "MSFT" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "sec.gov/get_company_financials" , "input": { "years": 2, "period": "quarterly", "company": "MSFT" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run sec.gov/get_company_financials# with {"years":2,"period":"quarterly","company":"MSFT"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "company" ], "properties": { "years": { "type": "integer", "default": 5, "maximum": 15, "minimum": 1, "description": "Number of fiscal years, for example 5." }, "period": { "enum": [ "annual", "quarterly" ], "type": "string", "default": "annual", "description": "Reporting frequency, for example annual." }, "company": { "type": "string", "description": "Company name or stock ticker, for example Microsoft or MSFT." } }}Output schema
{ "type": "object", "required": [ "company_name", "currency", "cik", "periods" ], "properties": { "cik": { "type": "string", "x-fous-developer": true }, "periods": { "type": "array", "items": { "type": "object", "required": [ "fiscal_year", "quarter", "period_end_date", "revenue", "net_income", "diluted_earnings_per_share", "total_assets", "total_liabilities", "stockholders_equity", "cash", "operating_cash_flow", "shares_outstanding", "source_filing_form", "source_filing_date", "source_filing_link", "accession_number" ], "properties": { "cash": { "type": [ "number", "null" ] }, "quarter": { "type": [ "integer", "null" ] }, "revenue": { "type": [ "number", "null" ] }, "net_income": { "type": [ "number", "null" ] }, "fiscal_year": { "type": "integer" }, "total_assets": { "type": [ "number", "null" ] }, "period_end_date": { "type": "string", "format": "date" }, "accession_number": { "type": "string", "x-fous-developer": true }, "total_liabilities": { "type": [ "number", "null" ] }, "shares_outstanding": { "type": [ "number", "null" ] }, "source_filing_date": { "type": [ "string", "null" ], "format": "date" }, "source_filing_form": { "type": "string" }, "source_filing_link": { "type": "string" }, "operating_cash_flow": { "type": [ "number", "null" ] }, "stockholders_equity": { "type": [ "number", "null" ] }, "diluted_earnings_per_share": { "type": [ "number", "null" ] } } } }, "currency": { "type": "string" }, "company_name": { "type": "string" } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
sec.gov/get_company_financials- Returns
- company name, currency, CIK, and per-period revenue, net income, EPS, balance sheet, cash flow, shares and filing references
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method sec.gov/get_company_financials with the inputs above.
Ask your agent
- Pull the last 5 years of annual financials for Microsoft from SEC filings
- What were Apple's quarterly revenue and net income figures for the most recent quarters?
- Get EPS and balance sheet data for Tesla over the past 3 fiscal years
- Show me NVDA's reported cash flow and shares outstanding on sec.gov for the last 10 years
- Can you find Coca-Cola's quarterly earnings figures from EDGAR, including filing references?
See more
All SEC EDGAR methodsFinds a public company by name or ticker in SEC EDGAR and lists its filings, newest first, optionally narrowed by filing type and filing date.
sec.gov/get_company_filingsFinds SEC EDGAR company filings that mention an exact phrase, optionally limited to a company, a filing category and a filing date range, ranked by search relevance; one entry per filing.
sec.gov/search_filingsLists stock transactions reported on Form 4 filings by a company's officers, directors and major owners, newest first. Trades without a reported price have no calculated value.
sec.gov/list_insider_tradesGets a company's quarterly or annual income statement, balance sheet or cash flow lines from its Google Finance quote page, with exact reported amounts and year-over-year changes.
google.com/get_company_financialsLooks up a company by name or ticker on Stock Analysis and returns its annual or quarterly income statement, balance sheet, or cash flow statement for the free periods.
stockanalysis.com/get_financial_statementsLooks up a stock by company name or ticker on Stock Analysis and returns its valuation ratios and company statistics, with the date the figures were last updated.
stockanalysis.com/get_key_statisticsGet a delayed US-listed stock snapshot from its ticker or company name. Analyst labels summarize Finviz's 1-5 mean score; dividend yield uses the estimated dividend when available. Missing metrics return null.
finviz.com/get_stock_snapshotGets earnings reports for a date range, or the upcoming reports and up to four previous reports for one company.
finance.yahoo.com/get_earnings_calendar