Get SEC filing document text
edgar_get_filing_documentFetch the text of an SEC filing document from EDGAR, converted to plain text and paged in character chunks for reading risk factors, MD&A, or press releases.
Instructions
Fetch the text of an SEC filing document from the sec.gov EDGAR archives, converted from HTML to plain text, returned in character-paged chunks. Use to read the actual content of a filing (risk factors, MD&A, 8-K press release, ...). Identify the document by documentUrl (from edgar_list_filings), or by company + accessionNumber (the primary document is used unless document names another file in the filing). Behavior: free, read-only GET to www.sec.gov (no token). Large 10-Ks can exceed 500k characters; read them in pages with offset/maxChars (nextOffset is returned). Only https://www.sec.gov/Archives/ URLs are accepted. RETURNS: {document_url,content_type,total_chars,offset,returned_chars,hasMore,nextOffset,text}. Errors: INVALID_URL, COMPANY_NOT_FOUND, FILING_NOT_FOUND, NOT_FOUND, SEC_FETCH_FAILED. WHEN NOT TO USE: to find which filings exist use edgar_list_filings first; for structured financial values use edgar_get_company_facts (no text parsing needed). COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: give EITHER documentUrl (wins if present; company/accessionNumber/document are then ignored) OR company + accessionNumber (both required together, else INVALID_INPUT). accessionNumber accepts dashed "0000320193-24-000123" or 18 plain digits; without document the filing's primary document is fetched (looked up in recent, then archived filings), with document that file name inside the same filing folder is fetched directly (e.g. an exhibit "ex99-1.htm" listed on index_url). offset and maxChars are measured in characters of the converted text (or of the raw body when raw=true), not bytes: loop with offset = nextOffset until hasMore is false. raw=true returns the original HTML/XML unchanged, so total_chars and offsets differ from text mode; do not mix offsets from the two modes. Non-HTML files (.txt) are returned as is in either mode. EXAMPLE: {"company":"AAPL","accessionNumber":"0000320193-24-000123","maxChars":20000} -> first 20000 chars of the 10-K text with nextOffset for the next page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Optional boolean, default false. true returns the raw HTML/XML body instead of extracted plain text (offsets then refer to the raw body) | |
| offset | No | Optional integer >= 0, default 0. Character offset into the (converted) document to start from; pass nextOffset from the previous page. Example: 20000 | |
| company | No | Required, 1-200 chars. Ticker ("AAPL", case-insensitive), CIK of 1-10 digits ("320193" or "0000320193"; any SEC filer, even without a ticker) or registrant-name fragment ("Apple"; the first SEC ticker-map match is used). Call edgar_resolve_company first if a name is ambiguous. | |
| document | No | Optional, <= 200 chars, used only with company + accessionNumber. File name inside the filing folder to fetch instead of the primary document, e.g. "ex99-1.htm". Default: primary document | |
| maxChars | No | Optional integer 500-100000, default 20000. Max characters returned in this page. Example: 50000 | |
| documentUrl | No | Optional (alternative to company + accessionNumber). Full URL that must start with https://www.sec.gov/Archives/ (else INVALID_URL), usually document_url from edgar_list_filings. Example: https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm | |
| accessionNumber | No | Optional; required together with company when documentUrl is omitted. Format 10-2-6 digits with optional dashes (pattern ^\d{10}-?\d{2}-?\d{6}$), e.g. "0000320193-24-000123" or "000032019324000123" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| offset | Yes | ||
| hasMore | Yes | ||
| nextOffset | Yes | ||
| total_chars | Yes | ||
| content_type | Yes | ||
| document_url | Yes | ||
| returned_chars | Yes |