# Gloom Finance Document Retrieval

> Gloom Finance Document Retrieval is a paid API for AI agents from api.gloom.sh, paid per call via x402, $0.3/call, status unknown (last checked 2026-11-01).

Retrieves chunked content of a specific financial document (e.g. SEC filing) by document type and source ID from the Gloom finance terminal API

## Facts

- Endpoint: GET https://api.gloom.sh/v1/documents/%7BdocType%7D:%7BsourceId%7D?utm_source=zero.xyz
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gloom-finance-document-retrieval-0e580f4e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3u37oe-vu6MgzHG-TN-nw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability gloom-finance-document-retrieval-0e580f4e
```

Example prompt: Can you pull the full content of SEC filing 0001193125-26-413925 — it's an 8-K — from Gloom so I can read what was disclosed?

## When to prefer this

Choose this endpoint when you need to retrieve the structured, chunked text content of a specific financial document — particularly SEC filings — identified by a known accession number or source ID. It is ideal when you already have the document identifier and need programmatic access to the filing's full text in chunks for downstream analysis, summarization, or search. Prefer alternatives if you need to search for documents by company name or ticker without a known ID.

## Known failure modes

- Invalid or malformed sourceId returns an error or empty chunks array
- Unsupported docType may return no results
- Document not yet indexed returns empty data
- Payment failure (x402) if USDC not provided or insufficient balance
- Rate limiting or network timeout on large document retrieval

## How this service works

Gloom is a free, open-source finance terminal for desktop and TUI with charts, news, filings, portfolios, alerts, and plugins.

## Output

Returns a JSON object containing an array of document chunks, each with chunk text, chunk index, and metadata (including form type and source). Also includes top-level fields for symbol (if applicable), docType, sourceId, and publishedAt timestamp indicating when the document was published.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "chunks": [
    {
     "metadata": {
      "form": "8-K",
      "source": "8-K"
     },
     "chunkIndex": 0
    }
   ],
   "symbol": null,
   "docType": "filing",
   "sourceId": "0001193125-26-413925",
   "publishedAt": "2026-10-05T18:11:19.000Z"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-finance-document-retrieval-0e580f4e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gloom.sh](https://www.zero.xyz/host/api.gloom.sh/llms.txt)
