> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debtstack.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> The credit API for AI agents

# Welcome to DebtStack

Corporate structure and debt analysis is complex. Even with AI, achieving accuracy, speed, and cost-effectiveness requires significant engineering. DebtStack does this hard work once, giving you instant API access to pre-computed, quality-assured credit data.

## The Problem

Extracting accurate corporate structure and debt data from SEC filings is surprisingly hard:

* **Accuracy challenges**: LLMs return malformed JSON, misinterpret amounts, confuse entity names
* **Speed variability**: A single extraction can take 90-300 seconds with multiple LLM calls
* **Cost uncertainty**: Ad-hoc extraction costs \$0.03-0.50+ per company
* **Expertise required**: Understanding 10-K structure, Exhibit 21, debt footnotes, VIEs

**The Solution**: DebtStack runs extraction once with rigorous QA, then serves pre-computed data via fast API.

## Current Database

**314 companies** covering S\&P 100, NASDAQ 100, and broader S\&P 500, with thousands of debt instruments, credit ratings, CDS spreads, real-time bond pricing, and searchable SEC filing sections. Expanding to 500+ companies.

<CardGroup cols={2}>
  <Card title="Structured Data" icon="database">
    314 companies with debt instruments, credit ratings, covenants, guarantees, collateral, and keyword/semantic/hybrid search across indentures, credit agreements, and SEC filings
  </Card>

  <Card title="AI-Optimized" icon="robot">
    Field selection, powerful filters, and consistent JSON responses designed for LLM consumption
  </Card>

  <Card title="Real-Time Pricing" icon="chart-line">
    Bond pricing from FINRA TRACE with yield-to-maturity and spread calculations
  </Card>

  <Card title="Credit Ratings & Spreads" icon="star">
    S\&P, Moody's, Fitch ratings + CDS spread time series across 250+ companies
  </Card>

  <Card title="Document Search" icon="file-magnifying-glass">
    Full-text search across thousands of SEC filing sections including indentures and credit agreements
  </Card>
</CardGroup>

## Coverage

S\&P 100, NASDAQ 100, and broader S\&P 500 companies across all sectors:

| Sector            | Sample Companies                                      |
| ----------------- | ----------------------------------------------------- |
| Tech              | AAPL, MSFT, NVDA, GOOGL, META, AMZN, TSLA, ORCL, AVGO |
| Financials        | JPM, GS, BAC, WFC, MS                                 |
| Healthcare        | JNJ, UNH, LLY, ABBV, MRK, IDXX, DXCM                  |
| Consumer          | WMT, COST, HD, MCD, KO, PEP, ORLY                     |
| Telecom/Cable     | CHTR, ATUS, TMUS, LUMN                                |
| Energy            | XOM, CVX, OXY                                         |
| Offshore Drilling | RIG, VAL, DO, NE                                      |
| Airlines          | AAL, UAL, DAL                                         |
| Semiconductors    | NVDA, AMD, AVGO, GFS, CDNS                            |

## Quick Example

Find the highest-leverage company among the MAG7:

```python theme={null}
import requests

response = requests.get(
    "https://api.debtstack.ai/v1/companies",
    params={
        "ticker": "AAPL,MSFT,GOOGL,AMZN,NVDA,META,TSLA",
        "fields": "ticker,name,net_leverage_ratio",
        "sort": "-net_leverage_ratio",
        "limit": 1
    },
    headers={"X-API-Key": "ds_xxxxx"}
)

print(response.json())
# {"data": [{"ticker": "TSLA", "name": "Tesla, Inc.", "net_leverage_ratio": 1.8}]}
```

## 14 Core Primitives

DebtStack offers 14 atomic API endpoints optimized for AI agents:

| Primitive         | Endpoint                             | Cost     | Purpose                                        |
| ----------------- | ------------------------------------ | -------- | ---------------------------------------------- |
| Search Companies  | `GET /v1/companies`                  | \$0.05   | Filter by leverage, sector, 15+ filters        |
| Search Bonds      | `GET /v1/bonds`                      | \$0.05   | Find by yield, seniority, maturity             |
| Resolve Bond      | `GET /v1/bonds/resolve`              | \$0.05   | Map CUSIP/ISIN or free-text to bond            |
| Financials        | `GET /v1/financials`                 | \$0.05   | Quarterly income, balance, cash flow           |
| Collateral        | `GET /v1/collateral`                 | \$0.05   | Collateral securing debt                       |
| Covenants         | `GET /v1/covenants`                  | \$0.05   | Search structured covenant data                |
| Ratings           | `GET /v1/ratings`                    | \$0.05   | Credit rating history (S\&P, Moody's, Fitch)   |
| CDS Spreads       | `GET /v1/market/cds`                 | \$0.05   | CDS spread time series                         |
| Compare Covenants | `GET /v1/covenants/compare`          | Business | Compare covenants across companies             |
| Company Changes   | `GET /v1/companies/{ticker}/changes` | \$0.10   | Track debt structure changes                   |
| Traverse Entities | `POST /v1/entities/traverse`         | \$0.15   | Follow guarantor chains                        |
| Search Documents  | `GET /v1/documents/search`           | \$0.15   | Search SEC filings (keyword, semantic, hybrid) |
| Batch             | `POST /v1/batch`                     | Sum      | Execute multiple operations                    |
| Request Coverage  | `POST /v1/coverage/request`          | Free     | Request coverage for non-covered companies     |

## Data Quality

**Estimated data is always flagged.** When data cannot be extracted and must be inferred:

* `issue_date_estimated: true` - Issue date inferred from maturity date
* Future estimated fields follow the same pattern

## Data Freshness

DebtStack extracts directly from the latest SEC EDGAR filings, providing **12-18 months fresher data** than LLMs like ChatGPT or Gemini.

| Source         | Data Period                | NVDA EBITDA Example |
| -------------- | -------------------------- | ------------------- |
| **DebtStack**  | Nov 2025 (FY2026 Q3)       | \$121B              |
| Gemini/ChatGPT | Q1 2025 (knowledge cutoff) | \$39B               |

## Integrations

<CardGroup cols={3}>
  <Card title="LangChain" icon="link" href="/guides/langchain">
    Use DebtStack as a tool in your LangChain agents
  </Card>

  <Card title="MCP" icon="plug" href="/guides/mcp">
    Model Context Protocol integration for Claude
  </Card>

  <Card title="REST API" icon="code" href="/api-reference/overview">
    Direct API access with any HTTP client
  </Card>
</CardGroup>

## Getting Started

<Steps>
  <Step title="Create an account">
    Sign up at [debtstack.ai](https://debtstack.ai) to get your API key
  </Step>

  <Step title="Make your first request">
    Try the quickstart guide to query company data
  </Step>

  <Step title="Explore the API">
    Browse the full API reference for all endpoints
  </Step>
</Steps>

Ready to start? Check out the [Quickstart Guide](/quickstart).
