# SEC EDGAR Company Filings & XBRL Facts (`atesen-software/sec-edgar-company-data`) Actor

Official SEC filing metadata and selected US-GAAP fact observations for a CIK or ticker. No API key or browser required.

- **URL**: https://apify.com/atesen-software/sec-edgar-company-data.md
- **Developed by:** [Atesen Software](https://apify.com/atesen-software) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### SEC EDGAR Company Filings & XBRL Facts

Retrieve public filing metadata and selected US-GAAP fact observations from the official SEC APIs for one company. Use a CIK directly or resolve a ticker using SEC's own company mapping. No browser, proxy, login, API key, or paid data provider is used.

Useful for monitoring new filings, building company disclosure datasets, and exporting financial statement observations with their original units, periods, and accession numbers.

### Why use this Actor

- **Filing watchlists**: monitor one company's latest submissions (with form and date filters) on a schedule, without scraping websites.
- **Disclosure datasets**: export filing metadata rows with accession numbers, document URLs and filing dates for research or analytics pipelines.
- **Financial-data enrichment**: flatten selected US-GAAP concepts from SEC's companyfacts API with original units, periods and accession numbers — no currency conversion or rescaling noise.
- **Ticker-to-CIK resolution**: resolve an exchange ticker through SEC's own company mapping and work with the canonical 10-digit CIK.

This Actor returns source data; it does not calculate ratios or provide investment advice.

### Quick start

```json
{
  "cik": "0000320193",
  "userAgent": "Atesen Software support@atesensoftware.com",
  "maxFilings": 2,
  "includeFacts": false
}
```

The Console opens with this two-filing example ready to run. Empty API input `{}` also selects Apple Inc.; its normal API row cap remains 100. The default SEC User-Agent identifies this Actor's publisher using the public support address on its [Apify profile](https://apify.com/atesen-software). You may override it with your organization and actual contact email, and should do so for your own deployment. No credential is required. The `userAgent` value is sent to SEC in request headers and is excluded from output rows and logs. SEC's [developer FAQ](https://www.sec.gov/about/webmaster-frequently-asked-questions) requests a declared User-Agent and illustrates an organization name plus admin contact email. Placeholder domains and header control characters are rejected.

To use a ticker, omit `cik` and supply `"ticker": "AAPL"`. Supply only one identifier when overriding the Apple example. A CIK bypasses the mapping download and works even when a company is absent from the ticker mapping.

### Input and bounds

| Input | Default | Behavior |
| --- | --- | --- |
| `cik` / `ticker` | Apple CIK when both omitted | One company; clear the prefilled CIK to select a ticker; CIK is normalized to 10 digits |
| `userAgent` | Publisher's public support contact | Organization name and real contact email; can be overridden |
| `forms` | `[]` | Exact form names; empty means all; maximum 25 |
| `startDate`, `endDate` | omitted | Inclusive **filing** date in YYYY-MM-DD; applies to both record types |
| `includeFilings` | `true` | Emit filing metadata |
| `maxFilings` | `100` | 1–1000 filing rows |
| `includeOlderFilings` | `false` | Extend recent submissions using SEC's older archive pointers |
| `maxOlderPages` | `3` | 0–10 older files; does not count the recent submissions request |
| `includeFacts` | `false` | Download companyfacts and flatten selected US-GAAP concepts |
| `concepts` | `Assets`, `NetIncomeLoss`, `Revenues` | 1–20 case-sensitive names without namespace |
| `yearlyOnly` | `false` | FY facts in annual forms; duration facts must cover at least 300 days; instant facts retained |
| `maxFacts` | `100` | 1–1000 fact observations across concepts, newest filing date first |

At least one output type must be enabled. Date ranges apply to when a fact was filed, not its accounting period. Concepts vary by company; for example, `Revenues` may be absent while `RevenueFromContractWithCustomerExcludingAssessedTax` exists. Missing concepts generate warnings, not synthetic zero values. `yearlyOnly` does not aggregate quarters. Comparatives and amended/restated observations are retained when the accession differs. Facts are deduplicated by concept, unit, accession, period, and value. Filing rows are deduplicated by accession.

Recent submissions often contain about a year or at least 1000 filings, depending on the company. Older files are optional and bounded; enabling them does not promise a complete company history. Files outside the requested date range are skipped using SEC archive metadata. Row caps and archive limits may return a subset. The SEC ticker mapping is periodically updated and does not guarantee exhaustive coverage.

### Output

The default dataset contains real `filing` and `fact` rows. Both have `cik`, `companyName`, `ticker`, `accessionNumber`, `form`, `filingDate`, and `sourceUrl`. When a run cannot complete, it also emits one `status` row without the custom `result` billing event, so empty or invalid requests are visible in the dataset.

Example `filing` row (illustrative values, matching the dataset schema):

```json
{
  "recordType": "filing",
  "cik": "0000320193",
  "companyName": "Apple Inc.",
  "ticker": "AAPL",
  "accessionNumber": "0000320193-26-000999",
  "form": "10-K",
  "filingDate": "2026-10-15",
  "reportDate": "2026-09-27",
  "acceptanceDateTime": "2026-10-15T18:00:00.000Z",
  "primaryDocument": "aapl-20260927.htm",
  "documentUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000999/aapl-20260927.htm",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000999/0000320193-26-000999-index.htm",
  "sourceUrl": "https://data.sec.gov/submissions/CIK0000320193.json"
}
```

Example `fact` row:

```json
{
  "recordType": "fact",
  "cik": "0000320193",
  "companyName": "Apple Inc.",
  "taxonomy": "us-gaap",
  "concept": "Assets",
  "label": "Assets",
  "unit": "USD",
  "value": 364080000000,
  "startDate": "2025-09-29",
  "endDate": "2026-09-27",
  "fiscalYear": 2026,
  "fiscalPeriod": "FY",
  "frame": null,
  "accessionNumber": "0000320193-26-000999",
  "form": "10-K",
  "filingDate": "2026-10-15",
  "sourceUrl": "https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json"
}
```

A filing also includes `reportDate`, `acceptanceDateTime`, `primaryDocument`, `documentUrl`, and `filingUrl`. The Actor downloads metadata only, not filing document bodies.

A fact also includes `taxonomy`, `concept`, `label`, `unit`, numeric `value`, `startDate`, `endDate`, `fiscalYear`, `fiscalPeriod`, and `frame`. An instant fact has a null start date. Every value retains its SEC unit; no currency conversion, period normalization, or accounting reconciliation is performed. Different units and fiscal periods should not be combined without checking their meaning.

The `OUTPUT` key-value record provides status, counts, requests, warnings, CIK, timestamps, and any safe error message. Statuses include `completed`, `invalid_input`, `not_found`, `blocked`, `rate_limited`, `upstream_error`, and `budget_limit`. If an upstream error follows usable results, `partial: true` marks the summary. Invalid input and errors are never billed as `result`. On the platform, invalid input and a missing company return a successful process exit with an explicit summary; upstream access failures return a nonzero process exit. Local mode exits nonzero on invalid input, not found, or upstream failures, for scripting.

### Rate limits, retries, and billing

Requests are sequential, with at least 250ms between starts (at most 4 per second per run). SEC's [Fair Access guidance](https://www.sec.gov/about/developer-resources) limits a user to 10 requests per second across all machines, so coordinate parallel runs yourself. Each request has a 30-second timeout. Network failures, HTTP 429, and HTTP 5xx get at most one retry, respecting numeric Retry-After up to 60 seconds. HTTP 403 is not retried or bypassed; HTTP 404 is not retried. A missing companyfacts resource produces a warning while keeping filing results.

Only actual emitted result rows call the SDK's awaited `Actor.pushData(row, 'result')`. With pay-per-event pricing configured, each filing or fact row is one `result` event; there is no startup or error custom event. Noncompleted run summaries use `Actor.pushData(status)` without a custom billing event. Configure only the custom `result` event; leave synthetic/default dataset item pricing at zero so status rows remain free. The SDK's remaining event allowance and combined row prices are checked before requesting data and before each push; the returned charging result stops work when the spend limit is reached. Run cost depends on the actor's current Apify pricing configuration and platform usage; this source package does not activate pricing or promise a price. See the official [SDK pay-per-event guide](https://docs.apify.com/sdk/js/docs/concepts/pay-per-event).

### Local development

Node.js 22 or newer is required. The only direct dependency is the pinned Apify SDK 3.7.2; `package-lock.json` is included. A narrow `basic-ftp` 6.2.3 override fixes an audit finding inherited through SDK dependencies; the Actor never uses FTP.

```powershell
npm ci --ignore-scripts
npm test
$env:LOCAL_MODE = '1'
$env:INPUT_PATH = 'example-input.json'
$env:OUTPUT_DIR = 'data'
npm start
```

Local mode reads JSON from `INPUT_PATH` (or the first command-line argument, default `input.json`) and writes `dataset.json` plus `OUTPUT.json` to `OUTPUT_DIR` (default `data`). It imports no Apify SDK, reads no credentials, and performs no Apify calls or charges. Cloud mode initializes the SDK, reads Actor input, writes the default dataset and `OUTPUT`, and exits cleanly. Remove `LOCAL_MODE` for cloud operation.

`evidence/live-input.json` is a bounded smoke input for two Apple filings and one annual Assets fact. The accompanying `evidence/live/` files are actual local SEC API outputs. `npm test` covers validation, CIK/ticker resolution, historical boundaries and deduplication, missing data, pacing, bounded retries, fact semantics, and the mocked cloud charging gate. A live SEC call does not validate cloud deployment or Apify billing; those require separate deployment checks.

### Sources

- [SEC EDGAR API documentation](https://www.sec.gov/search-filings/edgar-application-programming-interfaces)
- [SEC submissions API](https://data.sec.gov/submissions/CIK0000320193.json)
- [SEC XBRL companyfacts API](https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json)
- [Official ticker mapping](https://www.sec.gov/files/company_tickers.json)
- [Apify SDK Actor API](https://docs.apify.com/sdk/js/reference/class/Actor)

These endpoints are public and do not require SEC filer credentials. Availability, field coverage, and future schema changes are controlled by SEC. No third-party data fallback is used.

### How much does SEC EDGAR Company Data cost?

Pay per event: **$0.0015 per result** ($1.50 per 1,000 saved rows). Each filing or fact row is one `result` event. Status rows, error rows and empty lookups are not charged. The run stops when it reaches the maximum cost per run. No Apify proxy and no login.

### FAQ

**How many companies does one run cover?**
One. Each run takes exactly one CIK or ticker. For multiple companies, run the Actor once per company (for example on a schedule with a list input) or split runs into batches.

**Why is a `userAgent` required?**
SEC's developer guidance asks automated users to declare their organization and a real contact email in request headers so the agency can contact you if patterns affect its infrastructure. The Actor rejects placeholder domains and sends your value with requests, but excludes it from output rows and logs.

**How fast can it request data?**
Requests are sequential with at least 250 ms between starts (at most 4 per second per run). SEC limits a user to 10 requests per second across all machines, so do not run this Actor in parallel with other tools against SEC endpoints.

**What data coverage can I expect?**
Recent submissions contain about a year of filings (or at least 1,000 filings); extending history uses SEC's optional older archive pointers (0–10 files). Fact coverage depends on the company — concepts vary, and missing concepts are reported as warnings, never as zeros. Availability and future schema changes are controlled by SEC.

**Why are my chosen concept names missing?**
Concepts are case-sensitive and must exist in the company's companyfacts JSON without namespace. For example, some companies report `RevenueFromContractWithCustomerExcludingAssessedTax` instead of `Revenues`. Check source rows or SEC's companyfacts JSON to pick valid names.

**Can I schedule it?**
Yes — a common pattern is a weekly run for one CIK with `maxFilings` set to log new submissions, or a periodic facts run to keep financial observations current.

**Is this legal? What about personal data?**
The Actor reads only official public SEC endpoints using your declared User-Agent, with no proxy, login or scraping of document bodies. Filing and accounting data are public disclosures. The only user-provided data sent to SEC is the `userAgent` you declare, plus the company identifier; no personal profiles are collected or exported.

### Support and disclaimers

Problems, feature requests and pricing questions belong on the **Issues** tab of the Actor's page on Apify. This Actor is an independent tool: it is not affiliated with the U.S. Securities and Exchange Commission, and it is subject to SEC's published availability, fair-access guidance and terms for automated access. This Actor is not financial, legal or investment advice.

# Actor input Schema

## `cik` (type: `string`):

1–10 digits, optional CIK prefix. Clear this field when supplying ticker. When both identifiers are omitted, Apple Inc. is used as the public example.

## `ticker` (type: `string`):

Resolved using SEC company_tickers.json. Omit when supplying cik.

## `userAgent` (type: `string`):

Organization name and actual contact email. Defaults to this Actor publisher's public support contact. You may supply your own organization and real contact. Sent to SEC only, never included in result rows.

## `forms` (type: `array`):

Exact SEC form names, such as 10-K, 10-Q, 8-K. Empty means all. Applies to filings and facts.

## `startDate` (type: `string`):

Inclusive YYYY-MM-DD filing date, for filings and facts.

## `endDate` (type: `string`):

Inclusive YYYY-MM-DD filing date, for filings and facts.

## `includeFilings` (type: `boolean`):

Return one metadata row per accession number.

## `maxFilings` (type: `integer`):

Per-run filing row cap.

## `includeOlderFilings` (type: `boolean`):

Read SEC historical pages only when recent filings do not fill the limit.

## `maxOlderPages` (type: `integer`):

Bound archive downloads, in addition to the recent submissions request.

## `includeFacts` (type: `boolean`):

Read selected companyfacts observations. One row per concept/unit/period/accession/value.

## `concepts` (type: `array`):

Case-sensitive concept names without namespace, maximum 20.

## `yearlyOnly` (type: `boolean`):

FY observations in annual forms; duration facts must cover at least 300 days. Instant facts retained.

## `maxFacts` (type: `integer`):

Newest filed observations across selected concepts; maximum 1000.

## Actor input object example

```json
{
  "cik": "0000320193",
  "userAgent": "Atesen Software support@atesensoftware.com",
  "forms": [],
  "includeFilings": true,
  "maxFilings": 2,
  "includeOlderFilings": false,
  "maxOlderPages": 3,
  "includeFacts": false,
  "concepts": [
    "Assets",
    "NetIncomeLoss",
    "Revenues"
  ],
  "yearlyOnly": false,
  "maxFacts": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `status` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cik": "0000320193",
    "userAgent": "Atesen Software support@atesensoftware.com",
    "maxFilings": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("atesen-software/sec-edgar-company-data").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "cik": "0000320193",
    "userAgent": "Atesen Software support@atesensoftware.com",
    "maxFilings": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("atesen-software/sec-edgar-company-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cik": "0000320193",
  "userAgent": "Atesen Software support@atesensoftware.com",
  "maxFilings": 2
}' |
apify call atesen-software/sec-edgar-company-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,atesen-software/sec-edgar-company-data"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5zIe411hmn68LsxYM/builds/VUvHbdPYyC2Z2JwNZ/openapi.json
