SEC EDGAR XBRL CompanyFacts

SEC EDGAR XBRL CompanyFacts

Certified

Read a company's XBRL financial data from SEC EDGAR

Reads every value a company has reported in XBRL (SEC's company facts) and returns them as flat rows: taxonomy, concept, unit, value, period, fiscal year and period, and the form, date and accession number of the filing that reported it. Filters on taxonomy, concept, unit, form and period end date are applied while the response is read, so only matching values are kept.

A large company's facts run to tens of megabytes and hundreds of thousands of values, so fetchType defaults to STORE, which writes the rows to an ION file in internal storage as they are read. FETCH returns the rows in the output and is meant for filtered requests; it fails, rather than truncating, above 10,000 rows.

SEC allows at most 10 requests per second from all your tools together; see maxRequestsPerSecond.

yaml
type: io.kestra.plugin.edgar.xbrl.CompanyFacts

Read a company's annual revenue and net income.

yaml
id: edgar_annual_results
namespace: company.team

tasks:
  - id: facts
    type: io.kestra.plugin.edgar.xbrl.CompanyFacts
    userAgent: "Example Co admin@example.com"
    ticker: AAPL
    taxonomies:
      - us-gaap
    concepts:
      - Revenues
      - NetIncomeLoss
    units:
      - USD
    forms:
      - 10-K
    startDate: "2020-01-01"
    fetchType: FETCH

  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.facts.size }} values: {{ outputs.facts.rows | toJson }}"

Store all of a company's XBRL facts in internal storage.

yaml
id: edgar_all_facts
namespace: company.team

tasks:
  - id: facts
    type: io.kestra.plugin.edgar.xbrl.CompanyFacts
    userAgent: "Example Co admin@example.com"
    cik: "320193"
Properties

User-Agent sent to SEC

SEC requires automated tools to identify themselves with a name and a contact email, for example Example Co admin@example.com, and rejects requests without one. See SEC fair access.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulthttps://www.sec.gov

Base URL of the SEC website

Where company tickers and filing documents are read from. Change it only to go through a proxy or a test server.

CIK of the company

With or without leading zeros, for example 320193. Set either ticker or cik.

SubTypestring

Concepts to keep

Exact names, case-insensitive, for example Revenues or NetIncomeLoss. All when empty.

Defaulthttps://data.sec.gov

Base URL of SEC's data API

Where filing lists and XBRL data are read from. Change it only to go through a proxy or a test server.

Latest period end date to keep

Inclusive, for example 2025-12-31.

DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

How to return the values

STORE (default) writes them to an ION file in internal storage and returns its uri; use it for unfiltered requests. FETCH returns them in rows and fails above 10,000 rows, FETCH_ONE returns the first in row, NONE returns only size.

SubTypestring

Forms to keep

Form of the filing that reported the value, for example 10-K or 10-Q. All when empty.

Default5

Maximum requests per second

Requests made by this task are spaced so they stay at or under this rate. Defaults to 5, at most 10, which is SEC's limit. The limit applies to each task run: tasks that run in parallel each count against SEC's limit, so lower this value when several EDGAR tasks run at the same time. A request rejected with HTTP 429 or 503 is retried after SEC's Retry-After delay, then up to twice more, 10 and 20 seconds later.

Earliest period end date to keep

Inclusive, for example 2020-01-01.

SubTypestring

Taxonomies to keep

For example us-gaap, ifrs-full or dei. All when empty.

Ticker of the company

For example AAPL. Set either ticker or cik.

SubTypestring

Units to keep

For example USD, shares or USD/shares. All when empty.

The first value

Set when fetchType is FETCH_ONE; empty when nothing matches.

Definitions
accessionNumberstring

Accession number of the reporting filing

conceptstring

Concept

For example Revenues or NetIncomeLoss.

endstring
Formatdate

End of the period, or the date of a point-in-time value

filedstring
Formatdate

Date the reporting filing was made

fiscalPeriodstring

Fiscal period of the filing that reported the value

FY, Q1, Q2, Q3 or Q4.

fiscalYearinteger

Fiscal year of the filing that reported the value

formstring

Form of the filing that reported the value

For example 10-K or 10-Q.

framestring

Calendar frame

Set by SEC on the one value it keeps per concept, unit and calendar period, for example CY2026Q2; empty for values also reported elsewhere.

startstring
Formatdate

Start of the period

Empty for values at a point in time, such as shares outstanding.

taxonomystring

Taxonomy

For example us-gaap, ifrs-full or dei.

unitstring

Unit

For example USD, shares or USD/shares.

valuenumber

Value

As reported, without rounding.

The values

Set when fetchType is FETCH.

Definitions
accessionNumberstring

Accession number of the reporting filing

conceptstring

Concept

For example Revenues or NetIncomeLoss.

endstring
Formatdate

End of the period, or the date of a point-in-time value

filedstring
Formatdate

Date the reporting filing was made

fiscalPeriodstring

Fiscal period of the filing that reported the value

FY, Q1, Q2, Q3 or Q4.

fiscalYearinteger

Fiscal year of the filing that reported the value

formstring

Form of the filing that reported the value

For example 10-K or 10-Q.

framestring

Calendar frame

Set by SEC on the one value it keeps per concept, unit and calendar period, for example CY2026Q2; empty for values also reported elsewhere.

startstring
Formatdate

Start of the period

Empty for values at a point in time, such as shares outstanding.

taxonomystring

Taxonomy

For example us-gaap, ifrs-full or dei.

unitstring

Unit

For example USD, shares or USD/shares.

valuenumber

Value

As reported, without rounding.

Number of values returned

For FETCH_ONE, 0 or 1.

Formaturi

URI of the ION file holding the values

Set when fetchType is STORE.