Batch export filings & facts via Apify Actor (paid)
edgar_batch_exportBulk export SEC EDGAR filings and XBRL facts for up to 50 US companies in one call, with optional primary-document text excerpts.
Instructions
Bulk export (paid, via Apify) of structured SEC EDGAR data for up to 50 US companies in one call: entity metadata, recent filings (10-K, 10-Q, 8-K, S-1, DEF 14A, ...) with document URLs, XBRL financial facts (Assets, Revenues, NetIncomeLoss, EarningsPerShareDiluted, ...) and optional plain-text excerpts of primary filing documents.
WHEN TO USE: only when you need filing and/or fact rows for 5+ companies in one dataset, or text excerpts in bulk; for 1-4 companies call edgar_list_filings / edgar_get_company_facts per company (free). mode="filings" for filing history/links, "facts" for financial numbers, "both" for both. Not for real-time quotes, prices, options, non-US companies or investment advice.
BEHAVIOR: runs the Fairquery Apify Actor fairquery/edgar-company-facts-filings via the Apify API, which queries sec.gov (throttled to <=5 req/s). Requires the APIFY_TOKEN environment variable. Typical run 5-60 s; the call waits up to 5 minutes.
COST: paid (billed to your Apify account, pay-per-event): $0.00005 per run, $0.0015 per resolved company, $0.001 per filing row, $0.0002 per fact row, $0.002 per text excerpt. Example: 1 company, 5 filings, 3 metrics x 4 values ~ $0.009.
RETURNS: rows of type company | filing | fact | text_excerpt | error; error rows carry code (INPUT_EMPTY, COMPANY_NOT_FOUND, RESOLVE_FAILED, SUBMISSIONS_FETCH_FAILED, FACTS_FETCH_FAILED, EXCERPT_FETCH_FAILED) and retryable, so an unresolvable company never fails the whole call.
WHEN NOT TO USE: interactive lookups or 1-4 companies - use the free edgar_* tools (same SEC data).
PARAMETERS: companies: each entry is resolved by the Actor as ticker, CIK or name fragment and billed once when resolved; unresolvable entries yield a free COMPANY_NOT_FOUND row. mode controls which other parameters apply: formTypes, since, maxFilingsPerCompany and includeTextExcerpt/excerptMaxChars only affect "filings"/"both"; metrics and maxFactsPerMetric only affect "facts"/"both". Billed rows per call = resolved companies + companies x min(maxFilingsPerCompany, matching filings) + companies x metrics x units x maxFactsPerMetric (+ one excerpt per filing row when includeTextExcerpt=true), so size those three numbers first. Omitted optional fields take the Actor's input defaults: formTypes ["10-K","10-Q","8-K"] (pass [] for every form type), maxFilingsPerCompany 5, metrics Assets, NetIncomeLoss, EarningsPerShareDiluted, Revenues (pass [] for a built-in 10-concept set), maxFactsPerMetric 4, excerptMaxChars 2000. since compares filing_date (inclusive); metrics are case-sensitive us-gaap/dei names.
EXAMPLE: {"companies":["AAPL","MSFT"],"mode":"facts","metrics":["Revenues"],"maxFactsPerMetric":4} -> company + fact rows ($0.005).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"companies": "<companies>"
},
"name": "edgar_batch_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional, one of "filings" | "facts" | "both", default "both". "filings" = filing rows only, "facts" = XBRL fact rows only; a company row is always included when resolved. Example: "facts" | both |
| since | No | Optional, default no lower bound. Only filings with filing date >= this date, format YYYY-MM-DD (pattern ^\d{4}-\d{2}-\d{2}$), e.g. "2023-01-01". Ignored when mode="facts". | |
| metrics | No | Optional; omitted = Actor default ["Assets","NetIncomeLoss","EarningsPerShareDiluted","Revenues"], [] = built-in 10-concept set. Case-sensitive us-gaap/dei concept names. Example: ["Assets","Revenues"]. Ignored when mode="filings". | |
| companies | Yes | Required. 1-50 tickers ("AAPL"), CIKs ("320193") or company name fragments ("Apple"); billed once per resolved company. Example: ["AAPL","MSFT"] | |
| formTypes | No | Optional; omitted = Actor default ["10-K","10-Q","8-K"], [] = all forms. Exact form types (case-insensitive), e.g. ["10-K","10-Q"] or ["8-K"]. Ignored when mode="facts". | |
| excerptMaxChars | No | Optional integer, default 2000 characters per excerpt; the Actor accepts 200-20000 (values outside fail its input validation). Only used with includeTextExcerpt=true. Example: 5000 | |
| maxFactsPerMetric | No | Optional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed. Example: 4 | |
| includeTextExcerpt | No | Optional boolean, default false. true adds a billed plain-text excerpt row of each filing's primary document (slower). Ignored when mode="facts". | |
| maxFilingsPerCompany | No | Optional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed. Example: 3 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of rows returned | |
| items | Yes | Result rows; each has a "type" field (data rows or machine-readable "error" rows) |