# `POST /data/filing-sections`

**Purpose:** The MD&A, risk factors and market risk sections of one 10-K, 10-Q, 20-F or 40-F filed with the SEC, cut from the filing's own document — as plain text (default) or the original HTML. Each section says how it was found (`located_by`). Which filings have them: `has_sections` in [`POST /data/filings`](/documents/post-datafilings.md).

Where each section sits:

| Form | `mdna` | `risk_factors` | `market_risk` |
|---|---|---|---|
| 10-K | Item 7 | Item 1A | Item 7A |
| 10-Q | Part I, Item 2 | Part II, Item 1A | Part I, Item 3 |
| 20-F | Item 5 (Operating and Financial Review) | Item 3.D | Item 11 |
| 40-F | The MD&A exhibit | Risk Factors of the Annual Information Form | The market risk part of the MD&A (`none` when it has none) |

**Filing selection:** standard (`filing_id` **or** `ticker` + `fiscal_year` + `form_type` + optional `quarter`).

**Request:**

| Field | Type | Required | Notes |
|-------|------|----------|--------|
| `filing_id` | integer | Conditional | |
| `ticker` | string | Conditional | |
| `form_type` | string | No | Default `10-K`. |
| `fiscal_year` | integer | Conditional | |
| `quarter` | string | No | |
| `sections` | array | No | `"mdna"` (the MD&A) and/or `"risk"` (risk factors and market risk), each once. Default: both. |
| `format` | string | No | `"text"` (default): plain text; a table row is one line with its cells joined by ` \| `, hidden inline-XBRL content left out. `"html"`: the filing's original HTML, styles and inline-XBRL tags included. |
| `as_of_date` | string | No | `YYYY-MM-DD`, not in the future: the filing must have been filed by then, and a section an amendment replaced later is returned as it stood that day. |
| `detail` | string | No | `"full"` (default) or `"minimal"` (each section's `section`, `located_by` and `amended_by`, and each part's `role` and text or HTML); `"light"` returns the minimal view. See [Response detail](/documents/responses.md#response-detail). |

**Response:**

| Field | Meaning |
|-------|---------|
| `ticker`, `form_type`, `fiscal_year`, `quarter` | Filing identity. |
| `source_url_prefix` | The filing's folder on EDGAR; each part's `source_locator` is relative to it. Not in the minimal view. |
| `format` | `text` or `html`, as asked. Not in the minimal view. |
| `sections` | One object per section asked for, in the order `mdna`, `risk_factors`, `market_risk`: `"mdna"` returns `mdna`, `"risk"` returns `risk_factors` and `market_risk`. |
| `sections[].section` | `mdna`, `risk_factors` or `market_risk`. |
| `sections[].located_by` | How it was found (below). |
| `sections[].note` | Optional, what else to know about how it was found (below). |
| `sections[].amended_by` | Present when this version comes from an amendment (10-K/A …) that re-filed the section: `{accession, form_type, filing_date}`. |
| `sections[].parts` | The section's parts, in document order. Usually one; a section the filing writes in two places has two (see `cross_reference_section`). |
| `parts[].role` | `section`: the section's text. `reference`: the sentence under the Item heading that points to where the text is ("see … in Management's Discussion and Analysis"). |
| `parts[].start_text` | The part's first line, usually the section heading. |
| `parts[].next_section_text` | The first line after the part, usually the next section's heading; `null` at the end of the document. |
| `parts[].source_locator` | The document the part was cut from, relative to `source_url_prefix` (an amendment's document is `../<accession>/<document>`). |
| `parts[].text` / `parts[].html` | The part's content, by `format`. |
| `credits_used` | Always **28** when successful. |

`located_by`:

| Value | Meaning |
|---|---|
| `item_heading` | From its Item heading to the next Item heading — the common case. |
| `titled_section` | The document carries no Item numbers; cut by the section's title. |
| `cross_reference_section` | The Item holds only a pointer; the parts are that pointer (`reference`) and the section it names (`section`), up to four. |
| `cross_reference` | Only the pointer: the text it names is not in this filing (a note, an earlier 10-K) or could not be told apart. |
| `exhibit13` / `exhibit99` | (`mdna` only) The MD&A is in the annual-report exhibit (EX-13) or, for a 40-F, the MD&A exhibit (EX-99). |
| `combined_with_mdna` | (`market_risk` only) Items 7 and 7A are one section; its text is in `mdna`. No parts. |
| `none` | The filing has no such section (a 10-Q need not repeat Item 1A; some filers omit market risk). No parts. |
| `not_found` | The filing has the section but it was not cut. No parts. |
| `not_cut` | The filing's document could not be read. No parts. |

`note` values include `prior_10k` (a 10-Q's section only says nothing changed since the annual report), `refers_elsewhere` (a pointer to a place that could not be found), `aif` / `aif_to_mdna` (40-F risk factors from the Annual Information Form, or from the MD&A it points to), `body_doc` (taken from the 10-K body when the main document is the annual-report exhibit).

**Errors:**

| HTTP | `error_code` | When |
|------|----------------|------|
| 400 | `DATA_FILING_QUARTER_REQUIRED` | Ambiguous quarterly filings (charged). |
| 404 | `DATA_FILING_NOT_FOUND` | Filing not found. **Still charged 28 credits.** |
| 404 | `DATA_FILING_NOT_YET_FILED` | The filing had not been filed by `as_of_date`. **Still charged 28 credits.** |
| 400 | `DATA_SECTIONS_UNSUPPORTED_FOR_KR`, `_JP`, `_EU`, `_CN` | The filing is a Korean, Japanese, European or China A-share filing. **Still charged 28 credits.** |
| 404 | `DATA_SECTIONS_NOT_FOUND` | The filing has no sections on file (`has_sections` false). **Still charged 28 credits.** |
| 404 | `DATA_SECTIONS_OBJECT_MISSING` | The sections were found but their content is unavailable. **Still charged 28 credits.** |
| 400 | `AS_OF_DATE_UNSUPPORTED_REGION` | `as_of_date` for a company outside the US. Not charged. |
| 403 | `PLAN_TIER_INSUFFICIENT_HISTORY` | The filing, named by `ticker` and `fiscal_year`, is before your plan's history window. Not charged. |
| 403 | `PLAN_TIER_INSUFFICIENT`, `PLAN_TIER_INSUFFICIENT_COVERAGE` | The filing (by `filing_id`) or the company (by `ticker`) is outside your plan. **Charged 28.** |
| 402 | `CREDITS_INSUFFICIENT` | Insufficient credits. |
| 422 | — | Validation. |

**Example Request:**

```json
{
  "ticker": "AAPL",
  "fiscal_year": 2026,
  "sections": ["risk"]
}
```

**Example Response:**

```json
{
  "ticker": "AAPL",
  "form_type": "10-K",
  "fiscal_year": 2026,
  "quarter": "FY",
  "source_url_prefix": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019326000026/",
  "format": "text",
  "sections": [
    {
      "section": "risk_factors",
      "located_by": "item_heading",
      "parts": [
        {
          "role": "section",
          "start_text": "Item 1A.    Risk Factors",
          "next_section_text": "Item 1B.    Unresolved Staff Comments",
          "source_locator": "aapl-20260926.htm",
          "text": "Item 1A. Risk Factors\n\nThe following summarizes factors that could have a material adverse effect on the Company’s business, reputation, results of operations, financial condition and stock price. …"
        }
      ]
    },
    {
      "section": "market_risk",
      "located_by": "item_heading",
      "parts": [
        {
          "role": "section",
          "start_text": "Item 7A.    Quantitative and Qualitative Disclosures About Market Risk",
          "next_section_text": "Item 8.    Financial Statements and Supplementary Data",
          "source_locator": "aapl-20260926.htm",
          "text": "Item 7A. Quantitative and Qualitative Disclosures About Market Risk\n\nThe Company is exposed to economic risk from interest rates and foreign exchange rates. …"
        }
      ]
    }
  ],
  "credits_used": 28,
  "_warnings": [
    "Some sections were omitted because the request included sections. To retrieve both the MD&A and the risk sections, omit the sections field."
  ]
}
```
