Skip to main content
StockContext gives an agent everything it needs to analyze a US-listed stock, with provenance on every value and honest refusals instead of confident wrong numbers. Fundamentals are extracted from each filer’s own XBRL statement face and served only after they are re-verified against SEC’s own data. Anything we cannot prove from a filing comes back as a typed refusal — never a guess, a null, or a silent 0. The API is a set of POST JSON tool endpoints under https://api.stockcontext.com. There is no query-string surface and no SDK to learn: send a symbol, read a typed response.
The default wire is schema 2. If you omit schema, you get schema 2. Send { "schema": 1 } only when you intentionally need the frozen legacy wire.

The honesty model

This is the part worth understanding before you write any code.
  • Verified, not scraped. Each fundamentals value is pulled off the statement face of a specific filing, then checked against SEC’s companyconcept API before it is published. A value that fails verification is never served.
  • Refuse, never fabricate. An unprovable schema-2 value is a typed refusal: { "unavailable": "...", "recovery": { "action": "..." } }. Branch on unavailable; the token and recovery action are machine-readable.
  • Exact magnitudes stay exact. Headline numbers use compact cells such as { "v": "112010000000", "d": "≈$112B" }; parse v as a decimal string. Ratios can be plain JSON numbers.
  • Every cell carries provenance. A value is direct (tagged on the filing) or derived (computed from tagged operands). At detail: "full" each cell names its accession, concept, unit, and period so you can trace it back to the source document.
  • Prices are a separate, licensed feed. Market data carries provenance: "licensed_market_data" and its own market clock; the vendor is never named. It is never mixed with the SEC trust chain.
Read Core concepts for the full trust model.

Start here

Quickstart

Create a key, resolve a symbol with stock_search, and read a verified stock_financials response — values and refusals — in a few minutes.

Core concepts

The trust model: SEC verification, typed refusals, provenance levels, decimal-string magnitudes, and the two clocks.

API reference

Base URL, the X-API-Key header, every tool’s parameters, and live response examples.

Build an agent

Connect over hosted MCP, or wire the tools into a function-calling loop over plain HTTP with fetch or httpx.

The endpoints

HTTP surface: 10 data tools + stock_flag, a feedback endpoint. Every endpoint is a POST request to /v1/tools/{name} with a JSON body and the X-API-Key header. stock_universe and stock_technicals are schema-2 only; schema 1 remains frozen.

Coverage

Coverage is data, not a slogan. Use stock_universe to enumerate/filter listings, stock_search to resolve user-entered text, and stock_reference {"catalog":"coverage"} for measured aggregate rates. A listing without fundamentals is marked prices_only when bars are held, otherwise discovery_only; do not guess a value. About 54% of US common stocks serve the complete headline set today (coverage is published live at /status); large foreign ADR filers (20-F/40-F) often serve fundamentals in native currency with valuation ratios refused rather than converted. See Coverage and gaps.

What this API does not do

  • No options, futures, FX, or crypto, and no intraday tick stream or L2/order-book depth. The authoritative price feed is end-of-day; snapshots add an IEX last-sale quote overlay (a thin single venue, not a consolidated real-time feed).
  • No analyst consensus, price targets, transcripts, news, sentiment, or earnings estimates.
  • No forecasts, fair-value targets, or investment advice.
  • Hosted MCP is available at https://stockcontext.com/mcp; plain HTTP remains available for direct REST integrations. See MCP.

Next step

Start with the Quickstart. If you already know the shape of the data, the API reference lists every tool, parameter, and field.