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

# SEC Filing Diff

> Compare two of a company’s SEC filings and report section-level changes.

Compare two SEC filings for the same company across fiscal periods and report what
changed, section by section.
Returns a compact per-section manifest (changed, unchanged, or unavailable, with line
counts and a prose churn percentage for changed sections) alongside a rendered Markdown
report. Summary mode returns the manifest only; diff mode adds the changed hunks.

**Endpoint:** `POST /api/v1/sec/diff`

**Tier:** point · **Delivery:** sync

## Request

| Field      | Type                                                                  |
| ---------- | --------------------------------------------------------------------- |
| `ticker`   | `string`                                                              |
| `base`     | `object\{year: number; period: "FY" \| "Q1" \| "Q2" \| "Q3" \| "Q4"}` |
| `compare`  | `object\{year: number; period: "FY" \| "Q1" \| "Q2" \| "Q3" \| "Q4"}` |
| `sections` | `string`                                                              |
| `mode`     | `"diff" \| "raw" \| "summary"`                                        |
| `qa`       | `boolean`                                                             |

## Response

The response is the two-key envelope `{ finterm, data }`, where `data` is the `finterm.result:SecFilingDiff/v1` contract:

| Field      | Description                                                                                                                                                       |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ticker`   | The stock ticker symbol, uppercased (e.g. "AAPL").                                                                                                                |
| `base`     | The baseline (earlier) filing reference: fiscal year and period, plus the resolved form type, filing date, and period-end date when available.                    |
| `compare`  | The comparison (later) filing reference: fiscal year and period, plus the resolved form type, filing date, and period-end date when available.                    |
| `mode`     | The output mode: "diff" (changed hunks), "summary" (manifest only), or "raw" (both section texts in the report).                                                  |
| `manifest` | Per-section change summary. Each row gives the section name, its status, and, for changed sections, the added/removed line counts and the prose churn percentage. |
| `report`   | The rendered comparison report in Markdown, or null when the report was delivered out of band.                                                                    |

## Example

```bash theme={"system"}
finterm tool sec_filing_diff AAPL --base 2023:FY --compare 2024:FY --sections risk_factors --mode summary
```
