Documentation
Everything you need to connect EdgarStack to Claude or your own scripts.
MCP connector (claude.ai, Claude Desktop, Cowork)
Your API key doubles as your connector URL — no separate auth step.
- claude.ai → Settings → Connectors (or Organization Settings → Connectors for Team/Enterprise)
- Click + Add custom connector
- Name it "EdgarStack", paste the URL:
https://edgarstack.com/mcp/<your-api-key> - Click Add — it should show a green "Connected" status
- In any conversation: + → Connectors → toggle it on, then just ask
efm_live_xxxxxxxx…. Keep it private — it's tied to your subscription and works as both your MCP URL and your REST API header.REST API
Same underlying data, same auth backend, plain HTTP for anything that doesn't speak MCP — scripts, dashboards, notebooks.
curl https://edgarstack.com/api/v1/financials/AAPL \
-H "X-API-Key: efm_live_yourkeyhere"
All requests need the X-API-Key header. There's no separate REST-only key — the same key from your signup email works everywhere.
Endpoints
| Method | Path | Notes |
|---|---|---|
| GET | /api/v1/companies/:ticker | Ticker → CIK + registered name |
| GET | /api/v1/financials/:ticker | ?period=annual|quarterly&metrics=revenue,netIncome&limit=8 |
| GET | /api/v1/ratios/:ticker | ?period=annual|quarterly&limit=5 |
| POST | /api/v1/peer-compare | Body: { tickers: [...], metric, period } |
| GET | /api/v1/filings/:ticker | ?formType=10-K|10-Q|8-K&limit=4 |
| POST | /api/v1/filing-section | Body: { ticker, accessionNumber, primaryDocument, formType, itemNumber } |
| POST | /api/v1/diff | Body: { oldText, newText } |
| GET | /api/v1/search | ?q=...&forms=10-K,10-Q&dateFrom=2026-01-01&dateTo=2026-06-01&limit=10 |
| GET | /api/v1/screen | ?metric=rdExpense&year=2024&min=1000000000&sort=desc&limit=20 — screen all SEC filers by one metric, no tickers required |
| GET | /api/v1/screen-ratio | ?ratio=rdIntensity&year=2024&min=0.1&sort=desc&limit=20 — screen all SEC filers by a computed ratio (or ?numerator=...&denominator=... for a custom pairing) |
| GET | /api/v1/valuation/:ticker | ?period=annual|quarterly — P/E, P/S, P/B, EV/Revenue, EV/EBITDA, market cap, enterprise value |
| GET | /api/v1/model/:ticker | ?limit=5&includeValuation=true|false — downloads a formula-driven .xlsx financial model. Annual periods only. |
| GET | /api/v1/insider-activity/:ticker | ?limit=20 — recent Form 3/4/5 transactions: who traded, when, how much, and at what price |
financials, ratios, and peer-compare support 39 metrics in total: revenue, grossProfit, operatingIncome, netIncome, epsBasic, epsDiluted, totalAssets, currentAssets, totalLiabilities, currentLiabilities, longTermDebt, totalEquity, cashAndEquivalents, operatingCashFlow, capex, rdExpense, sharesOutstanding, dividendsPerShare, dividendsPaid, stockBasedCompensation, deferredRevenue, goodwill, intangibleAssets, depreciationAmortization, costOfGoodsSold, sellingGeneralAndAdministrative, interestExpense, otherNonoperatingIncomeExpense, pretaxIncome, incomeTaxExpense, shortTermInvestments, weightedAverageDilutedShares, shareRepurchases, accountsReceivable, inventory, accountsPayable, propertyPlantAndEquipment, investingCashFlow, and financingCashFlow.ratios also computes working-capital metrics from the balance sheet fields above: days sales outstanding, days inventory outstanding, days payable outstanding, and the cash conversion cycle (DSO + DIO - DPO)./api/v1/screen uses SEC's XBRL Frames API, which indexes by one exact tag per period — a filer reporting the same concept under a different synonym tag for that period won't show up in results. Not every metric above is screenable this way; the ones that are: revenue, grossProfit, operatingIncome, netIncome, epsBasic, epsDiluted, totalAssets, currentAssets, totalLiabilities, currentLiabilities, longTermDebt, totalEquity, cashAndEquivalents, operatingCashFlow, capex, rdExpense./api/v1/valuation combines a live spot price (via Finnhub — not SEC data) with the most recently reported period's fundamentals. It's a point-in-time multiple, not a trailing-twelve-month calculation. Free-tier quotes run about 20 minutes delayed — treat the price as indicative, not execution-grade./api/v1/model generates Readme, Source Data, Standardized Data, Assumptions, Historical Model, Forecast, Dashboard, and Audit Flags tabs (plus Valuation if requested) from live SEC data — annual periods only, since quarterly data has a structural Q4 gap (see the note under build_financial_model below)./api/v1/insider-activity covers Forms 3, 4, and 5 only — officer/director/10%-owner trades in their own company's stock. It does not cover institutional 13F holdings or >5% beneficial ownership filings (13D/13G)./api/v1/screen-ratio presets: grossMargin, operatingMargin, netMargin, rdIntensity, capexIntensity, fcfMargin, currentRatio, debtToEquity, returnOnAssets, returnOnEquity, cashToAssets, assetTurnover — the same ratio definitions compute_ratios uses per-company, just ranked market-wide. Joins two (or three) separate XBRL frame queries by CIK, so a filer must report every underlying tag the ratio needs for the same period to show up at all.Tools & sample prompts
The same 13 tools power both the MCP connector and the REST API above. If you're using the MCP connector in Claude, here's a sample prompt for each one — you don't need to name the tool, just ask naturally and Claude calls it for you.
lookup_company
Resolve a ticker to its SEC CIK number and registered name — the starting point everything else builds on.
"What's Nvidia's SEC CIK number?"
get_financials
Standardized line items across periods, with source XBRL tags and accession numbers.
"Pull Costco's last 5 years of revenue, gross margin, and R&D spend."
compute_ratios
Margins, liquidity, leverage, returns, and working-capital ratios — computed from the data, not eyeballed off a PDF.
"What's Target's current ratio, debt-to-equity, and cash conversion cycle over the last 5 years?"
peer_compare
One metric across multiple tickers' latest reported period — an instant comp table.
"Compare operating margin across AAPL, MSFT, GOOGL, and META for their most recent fiscal year."
list_recent_filings
Recent 10-K / 10-Q / 8-K filings with accession numbers, ready to feed into the section and diff tools below.
"Show me Tesla's last 4 10-Q filings with their accession numbers."
get_filing_section
Extract one Item section's text — Risk Factors, MD&A, and more — straight out of a real filing.
"Pull the Risk Factors section from Amazon's most recent 10-K."
diff_filing_sections
Sentence-level diff between the same section in two filings — see exactly what management added or quietly dropped.
"What changed in Meta's Risk Factors between their last two 10-Ks?"
full_text_search
Search the actual text inside every SEC filer's filings since 2001 — not just one company's.
"Which companies mentioned 'material weakness' in a 10-K filed in the last 6 months?"
screen_by_metric
Find companies across ALL SEC filers matching a threshold on one metric for a period — screen the market, don't just check tickers you already know.
"Find all SEC filers with R&D expense over $1 billion in fiscal year 2024."
get_valuation
P/E, P/S, P/B, EV/Revenue, EV/EBITDA — combines a live price with the latest SEC fundamentals.
"What's Microsoft's P/E, EV/EBITDA, and market cap right now?"
build_financial_model
A branded, formula-driven Excel model generated straight from SEC data — no manual assembly. Annual periods only (EdgarStack's quarterly data has a structural gap: Q4 is only ever embedded inside the 10-K, never filed as a standalone 10-Q). Claude will ask whether you want a Valuation tab before building, since that tab pulls a live price and is a point-in-time snapshot rather than pure historical data.
"Build me a financial model for AAPL using EdgarStack."
get_insider_activity
Recent Form 3/4/5 transactions — decoded transaction codes, a buy/sell summary, and who's behind each trade (officer, director, or 10%+ owner). Covers open-market trades, grants, and RSU/option exercises; doesn't cover 13F institutional holdings or 13D/13G beneficial-ownership filings.
"Has Apple's CEO or any other insider bought or sold shares recently?"
screen_by_ratio
Rank ALL SEC filers by a computed ratio for a period — margins, returns, leverage, capital intensity — not just a single raw metric. Use a named preset or any custom numerator/denominator pairing from the screenable metric list.
"Which SEC filers have the highest R&D spend as a percentage of revenue, among companies with at least $1B in revenue?"
Status codes
| Code | Meaning |
|---|---|
| 401 | Key not recognized — missing, unknown, or malformed |
| 402 | Key recognized, but your subscription has lapsed (trial ended, cancelled, expired) |
| 404 | Ticker not found — EDGAR only covers US-listed/SEC-reporting companies |