Get SEC filing document text
edgar_get_filing_documentFetch and page through SEC EDGAR filing documents as plain text by document URL or company plus accession number, so you can read risk factors, MD&A, and press releases.
Instructions
WHAT: Fetch the text of one SEC filing document from the EDGAR archives, converted from HTML to plain text and returned in character-paged chunks. WHEN: To read the content of a filing (risk factors, MD&A, an 8-K press release). Identify it by documentUrl from edgar_list_filings, or by company + accessionNumber (the primary document, unless document names another file in that filing). WHEN NOT: To find which filings exist, use edgar_list_filings first. For structured financial values use edgar_get_company_facts. COST: Free. Direct sec.gov requests from this MCP server. No APIFY_TOKEN and no Apify billing. RETURNS: One page of text. nextOffset is null on the last page. Errors: INVALID_INPUT, INVALID_URL, COMPANY_NOT_FOUND, FILING_NOT_FOUND, NOT_FOUND, SEC_FETCH_FAILED (retryable). BEHAVIOR: HTTPS only to www.sec.gov and data.sec.gov. User-Agent is "Fairquery info@getfairquery.com". At most 5 requests/second, shared by every free edgar_* tool. Redirects are refused. Responses are size-capped. The ticker map is cached for 6 hours. APIFY_TOKEN is not read. Large 10-Ks can exceed 500,000 characters; read them in pages. HTML and XML are converted to text unless raw is true. .htm files are treated as HTML even when the content type is missing. PARAMETERS: Give either documentUrl (it wins; company, accessionNumber and document are then ignored) or company + accessionNumber (both required, otherwise INVALID_INPUT). documentUrl must start with https://www.sec.gov/Archives/ (otherwise INVALID_URL). accessionNumber accepts dashed "0000320193-24-000123" or 18 digits. Without document, the filing's primary document is fetched (recent filings, then archived). document is a single file name in that folder, such as "ex99-1.htm", not a path. offset and maxChars are characters of the converted text, or of the raw body when raw is true. Loop with offset = nextOffset until hasMore is false. Do not mix offsets from raw and text mode. .txt files are returned unchanged in either mode. EXAMPLE: {"company":"AAPL","accessionNumber":"0000320193-24-000123","maxChars":20000} -> the first 20000 characters of the 10-K text, with nextOffset for the next page.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "edgar_get_filing_document"
}
}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 | Optional, 1-200 chars; required together with accessionNumber when documentUrl is omitted, ignored when documentUrl is given. Ticker ("AAPL"), CIK ("320193") or registrant-name fragment ("Apple"; the first SEC ticker-map match is used). | |
| document | No | Optional, <= 200 chars, used only with company + accessionNumber. Single file name inside the filing folder, e.g. "ex99-1.htm" (not a path). Default: the 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 |