Site sec.govTask search-edgar-full-text-filingsVersion v2Updated Sep 16, 2026Category research
Search EDGAR full-text filings with form and filing-date filters, detect the 10,000-result cap, recursively partition date ranges, paginate each leaf, and return deduplicated accession records. This skill was captured from a live agent session on sec.gov and is published here as a reusable recipe for agents.
NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.
Search the SEC EDGAR full-text index through its JSON endpoint, test whether the requested range reaches the 10,000-result cap, recursively split capped date ranges, paginate uncapped leaves, and return deduplicated accession records with canonical SEC URLs.
Use Cases
Find filings containing a term across a custom filing-date range.
Search without a form restriction or restrict results to selected forms.
Enumerate every distinct accession number across capped result sets.
Return matching-document and filing-index URLs.
Automation Flow
Build https://efts.sec.gov/LATEST/search-index?q={query}&forms={forms}&dateRange=custom&startdt={start-date}&enddt={end-date}&from=0; omit forms for unrestricted searches.
Goto the URL with waitUntil: domContentLoaded. The JSON endpoint is the primary data source; the human UI is only a fallback.
Run this evaluate() on the loaded JSON endpoint; it recursively splits ranges reporting gte or at least 10,000 hits, paginates each leaf by its actual returned raw hit count, retries transient failures, deduplicates by accession, and reports incomplete coverage when a window remains saturated or ends early:
Zero-based API offset; extractor manages pagination
0
Possible Friction Points
Trigger
Action
Unbounded or broad range reports total_results: 10000 with relation gte
Use the extractor's recursive, non-overlapping date splitting and merge records by accession number.
A pagination request such as offset 900 returns HTTP 500
Retry with backoff; if it persists, rerun that date partition as smaller ranges, such as months, and union accessions.
Long recursive in-page enumeration raises Failed to fetch or resets the browser session
Run separate monthly or yearly date-range navigations and merge their returned accession numbers instead of one full-span evaluate().
Matching-file identifier is absent from result _id
Keep matching_file and document URL null while retaining the filing-index URL.
A single-day window still reaches the cap, or a page ends before the reported total
Return status: partial and the affected window; narrow by additional filters. Never claim full enumeration.
from is a raw hit offset, not a page number. Advance by hits.hits.length before filtering forms or deduplicating accessions. Never assume a fixed 10- or 100-hit batch; a request or server default can return fewer hits.
For direct HTTP clients, identify the requester with a descriptive User-Agent such as Your Company contact@example.com. Browser JavaScript cannot set that header; configure it in the HTTP client or browser session. Keep aggregate traffic within SEC's fair-access guidance of 10 requests per second; the sequential extractors pause between requests.
forms=10-K may include amendments. These extractors filter exact _source.form values after pagination; raw hit totals can exceed returned distinct filings.
Additional filters use ciks, plural locationCodes, and locationType=incorporated when applicable. Preserve them on pagination URLs. SIC is available in response metadata; do not assume a SIC query parameter is supported.
Matching document filenames come from the suffix of _id after :. The search response does not supply matched-text snippets; fetch the document separately when needed. Preserve co-registrant arrays instead of treating every filing as a single filer.