# Deep Values API

> Grounded value-investing intelligence for US public companies — curated 60-guru 13F tracking, AI multi-analyst research, intrinsic-value models, sentiment, SEC filings, and a drop-in LLM-grounding context block. This file is the machine-readable index of the read-only v1 HTTP API.

## At a glance

- Base URL: https://app.deepvalues.ai/api/v1
- OpenAPI 3.1 spec (source of truth): https://app.deepvalues.ai/api/v1/openapi.json
- Human docs: https://app.deepvalues.ai/developers
- MCP tool manifest: https://app.deepvalues.ai/.well-known/mcp.json
- Capability descriptor: https://app.deepvalues.ai/.well-known/agent.json
- Human-readable prices: https://app.deepvalues.ai/en/pricing

## Quick start

Everything below can be done by an agent alone — no account, browser or human:

1. Try it with no key
2. Get a key
3. Prices
4. Payment
5. Quotas

## Try it with no key

19 read endpoints answer without any Authorization header, up to 25 calls per IP per day (`ai-context`: 1/day). Watch `X-RateLimit-Remaining`; the `Link: …; rel="register"` header points at step 2.

Keyless endpoints: `ai-context`, `intrinsic-value`, `smart-money-holdings`, `smart-money-changes`, `guru-moves`, `verdict`, `mirror-brief`, `gurus`, `guru`, `guru-portfolio`, `theses`, `indicators-buffett`, `indicators-shiller-pe`, `sentiment`, `news`, `companies-search`, `company-overview`, `fundamentals`, `filings`. /research is never keyless.

```bash
curl -s "https://app.deepvalues.ai/api/v1/fundamentals/AAPL"
```

## Get a key

One unauthenticated POST. No account, no browser, no human.

`{}` → a `dv_sk_test_` sandbox key: real data, never billed, 100 metadata calls/day per address, no /research.

`{"email":"…"}` → a `dv_sk_live_` key on a new prepaid account. The first key for an email carries 1 starter credit ($1); at most 3 starter grants and 10 keys per IP per day.

The raw key is shown once and is the only credential — the email is a contact label, not a login. POST again WITH the key as bearer to mint a sibling (rotation); GET https://app.deepvalues.ai/api/v1/keys/me for balance + quota; DELETE it to revoke.

```bash
curl -s -X POST "https://app.deepvalues.ai/api/v1/keys" \
  -H "Content-Type: application/json" \
  -d '{"email":"agent@example.com"}'
```

Then send the key on every call:

```bash
export DV_API_KEY=dv_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
curl -s "https://app.deepvalues.ai/api/v1/ai-context/AAPL?token_budget=6000" \
  -H "Authorization: Bearer $DV_API_KEY"
```

Returns `{ system_prompt, context_block, sources_included, ... }` — drop both strings into your LLM system message to ground it on the ticker.

## Prices

1 credit = $1.00. Prices are per successful call and often fractional — parse them as decimals: 0.001 credits ($0.001) × 8 endpoints; 0.005 credits ($0.005) × 11 endpoints; 3 credits ($3) × 1 endpoint. Everything else is free.

A call is charged only after it returns 2xx; errors are never billed. The per-endpoint price is `price_credits` in https://app.deepvalues.ai/.well-known/agent.json and in the list below. Human-readable: https://app.deepvalues.ai/en/pricing. The call below returns your exact `balanceMicro`.

```bash
curl -s "https://app.deepvalues.ai/api/v1/keys/me" -H "Authorization: Bearer $DV_API_KEY"
```

## Payment

When the balance cannot cover a call you get HTTP 402 (RFC 7807 problem+json) with `price_credits`, `balance_micro` and a `topUp` object. Nothing was charged.

`topUp.checkoutUrl` is a ready-to-pay Stripe Checkout link for the smallest pack (null if Stripe could not be reached — then POST `topUp.checkoutEndpoint`). Packs: "1000" = 10 credits, "5000" = 50 credits, "20000" = 200 credits. The POST below returns `{ "checkoutUrl": "https://checkout.stripe.com/…" }`. Credits land on the key’s balance when Stripe confirms; poll keys/me, then retry.

x402 (USDC, pay-in-the-retry) is not switched on yet: the 402 body says so and carries no `accepts`.

```bash
curl -s -X POST "https://app.deepvalues.ai/api/v1/credits/checkout" \
  -H "Authorization: Bearer $DV_API_KEY" -H "Content-Type: application/json" \
  -d '{"pack":"1000"}'
```

## Quotas

