# Margin of Insight > The research API that agents cite. Pre-computed Wall Street-grade equity research as > structured JSON. Free primer (no auth). $1 fundamental, $2 memo via Stripe Link Shared > Payment Token. P50 latency under 200ms. > > LLM self-research equivalent: $7–9 in API calls + 10–20 min latency. Buy the same memo > here for $2. --- ## Who This Is For (Priority Order) ### 1 — AI Agents & LLMs (Primary) Autonomous systems calling research as a tool — portfolio agents, due diligence bots, financial Q&A, screening assistants. Pre-computed equity research as structured JSON. Free tier requires no authentication. Paid endpoints accept a Stripe Link Shared Payment Token (SPT) — no marginofinsight account, no static credential, no pre-funded balance. ### 2 — Small Fund Managers & Family Offices (Secondary) Small funds and individual fund managers who can't afford a Wall Street analyst bench. They hire analyst agents on top of this API for sector coverage, pre-earnings tear sheets, post-earnings recaps, financial model updates, and daily screening. Human-facing pitch lives at https://marginofinsight.com (homepage). The web app is at https://app.marginofinsight.com — per-memo today, coverage subscriptions coming (Phase 3). --- ## Start Here (No Auth) ``` GET https://app.marginofinsight.com/api/v1/research/{ticker}/primer ``` HTML company pages (no auth, agent-readable): ``` GET https://app.marginofinsight.com/stocks/{ticker} GET https://app.marginofinsight.com/stocks/{ticker}/md # Markdown (~3k tokens) ``` MCP server (live, Streamable HTTP): ``` https://app.marginofinsight.com/api/mcp ``` Full OpenAPI spec: https://marginofinsight.com/openapi.json Reference docs: https://marginofinsight.com/docs.html Discovery surfaces (all on marginofinsight.com): - `/.well-known/api-catalog` — RFC 9727 linkset (service-desc, service-doc, status, describedby) - `/.well-known/mcp/server-card.json` — MCP server transport + tools + auth - `/.well-known/agent-skills/index.json` — Anthropic-style skill index (research-stock, request-coverage) with SHA-256 digests - `/robots.txt` — includes Content-Signal directives (search=yes, ai-input=yes, ai-train=no) The homepage also supports markdown content negotiation: `curl -H "Accept: text/markdown" https://marginofinsight.com/` returns this llms.txt as the body. Every HTML response carries a `Link:` header pointing to the surfaces above. --- ## Pricing (Per Call) | Tier | Price | Auth | Steps | Endpoint | |---|---|---|---|---| | Company Primer | Free | None | 3 of 21 | GET https://app.marginofinsight.com/api/v1/research/{ticker}/primer | | Fundamental Analysis | $1.00 | Bearer SPT | 12 of 21 | GET https://app.marginofinsight.com/api/v1/research/{ticker}/fundamental | | Full Investment Memo | $2.00 | Bearer SPT | 21 of 21 | GET https://app.marginofinsight.com/api/v1/research/{ticker}/memo | Coverage is US-listed SEC filers only. Foreign private issuers (20-F) and non-US listings (LSE, TASE, TSX, HKEX) are not supported. --- ## How to Pay (Stripe SPT) Paid endpoints accept a **Stripe Link Shared Payment Token** (`shared_payment.granted_token`, prefix `spt_…`). No marginofinsight account, no pre-funded balance, no static credential. Stateless: each paid call is verified and charged through Stripe in-line. ### Setup (one-time, by your operator) 1. The human operating you signs in to Stripe Link. 2. They read marginofinsight's `network_business_profile` from the well-known endpoint: `GET https://app.marginofinsight.com/api/v1/well-known/spt` 3. They authorize you to spend from their Stripe Link wallet, scoped to that `network_business_profile`. Required scope: `currency=usd`, `usage_limits.max_amount` ≥ 200 cents (covers a memo call), valid `expires_at`. 4. The resulting `spt_…` token is yours. Reuse it until `expires_at` or revocation. ### Per call Pass the token on every paid request: ``` Authorization: Bearer spt_xxxxxxxxxxxx ``` marginofinsight introspects the token, then charges via Stripe `payment_intents.create` with `payment_method_data[shared_payment_granted_token]`. On `succeeded` → the report is delivered. On any other status → HTTP 402 with Stripe's `decline_code` in the response body. ### Lifecycle - Token revocation: marginofinsight subscribes to `shared_payment.granted_token.deactivated` webhooks and invalidates its introspection cache. No action required from you. - Refunds: if a delivery error occurs after a successful charge, marginofinsight issues a `POST /v1/refunds` automatically using the `payment_intent` ID from your call. - Stripe API version: `Stripe-Version: 2026-04-22.preview` (preview-API until SPT GA). ### References - Stripe docs: https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens - Discovery: https://app.marginofinsight.com/api/v1/well-known/spt - Full reference: https://marginofinsight.com/docs.html#authentication --- ## What Each Tier Includes ### Free — Company Primer (steps 1–3) - Business Overview: description, sector, exchange, market cap, employees, business model - Financial Snapshot: revenue, net income, EPS, margins, FCF — last 4 quarters; P/E, P/S, EV/EBITDA - Recent Catalysts: last 90 days earnings beat/miss, guidance changes, upcoming calendar ### $1.00 — Fundamental Analysis (steps 1–12) All Free tier steps plus: - Revenue Breakdown: segment mix, geographic mix, YoY growth, concentration risk - Earnings Transcript Analysis: last 2 quarters — management tone, guidance credibility, analyst pushback - Competitive Positioning: 3–5 peer comparison on growth, margins, valuation multiples - Financial Trends: revenue/margin acceleration, cash generation, capital efficiency - Risk Register: top 5 risks from SEC filings rated by severity and likelihood - Balance Sheet Health: liquidity, leverage, debt maturity, cash runway - Capital Allocation: use of cash, M&A track record, R&D intensity, buyback/dividend cadence - Returns on Capital (ROIC): multi-year ROIC vs. WACC, marginal returns on reinvestment, moat spread - Industry Context: sector tailwinds/headwinds, regulatory environment, macro sensitivities, TAM ### $2.00 — Full Investment Memo (all 21 steps) All $1 tier steps plus: - Moat Analysis: switching costs, network effects, cost advantages, intangibles, durability - Management Quality: track record, compensation alignment, capital allocation history - DCF Valuation: base-case with explicit assumptions (WACC, terminal growth, FCF) - Comparable Analysis: EV/EBITDA, P/E, P/S, P/FCF vs. sector medians and peers - Sensitivity Analysis: DCF outputs across growth + margin scenarios (3×3 matrix) - Scenario Analysis: bear / base / bull thesis with catalysts, probability weights, price targets - Investment Thesis: 3-sentence verdict — what kind of company, key assumption, primary risk - Structured Memo: full JSON envelope + prose investment memo optimized for LLM consumption - Institutional & Insider Activity: 13F holder concentration, top institutional holders, insider Form 4 transactions, net selling/buying trends --- ## API Base URL: `https://app.marginofinsight.com/api/v1/` Machine-readable spec: `https://marginofinsight.com/openapi.json` Status: **Live as of 2026-05-11.** Free and paid tiers both in production. ### Free Endpoints (no auth) ``` GET /api/v1/research/{ticker}/primer Company Primer (JSON) GET /api/v1/coverage All covered tickers + freshness timestamps GET /api/v1/coverage/{ticker} Coverage metadata for one ticker POST /api/v1/coverage/request Request coverage for an uncovered ticker ``` ### Paid Endpoints (Stripe SPT Bearer required) ``` GET /api/v1/research/{ticker}/fundamental Fundamental Analysis ($1.00) GET /api/v1/research/{ticker}/memo Full Investment Memo ($2.00) ``` Auth: `Authorization: Bearer spt_…` — see the "How to Pay" section above. ### Response Envelope Every response includes `generated_at`, `coverage_as_of`, and `freshness_days` so agents can assess data staleness before acting on the research. ```json { "ticker": "AAPL", "company": "Apple Inc.", "exchange": "NASDAQ", "report_type": "primer", "tier": "free", "generated_at": "2026-04-28T09:14:22Z", "coverage_as_of": "2025-Q4", "freshness_days": 12, "steps_included": [1, 2, 3], "data": { "overview": { "description": "...", "sector": "...", "market_cap_usd": 3200000000000 }, "financial_snapshot": { "revenue_ttm": 391000000000 }, "catalysts": { "recent": [], "upcoming": [] } }, "metadata": { "data_sources": ["SEC EDGAR XBRL", "earnings transcripts", "Tavily web search"], "model": "claude-sonnet-4-6", "estimated_self_research_cost_usd": 0.50, "api_version": "v1" } } ``` ### Error Responses ``` 401 SPT malformed, revoked, or expired — re-issue via Stripe Link 402 Stripe decline or usage_limits exceeded — body includes Stripe decline_code 404 Ticker not covered — no charge attempted; POST /api/v1/coverage/request 429 Rate limited — Retry-After header included ``` Example bodies: ```json { "error": "spt_invalid", "message": "Token revoked or expired. Re-issue via Stripe Link." } { "error": "payment_declined", "decline_code": "card_declined" } { "error": "not_covered", "ticker": "XYZ", "request_url": "POST /api/v1/coverage/request", "estimated_ready_hours": 24 } ``` ### x402 Autonomous Agent Payments (Phase 5 — Roadmap) For agents that cannot involve a human operator at all: call any paid endpoint without auth. The server returns HTTP 402 with USDC-on-Base payment terms. Sign the payment with your agent wallet and retry — fully autonomous, no human in the loop. Stripe handles verification via its x402 integration. Target: +4 weeks post-launch. --- ## HTML Company Pages — Learnable URL Taxonomy Agent-readable SSR pages for each covered company. No auth required. Content matches the free JSON primer tier plus a **Key Stats strip** of cite-able headline facts (where available) and `FAQPage` JSON-LD with structured Q&A. Includes Article + Corporation + FAQPage schema. Each ticker has four sub-pages you can navigate to directly once you know the pattern: | Sub-page | URL | Content | Markdown variant | |----------|-----|---------|-----------------| | Overview | `/stocks/{ticker}` | Business model, financial snapshot, catalysts (steps 1–3) + Key Stats strip (TTM ROIC, DCF, Moat, Latest Q, Top Holder, Institutional %) + Bull/Bear case panel | `/stocks/{ticker}/md` | | Financials | `/stocks/{ticker}/financials` | Business model overview + financial snapshot + margin profile, balance sheet, ROIC, DCF, Latest Q Revenue chips + teaser for deeper financial data | `/stocks/{ticker}/financials/md` | | Thesis | `/stocks/{ticker}/thesis` | Business model + catalysts as thesis context + Moat verdict panel + Bull/Bear case panels + Top Institutional Holders fact list + teaser for full thesis | `/stocks/{ticker}/thesis/md` | | Memo (preview) | `/memo/{ticker}` | **Public preview** of the investment memo: research conclusion, business model + moat, bull/bear bullets, Wall Street debate, top catalysts, top risks. Hard-cut paywall fence covers DCF + valuation + management readout + monitoring framework + open questions (API-only via Stripe SPT — call `GET /api/v1/research/{ticker}/memo`). Article + FAQPage JSON-LD with canonical. | — | | Stocks-memo redirect | `/stocks/{ticker}/memo` | 307 to `/memo/{ticker}` (canonical URL); robots-blocked to avoid crawl-budget waste on the hop. | — | **Navigation hint for agents:** All sub-pages link to each other. The markdown variants are ~1–4k tokens and optimized for programmatic consumption. Start at `/stocks/{ticker}/md` for an overview, then navigate to the focused sub-page you need. **Headline facts surfaced free (where extracted):** Each ticker page renders up to 12 cite-able facts directly into SSR HTML — TTM ROIC + period + methodology + WACC + moat spread; DCF base-case fair value + WACC + terminal growth + implied upside; moat label (Wide/Narrow/None/Eroding/Expanding) + one-line rationale; latest standalone fiscal quarter revenue + YoY %; bull-case one-liner (≤30 words); bear-case one-liner; top 3 institutional holders with % of outstanding; **TTM margins (gross/operating/FCF)**; **balance sheet snapshot (cash + short-term investments / total debt / net debt)**; **top 3 directly named competitors**; **top 3 business segments + % of revenue contribution**; **diluted share count + YoY change (negative = buyback)**. Each is also embedded in `FAQPage` JSON-LD answering the matching `[TICKER] DCF?` / `[TICKER] moat?` / `[TICKER] bull case?` / `[TICKER] latest revenue?` / `[TICKER] operating margin?` / `[TICKER] competitors?` / `[TICKER] segments?` / `[TICKER] net debt?` query grammar. **The full reasoning behind each fact** (DCF assumptions + sensitivity matrix + scenario probabilities + price targets + per-holder analysis + management readout + monitoring framework) **stays in the paid tiers.** Source: `headline_metrics.json` SidecarFile (schema v3), produced by `scripts/extract-headline-metrics.mjs`; 393/393 covered tickers backfilled as of 2026-05-21. Base pattern: `https://app.marginofinsight.com/stocks/{ticker}` ### Covered Companies 879 US-listed companies covered (733 with full investment memos), expanding weekly toward the Russell 3000. To keep this index lean, the full per-company list lives in a dedicated file: - **Full markdown list:** https://marginofinsight.com/llms-full.txt — every covered ticker with company name, sector, exchange, and `/stocks/{ticker}` link - **Live JSON API:** `GET https://app.marginofinsight.com/api/v1/coverage` — programmatic coverage with `count_total`, `count_covered`, `count_fresh` - **Sitemap:** https://marginofinsight.com/sitemap.xml Base pattern for any covered ticker: `https://app.marginofinsight.com/stocks/{ticker}` --- ## MCP Server (Live) A Model Context Protocol server is live at `https://app.marginofinsight.com/api/mcp`. Transport: Streamable HTTP (stateless, JSON responses). Built with `@modelcontextprotocol/sdk`. Six tools available: - `get_company_primer(ticker)` — Free - `get_fundamental_analysis(ticker)` — $1.00 (auth via HTTP header, see below) - `get_investment_memo(ticker)` — $2.00 (auth via HTTP header, see below) - `list_coverage()` — Free - `search_research(query)` — Free - `request_coverage(ticker, email?)` — Free ### Connecting an MCP client For native Streamable HTTP clients, pass your SPT in the `Authorization` header: ```json { "mcpServers": { "margin-of-insight": { "transport": "streamable-http", "url": "https://app.marginofinsight.com/api/mcp", "headers": { "Authorization": "Bearer spt_xxxxxxxxxxxx" } } } } ``` For Claude Desktop today (no native Streamable HTTP support yet), bridge via the community `mcp-remote` package: ```json { "mcpServers": { "margin-of-insight": { "command": "npx", "args": ["-y", "mcp-remote", "https://app.marginofinsight.com/api/mcp", "--header", "Authorization:Bearer spt_xxxxxxxxxxxx"] } } } ``` For paid tools, send `Authorization: Bearer spt_…` on the Streamable HTTP transport — the same Stripe Link Shared Payment Token used for the REST API. No per-tool `api_key` argument. Discovery: `GET https://app.marginofinsight.com/api/v1/well-known/spt`. --- ## Pricing for Funds (Coming Soon) A subscription product for human fund managers running full coverage on a universe of names is in the works. Plans and pricing have not been finalized publicly. Waitlist on the homepage: https://marginofinsight.com/#pricing-funds. This is a human surface only — agents continue to pay per-call via SPT ($0 primer, $1 fundamental, $2 memo). --- ## Coverage US-listed SEC filers only. 879 companies covered. Russell 3000 is the target. Live counts via GET https://app.marginofinsight.com/api/v1/coverage (fields: count_total, count_covered, count_fresh). Coverage expands weekly. If a ticker is not covered, request it via `POST /api/v1/coverage/request` — fulfilled within 24–48 hours at no charge. Machine-readable coverage list: `GET https://app.marginofinsight.com/api/v1/coverage` --- ## Key Pages - [Home](https://marginofinsight.com): Fund-manager landing page; agent section at `#for-agents` - [Coverage Universe](https://marginofinsight.com/coverage): All covered companies (static) - [Coverage Index](https://app.marginofinsight.com/stocks): Live SSR coverage index - [Reference Docs](https://marginofinsight.com/docs.html): Full API reference with SPT auth details - [OpenAPI Spec](https://marginofinsight.com/openapi.json): Machine-readable OpenAPI 3.1 spec - [SPT Discovery](https://app.marginofinsight.com/api/v1/well-known/spt): `network_business_profile` for scoping your SPT - [For Agents](https://marginofinsight.com/#for-agents): Agent-targeted section on the homepage --- ## Disambiguation - "Margin of Insight" is the platform name, not a financial metric. - All research output is for informational purposes only. Not investment advice. - The platform does not hold positions in covered companies as a precondition of coverage.