Skip to main content
Glama

Batch export filings & facts via Apify Actor (paid)

edgar_batch_export
Read-onlyIdempotent

Bulk 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

NameRequiredDescriptionDefault
modeNoOptional, 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
sinceNoOptional, 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".
metricsNoOptional; 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".
companiesYesRequired. 1-50 tickers ("AAPL"), CIKs ("320193") or company name fragments ("Apple"); billed once per resolved company. Example: ["AAPL","MSFT"]
formTypesNoOptional; 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".
excerptMaxCharsNoOptional integer, default 2000 characters per excerpt; the Actor accepts 200-20000 (values outside fail its input validation). Only used with includeTextExcerpt=true. Example: 5000
maxFactsPerMetricNoOptional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed. Example: 4
includeTextExcerptNoOptional boolean, default false. true adds a billed plain-text excerpt row of each filing's primary document (slower). Ignored when mode="facts".
maxFilingsPerCompanyNoOptional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed. Example: 3

Output Schema

NameRequiredDescriptionDefault
countYesNumber of rows returned
itemsYesResult rows; each has a "type" field (data rows or machine-readable "error" rows)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.5
    • changedInput schema / properties / companies / description
      Previous value: -"Required. 1-50 tickers (\"AAPL\"), CIKs (\"320193\") or company name fragments (\"Apple\"); $0.0015 per resolved company. Example: [\"AAPL\",\"MSFT\"]"New value: +"Required. 1-50 tickers (\"AAPL\"), CIKs (\"320193\") or company name fragments (\"Apple\"); billed once per resolved company. Example: [\"AAPL\",\"MSFT\"]"
    • changedInput schema / properties / includeTextExcerpt / description
      Previous value: -"Optional boolean, default false. true adds a plain-text excerpt row of each filing's primary document ($0.002 each, slower). Ignored when mode=\"facts\"."New value: +"Optional boolean, default false. true adds a billed plain-text excerpt row of each filing's primary document (slower). Ignored when mode=\"facts\"."
    • changedInput schema / properties / maxFactsPerMetric / description
      Previous value: -"Optional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed $0.0002. Example: 4"New value: +"Optional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed. Example: 4"
    • changedInput schema / properties / maxFilingsPerCompany / description
      Previous value: -"Optional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed $0.001. Example: 3"New value: +"Optional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed. Example: 3"
  2. Changed9 schema fields changedv1.2.2
    • changedInput schema / properties / companies / description
      Previous value: -"Tickers (\"AAPL\"), CIKs (\"320193\") or company name fragments (\"Apple\"). Example: [\"AAPL\",\"MSFT\"]"New value: +"Required. 1-50 tickers (\"AAPL\"), CIKs (\"320193\") or company name fragments (\"Apple\"); $0.0015 per resolved company. Example: [\"AAPL\",\"MSFT\"]"
    • changedInput schema / properties / excerptMaxChars / description
      Previous value: -"Max characters per excerpt (default 2000). Only used with includeTextExcerpt=true."New value: +"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"
    • changedInput schema / properties / formTypes / description
      Previous value: -"Filter filings by form type, e.g. [\"10-K\",\"10-Q\"] or [\"8-K\"]. Omit/empty = all forms. Ignored when mode=\"facts\"."New value: +"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\"."
    • changedInput schema / properties / includeTextExcerpt / description
      Previous value: -"Also fetch a plain-text excerpt of each filing's primary document (default false; $0.003 each, slower)."New value: +"Optional boolean, default false. true adds a plain-text excerpt row of each filing's primary document ($0.002 each, slower). Ignored when mode=\"facts\"."
    • changedInput schema / properties / maxFactsPerMetric / description
      Previous value: -"Most-recent values kept per concept and unit (default 8). Each fact row is billed."New value: +"Optional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed $0.0002. Example: 4"
    • changedInput schema / properties / maxFilingsPerCompany / description
      Previous value: -"Max filing rows per company, newest first (default 10). Each row is billed."New value: +"Optional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed $0.001. Example: 3"
    • changedInput schema / properties / metrics / description
      Previous value: -"XBRL us-gaap/dei concept names (case-sensitive), e.g. [\"Assets\",\"Revenues\",\"NetIncomeLoss\",\"EarningsPerShareDiluted\"]. Omit for a curated default set (~10 concepts)."New value: +"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\"."
    • changedInput schema / properties / mode / description
      Previous value: -"\"filings\" = filing list only, \"facts\" = XBRL facts only, \"both\" (default). A company row is always included when resolved."New value: +"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\""
    • changedInput schema / properties / since / description
      Previous value: -"Only filings with filingDate >= this date (YYYY-MM-DD), e.g. \"2023-01-01\"."New value: +"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\"."
  3. Addedv1.2.1

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/openWorld/idempotent, but the description adds far more: the Apify Actor backing the call, sec.gov throttling at <=5 req/s, the required APIFY_TOKEN environment variable, 5-60 s typical runtime with a ~5 minute wait ceiling, per-event pricing, and the fact that unresolvable companies yield error rows rather than failing the whole run. None of this is derivable from the annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but front-loaded and clearly segmented with WHEN TO USE / BEHAVIOR / COST / RETURNS / WHEN NOT TO USE / PARAMETERS / EXAMPLE headers. The 1-4 company rule is stated twice (WHEN TO USE and WHEN NOT TO USE), a minor redundancy in an otherwise dense, purposeful block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, long-running, open-world batch tool this covers everything an agent needs: cost model with a worked example, auth requirement, timeout behavior, partial-failure semantics, and parameter-mode interactions. Although an output schema exists, the description still usefully explains the row taxonomy and error codes without over-relying on it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and much of the parameter detail (defaults, [] semantics, case sensitivity) is repeated from the schema. The description does add value by tying parameters to mode applicability and, crucially, linking maxFilingsPerCompany / metrics / maxFactsPerMetric to the billing formula ('size those three numbers first'), which changes how an agent should choose values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with scope (bulk export of SEC EDGAR filings, facts and text excerpts for up to 50 companies in one call) and enumerates the concrete data returned. It explicitly contrasts itself with the per-company siblings (edgar_list_filings / edgar_get_company_facts), so an agent can distinguish it from them without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit WHEN TO USE threshold (5+ companies, or bulk excerpts), the alternative for 1-4 companies with a naming of the free tools, and a WHEN NOT TO USE section ruling out interactive lookups, real-time quotes, non-US companies, and investment advice. The mode semantics (filings/facts/both) further select the correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.