Daily buckets per live key, reset 00:00 UTC: `metadata` 10,000, `ai_research` 50, `webhook_events` 1,000. Over quota → HTTP 429 (RFC 7807) with `retry_after_seconds`.

Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Bucket`.

| Bucket | Daily limit | Notes |
| --- | --- | --- |
| `metadata` | 10,000/day | Most read endpoints; ai-context bills 3 units. |
| `ai_research` | 50/day | The /research briefing endpoint only. |
| `webhook_events` | 1,000/day | Outbound webhook deliveries + test deliveries. |

## Endpoints

### POST https://app.deepvalues.ai/api/v1/keys

The one endpoint that needs no key. Send {} for a dv_sk_test_ sandbox key (real data, small daily quota, never billed, no /research). Send {"email":"…"} for a dv_sk_live_ key on a new prepaid account; the first key for an email carries 1 starter credit ($1.00). Send it with an existing key as the bearer to mint a sibling key on the same account (rotation). The raw key is returned once. The email is a contact label, not a credential.

- Billing: `metadata` bucket, 0 units per call.
- Price: free (no per-call charge).
- Auth: none — this endpoint is how you get a key.
- Contract: https://app.deepvalues.ai/llms/keys-create.md

### GET https://app.deepvalues.ai/api/v1/keys/me

Returns the calling key, the exact balance of the ledger behind it (balanceMicro: integer micro-credits, 1 credit = $1.00 = 1,000,000), what is left in each daily quota bucket, and the environment. Free, and consumes no quota.

- Billing: `metadata` bucket, 0 units per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/keys-me.md

### GET https://app.deepvalues.ai/api/v1/credits/checkout

Lists the prepaid credit packs this key can buy (1 credit = $1.00). Free.

- Billing: `metadata` bucket, 0 units per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/credits-packs.md

### POST https://app.deepvalues.ai/api/v1/credits/checkout

Creates a one-time Stripe Checkout Session for a credit pack, bound to the calling live key’s account. When the payment completes the credits land on that balance; poll GET /keys/me. This is what a 402 `topUp.checkoutEndpoint` points at. Free, consumes no quota.

- Billing: `metadata` bucket, 0 units per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/credits-checkout.md

### DELETE https://app.deepvalues.ai/api/v1/keys/me

The calling key stops authenticating immediately. Any credit balance stays on the account, reachable through its other keys.

- Billing: `metadata` bucket, 0 units per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/keys-revoke.md

### GET https://app.deepvalues.ai/api/v1/account

Returns the calling key, its scopes, environment, and today's usage across all 3 buckets. Self-billing: counts as 1 metadata call.

- Billing: `metadata` bucket, 1 unit per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/account.md

### GET https://app.deepvalues.ai/api/v1/ai-context/{ticker}

Returns a system prompt + structured context block, scoped to one ticker. Drop it into OpenAI/Anthropic/any LLM SDK to ground your chatbot in current Deep Values data without months of plumbing. Bills 3 metadata units.

- Billing: `metadata` bucket, 3 units per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 1 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/ai-context.md

### GET https://app.deepvalues.ai/api/v1/research/{ticker}

The differentiated endpoint: full briefing, bull case, bear case, valuation, investment plan, fair-value range. Bills against your ai_research quota (50/day at $99/mo, $0.10 overage). Currently returns cached results only; fresh-trigger via API arriving next release.

- Billing: `ai_research` bucket, 1 unit per call.
- Price: 3 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/research.md

### GET https://app.deepvalues.ai/api/v1/intrinsic-value/{ticker}

DCF + Owner Earnings + Damodaran intrinsic value

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/intrinsic-value.md

### GET https://app.deepvalues.ai/api/v1/smart-money/holdings

Returns every guru from our 60-name roster who held the requested ticker as of the latest 13F-HR quarter (or a specific historical quarter). Each row includes shares, USD value, % of portfolio, and the auto-classified delta vs the prior quarter.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/smart-money-holdings.md

### GET https://app.deepvalues.ai/api/v1/smart-money/changes

All 13F position changes meeting the materiality threshold (new positions, full exits, ≥25% share-count shifts, OR ≥$100M position size) across our entire 60-guru roster, in the requested window.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/smart-money-changes.md

### GET https://app.deepvalues.ai/api/v1/gurus/moves

The Follow the Pros feed. Every material 13F move — new position, full exit, a share count that moved by 25%, or a position of $100M or more — ordered by the date the filing became public, with a deterministic verdict line on each row. The verdict is identical for every caller: it compares the price when the investor traded, the price now and Deep Values' intrinsic value band, and it never predicts a return or recommends an action. Every row carries the company's legal name beside the ticker (`name`, e.g. "Occidental Petroleum"), or null where we hold none — null rather than the ticker echoed back, so a caller can tell a real name from a placeholder. Rows whose EDGAR filing date we do not yet hold fall back to when the row reached us and say so with filed_at_known: false.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/guru-moves.md

### GET https://app.deepvalues.ai/api/v1/verdict/{ticker}

One guru's disclosed move in one ticker, with the sentence Deep Values publishes about it and every number behind it: the company's legal name beside the ticker (`name`, null where we hold none), the three dates (traded by, filed, seen), the quarter-end close, the current price, and the intrinsic value band. `value` is the callable band (the blend ±25%) and is null whenever the verdict is not a call; `estimates` always carries what the valuation methods actually said, their lowest and highest central estimate, so a reader told we cannot call it can see why. One of six deterministic states — below_value, inside_band, above_value, ran_ahead, too_uncertain, no_value — computed the same way for every caller. The band is Deep Values' blended intrinsic value plus or minus 25%, and `too_uncertain` ("Our estimates disagree too much to call this one.") replaces the three band states when the methods' own central estimates are more than 3x apart, or one of them is not positive: the blend still exists and is still returned in `value`, but it is not a range anyone should be told a price sits inside. It is distinct from `no_value`, which means no valuation was computed at all.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/verdict.md

### GET https://app.deepvalues.ai/api/v1/mirror-brief/{ticker}

The same move as /verdict, flattened into a brief: what the investor did, when, at what price, against our value band, plus the verdict sentence. It carries NO quantity and NO instruction — `sizing` reads "not provided; the reader decides". It describes a public filing and a published value range; it is not advice and not a prediction.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/mirror-brief.md

### GET https://app.deepvalues.ai/api/v1/gurus

60 hand-picked institutional investors — every name a serious value investor would recognize. Filter by style.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/gurus.md

### GET https://app.deepvalues.ai/api/v1/gurus/{slug}

One guru: bio + top holdings

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/guru.md

### GET https://app.deepvalues.ai/api/v1/gurus/{slug}/portfolio

One guru's full portfolio at a quarter

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/guru-portfolio.md

### GET https://app.deepvalues.ai/api/v1/theses

Public investment theses with structured metadata — sentiment, conviction, price target, anchored DVI run. Filter by ticker, conviction, or sentiment.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.005 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/theses.md

### GET https://app.deepvalues.ai/api/v1/indicators/buffett

US corporate equities ÷ GDP, with zones (significantly undervalued through significantly overvalued) and historical percentile.

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/indicators-buffett.md

### GET https://app.deepvalues.ai/api/v1/indicators/shiller-pe

Shiller PE with historical percentile

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/indicators-shiller-pe.md

### GET https://app.deepvalues.ai/api/v1/sentiment/{ticker}

Value-investor sentiment rollup (not WSB noise)

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/sentiment.md

### GET https://app.deepvalues.ai/api/v1/news/{ticker}

Sentiment-scored news

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/news.md

### GET https://app.deepvalues.ai/api/v1/companies

Company search

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/companies-search.md

### GET https://app.deepvalues.ai/api/v1/companies/{ticker}/overview

Company overview

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/company-overview.md

### GET https://app.deepvalues.ai/api/v1/fundamentals/{ticker}

Income + balance + cashflow

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/fundamentals.md

### GET https://app.deepvalues.ai/api/v1/filings/{ticker}

SEC filings (10-K, 10-Q, 8-K, etc)

- Billing: `metadata` bucket, 1 unit per call.
- Price: 0.001 credits per call.
- Auth: `Authorization: Bearer dv_sk_{live|test}_…`, or no header at all for up to 25 calls/day per IP.
- Contract: https://app.deepvalues.ai/llms/filings.md

### GET https://app.deepvalues.ai/api/v1/webhooks

List webhook subscriptions

- Billing: `metadata` bucket, 1 unit per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/webhooks-list.md

### POST https://app.deepvalues.ai/api/v1/webhooks

Subscribe to event types. Returns a signing_secret (shown once) used to verify the X-DV-Signature header on every delivery.

- Billing: `metadata` bucket, 1 unit per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/webhooks-create.md

### DELETE https://app.deepvalues.ai/api/v1/webhooks/{id}

Delete a webhook subscription

- Billing: `metadata` bucket, 1 unit per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/webhooks-delete.md

### POST https://app.deepvalues.ai/api/v1/webhooks/{id}/test

Queues a synthetic event delivery against the named subscription so integrators can verify signing-secret rotation and end-to-end delivery without waiting for a real event. Counts against the webhook_events metered quota.

- Billing: `webhook_events` bucket, 1 unit per call.
- Price: free (no per-call charge).
- Auth: `Authorization: Bearer dv_sk_{live|test}_…` (required).
- Contract: https://app.deepvalues.ai/llms/webhooks-test.md

## Disclaimer

Deep Values sells data and analysis, not investment advice. Outputs are informational and sourced from SEC EDGAR, 13F filings, FRED, and the Deep Values multi-analyst research pipeline; they are not a recommendation to buy or sell any security.
