Skip to main content
Glama

Batch export filings & facts via Apify Actor (paid)

edgar_batch_export
Read-onlyIdempotent

Bulk export structured SEC EDGAR data for up to 50 US companies: filings, XBRL financial facts, and optional document excerpts in one paid Apify call.

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: an agent needs filing lists/links or reported financial values from official SEC data. mode="filings" for filing history/links, "facts" for financial numbers, "both" for both. Prefer the free single-purpose tools (edgar_resolve_company, edgar_list_filings, edgar_get_company_facts, edgar_get_filing_document) for interactive lookups; use this tool for multi-company batch exports billed to your Apify account. Not for real-time quotes, prices, options, non-US companies or investment advice. BEHAVIOR: read-only; 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. Keep maxFilingsPerCompany, metrics and maxFactsPerMetric small to limit cost; e.g. 1 company, 5 filings, 3 metrics x 4 values ~ $0.009. RETURNS: {count, items}. Every row has schema_version, type (company | filing | fact | text_excerpt | error), source_url and scraped_at. filing rows: cik, ticker, form, filing_date, report_date, accession_number, primary_document, document_url. fact rows: taxonomy, concept, label, unit, value, start, end, filed, form. error rows: code (INPUT_EMPTY, COMPANY_NOT_FOUND, RESOLVE_FAILED, SUBMISSIONS_FETCH_FAILED, FACTS_FETCH_FAILED, EXCERPT_FETCH_FAILED), message, retryable. Unresolvable companies produce an error row, not a failure. WHEN NOT TO USE: single-company or interactive lookups - use the free tools above (same SEC data, no cost). 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).

Input Schema

TableJSON 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"); $0.0015 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 $0.0002. Example: 4
includeTextExcerptNoOptional boolean, default false. true adds a plain-text excerpt row of each filing's primary document ($0.002 each, slower). Ignored when mode="facts".
maxFilingsPerCompanyNoOptional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed $0.001. Example: 3

Output Schema

TableJSON 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. 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\"."
  2. Addedv1.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover safety (readOnly, idempotent, non-destructive) and open-world, so the description goes well beyond them: it discloses the Apify Actor and dependency (APIFY_TOKEN), the sec.gov throttle (<=5 req/s), run latency (5-60s, waits up to ~5 min), the full pay-per-event cost model with a worked cost example, and partial-failure semantics (unresolvable companies yield error rows, not a failure). This is unusually rich operational context.

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?

Front-loaded purpose, then clearly labeled WHEN TO USE / BEHAVIOR / COST / RETURNS / WHEN NOT TO USE / PARAMETERS / EXAMPLE sections, so it is scannable. It is long, and some cost detail is repeated between COST and PARAMETERS, but nearly every sentence carries actionable information for a paid 9-parameter tool.

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?

Despite an output schema existing, the description still summarizes the return shape ({count, items}, row types, key fields, error codes and retryable flag), and covers prerequisites, cost, latency, and failure handling. An agent has everything needed to decide whether and how to call it.

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

Parameters5/5

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

Schema coverage is already 100%, but the PARAMETERS block adds meaning the schema does not: which parameters apply under each mode, billing implications per row, that '[]' means all forms / built-in 10-concept set, case-sensitive us-gaap/dei concept names, and inclusive date comparison. The per-row billing math ('size those three numbers first') directly informs parameter choices.

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?

Opens with a specific verb+resource+scope: 'Bulk export (paid, via Apify) of structured SEC EDGAR data for up to 50 US companies,' and enumerates exactly what is exported (entity metadata, filings, XBRL facts, excerpts). It explicitly contrasts itself with the free single-purpose siblings, so an agent can distinguish it without opening a 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 explicit WHEN TO USE (mode='filings' vs 'facts' vs 'both'), names the exact alternative tools and the condition that selects them ('Prefer the free single-purpose tools ... for interactive lookups'), and adds a WHEN NOT TO USE section plus exclusions (no real-time quotes, prices, options, non-US companies, advice).

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