# Open Financial Statements Collector (`datapilot/open-financial-statements-collector`) Actor

Scrape SEC EDGAR company filings and extract financial statement data, including revenue, net income, total assets, liabilities, equity, and operating cash flow. Search companies by ticker or name and collect 10-K and 10-Q filings with direct SEC links.

- **URL**: https://apify.com/datapilot/open-financial-statements-collector.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 64.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped sec financial filings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

📊 **Open Financial Statements Collector** is a powerful Apify Actor designed to collect key financial figures from the annual (10-K) and quarterly (10-Q) reports of US public companies, using the SEC's official EDGAR open data. This **Open Financial Statements Collector** provides output including revenue, net income, total assets, total liabilities, stockholders' equity, and operating cash flow for each filing, together with the filing period and a direct link to the filing document. Whether you're researching companies, building a financial dataset, or screening stocks, the Open Financial Statements Collector delivers structured financial data efficiently.

With company search by ticker or name, a choice of 10-K or 10-Q filings, a configurable number of filings per company, automatic request pacing for the SEC's rate limits, and reliable Apify Dataset delivery, this **Open Financial Statements Collector** actor turns EDGAR's XBRL data into clean records. Missing figures are left out rather than filled with placeholders, making **Open Financial Statements Collector** a trustworthy starting point for financial research.

***

### 📋 Table of Contents

- [Features](#-features)
- [Data Source](#-data-source)
- [How It Works](#-how-it-works)
- [Input](#-input)
- [Output](#-output)
- [Technical Stack](#-technical-stack)
- [Data Fields](#-data-fields-explained)
- [Use Cases](#-use-cases)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
- [Performance](#-performance)
- [Important Notes](#-important-notes)
- [License & Legal](#-license--legal)

***

### 🔥 Features

- **Official SEC Data** – Uses SEC EDGAR's free public data. This is the core of **Open Financial Statements Collector**.
- **Six Key Metrics** – Revenue, net income, total assets, total liabilities, stockholders' equity, and operating cash flow.
- **10-K and 10-Q Filings** – Collect annual reports, quarterly reports, or both.
- **Ticker or Company Name** – Search by ticker symbol (exact match) or company name (closest match).
- **Multiple Companies per Run** – Process a list of companies in one run.
- **Configurable Filing Count** – Choose how many filings to return per company.
- **Filing Links** – Every record links to the filing's main document on sec.gov.
- **Tag Fallbacks** – Tries several standard accounting tags for each metric, such as `Revenues` and `RevenueFromContractWithCustomerExcludingAssessedTax` for revenue.
- **No Placeholder Values** – If a figure cannot be found, it is simply left out of the record.
- **SEC-Friendly Pacing** – Pauses between requests and retries when the SEC asks to slow down.
- **Apify Proxy Support** – Optional Apify Proxy.
- **Detailed Logging** – Logs the matched company and progress for every **Open Financial Statements Collector** run.

***

### 📊 Data Source

#### **SEC EDGAR**

- **Authority**: US Securities and Exchange Commission (SEC)
- **Endpoints**:
  - Company list: `https://www.sec.gov/files/company_tickers.json`
  - Filing list: `https://data.sec.gov/submissions/CIK<cik>.json`
  - Financial facts: `https://data.sec.gov/api/xbrl/companyfacts/CIK<cik>.json`
- **Access Method**: HTTP requests with JSON parsing, using a User-Agent that identifies you by email as the SEC requires
- **Coverage**: Companies listed in the SEC ticker file, using figures reported in US-GAAP USD
- **Data**: Filing list, accession numbers, report dates, and XBRL financial facts
- **Access**: Public API, no API key required
- **Update Frequency**: Reflects EDGAR at time of run

***

### ⚙️ How It Works

The Open Financial Statements Collector loads the SEC's company list, finds each company you asked for, and reads its list of recent filings. For every 10-K or 10-Q (up to your limit) it looks up the matching financial facts by filing number and period end date, picks the six headline figures, and builds one record per filing. Records are saved to the Apify Dataset after each company.

**Key Processing Steps:**

1. **Input Parsing** – Read `companies`, `formType`, `filingsPerCompany`, and `userEmail`
2. **Proxy Setup** – Configure Apify Proxy if enabled
3. **Company List** – Load the SEC master ticker list
4. **Company Matching** – Match each query by ticker (exact) or company name (closest match)
5. **Filing List** – Read the company's recent filings and keep the chosen form types
6. **Financial Facts** – Load the company's XBRL facts
7. **Metric Selection** – For each filing, pick each metric by filing number and period end date, preferring a period length that fits the form (about a year for 10-K, about a quarter for 10-Q)
8. **Record Building** – Create one record per filing with a link to the document
9. **Dataset Push** – Push the records for each company

***

### 📥 Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `companies` | array of strings | `["AAPL"]` | Tickers or company names. |
| `formType` | string | `"ALL"` | `10-K`, `10-Q`, or `ALL` (both). |
| `filingsPerCompany` | integer | `5` | Maximum filings to return per company. |
| `userEmail` | string | `"user.data@example.com"` | Your contact email, sent in the User-Agent. **Replace it with your own.** |
| `proxyConfiguration` | object | `{"useApifyProxy": true}` | Apify Proxy configuration. |

The SEC asks every user of its data services to identify themselves. The default `userEmail` is only a placeholder. Set your own real email address.

**Example Input:**

```json
{
  "companies": ["AAPL", "MSFT", "Tesla"],
  "formType": "10-K",
  "filingsPerCompany": 5,
  "userEmail": "you@yourcompany.com"
}
```

**Quarterly Reports Only:**

```json
{
  "companies": ["NVDA"],
  "formType": "10-Q",
  "filingsPerCompany": 8,
  "userEmail": "you@yourcompany.com"
}
```

***

### 📤 Output

One **Open Financial Statements Collector** record is pushed per filing:

| Field | Type | Description |
|-------|------|-------------|
| `company` | string | Company name from the SEC list |
| `ticker` | string | Ticker symbol |
| `period` | string | Report period end date (`YYYY-MM-DD`); the filing date if no report date exists |
| `statements` | object | The form type and the metrics that were found (see below) |
| `link` | string | Link to the filing's main document on sec.gov |
| `scrapedAt` | string | ISO 8601 UTC timestamp |

**`statements` object:**

| Key | Description |
|-----|-------------|
| `Form` | `10-K` or `10-Q` |
| `Revenue` | Revenue in USD |
| `NetIncome` | Net income (or loss) in USD |
| `TotalAssets` | Total assets in USD |
| `TotalLiabilities` | Total liabilities in USD |
| `StockholdersEquity` | Stockholders' equity in USD |
| `OperatingCashFlow` | Net cash from operating activities in USD |

Only metrics that were found appear in `statements`.

**Example Open Financial Statements Collector Record (values illustrative):**

```json
{
  "company": "Example Corp",
  "ticker": "EXMP",
  "period": "2025-12-31",
  "statements": {
    "Form": "10-K",
    "Revenue": 12500000000,
    "NetIncome": 2100000000,
    "TotalAssets": 48000000000,
    "TotalLiabilities": 31000000000,
    "StockholdersEquity": 17000000000,
    "OperatingCashFlow": 3400000000
  },
  "link": "https://www.sec.gov/Archives/edgar/data/1234567/000123456726000010/exmp-20251231.htm",
  "scrapedAt": "2026-10-30T09:00:00+00:00"
}
```

***

### 🧰 Technical Stack

- **HTTP Client:** Python `requests` with retries and a short pause between requests
- **Source:** SEC EDGAR JSON APIs (company list, submissions, XBRL company facts)
- **Matching:** Exact ticker match, then closest company-name match using `difflib`
- **Async:** `asyncio` with executor-run blocking requests
- **Proxy:** Apify Proxy, optional via `useApifyProxy`
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment

***

### 📊 Data Fields Explained

#### **Identification**

- **company / ticker / period / link**: Which company, which period, and where the filing is

#### **Statements**

- **Revenue / NetIncome**: Income statement figures
- **TotalAssets / TotalLiabilities / StockholdersEquity**: Balance sheet figures
- **OperatingCashFlow**: Cash flow statement figure
- **Form**: The type of report the figures come from

***

### 🎯 Use Cases

- **Company Research** – Pull headline financials for companies you follow with the Open Financial Statements Collector
- **Financial Datasets** – Build multi-year datasets for analysis and modeling
- **Stock Screening** – Collect comparable figures across many companies
- **Academic & Student Projects** – Get clean public data without manual downloads
- **Reporting & Dashboards** – Feed dashboards with fresh filing data
- **Trend Tracking** – Compare quarterly and annual figures over time

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "companies": ["AAPL"],
  "formType": "ALL",
  "filingsPerCompany": 5,
  "userEmail": "you@yourcompany.com"
}
```

#### **2. Run the Actor**

Click **Start**. The Open Financial Statements Collector will:

- Load the SEC company list
- Match each company you entered
- Read its recent filings and financial facts
- Push one record per filing to the Dataset

#### **3. Monitor Progress**

Console shows:

```
Loading SEC master ticker list...
Loaded N companies from SEC EDGAR. Starting extraction...
Collecting filings for 'AAPL'...
Matched: Apple Inc. (AAPL) | CIK: 0000320193
✅ Saved 5 filing(s) for 'AAPL'
🎉 Complete! Pushed a total of 5 financial statements to dataset.
```

#### **4. View & Download Results**

- **Results Tab**: All **Open Financial Statements Collector** records
- **Export**: JSON, CSV, Excel, or HTML
- **API Access**: Available via the Apify API

***

### ⚙️ Configuration

Several companies, annual reports:

```json
{
  "companies": ["AAPL", "GOOGL", "AMZN"],
  "formType": "10-K",
  "filingsPerCompany": 3,
  "userEmail": "you@yourcompany.com"
}
```

Direct connection without proxy:

```json
{
  "companies": ["AAPL"],
  "userEmail": "you@yourcompany.com",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### 📈 Performance

#### **Processing Speed**

- Two requests per company (filing list and financial facts), plus one request for the company list per run
- A short pause of about 0.15 seconds follows every request to stay within the SEC's rate limit
- Rate-limited requests (HTTP 429) are retried up to 3 times with a growing wait

#### **Resource Usage**

- Memory: Moderate for large companies, because the full facts file is loaded
- Network: Lightweight JSON requests, though facts files can be large
- Proxy: Optional Apify Proxy

***

### ⚠️ Important Notes

#### **Legal & Compliance**

- **SEC Fair Access**: The SEC asks users to identify themselves with a real contact email and to stay under 10 requests per second. Set your own `userEmail` and do not remove the built-in pauses.
- **Public Data Only**: Uses only data the SEC publishes for free
- **Not Investment Advice**: The output is for research and information only and is not investment, tax, or legal advice
- **Affiliation**: Not affiliated with or endorsed by the SEC

#### **Data Quality**

- **Company Name Matching Is Approximate**: A ticker must match exactly, but a name query uses the closest match (a name containing your text, or a similarity score of at least 50%). A loose name can match the wrong company. Check the `company` and `ticker` fields, or search by ticker.
- **Six Headline Metrics Only**: The Actor does not return full financial statements.
- **Missing Metrics**: A metric is left out if the company uses a different accounting tag, reports in a currency other than USD, or reports under IFRS instead of US-GAAP. Foreign companies and some companies with custom tags may return only the `Form` key.
- **Period Matching**: Figures are matched by filing number and period end date. If a filing has no report date, the filing date is used as `period`, and figures may be missing.
- **Quarterly Cash Flow**: For 10-Q filings, cash flow figures often cover the year to date (for example six or nine months), not just the quarter. The Actor prefers a quarter-length value but falls back to the first available value.
- **Restatements**: Figures are those tied to each filing. Later restatements are not applied.
- **Recent Filings Only**: Only filings in the SEC's "recent filings" list are checked, and they are returned in the SEC's order, newest first.
- **Company Not Found**: If no company matches, a warning is logged and the company is skipped.
- **Request Failures**: If the company list cannot be loaded, the run stops with an error. If a company's data cannot be loaded, that company returns no records.
- **Verification**: Check important figures against the filing itself, using the `link` field.

#### **Best Practices**

- Use tickers for the most reliable matching
- Set `userEmail` to your own address
- Keep `filingsPerCompany` modest for large lists of companies
- Compare quarterly numbers carefully, because periods can differ

***

### 📄 License & Legal

**Terms of Use:**

- Use for legitimate research and analysis
- Follow the SEC's fair access policy and website terms
- Use data responsibly and in compliance with applicable laws

**Disclaimer:**
Open Financial Statements Collector is provided as-is for research and informational purposes. It is not affiliated with or endorsed by the SEC. It does not provide investment, tax, or legal advice. Users are responsible for verifying figures and for compliance with applicable laws and the data source's terms. This is not legal advice.

***

### ⚖️ Open Financial Statements Collector Excellence

This Actor is optimized for **Open Financial Statements Collector** use with:

- ✅ Official SEC EDGAR data
- ✅ Six key metrics per 10-K or 10-Q filing
- ✅ Search by ticker or company name
- ✅ Direct links to filing documents
- ✅ No placeholder values for missing figures
- ✅ Production-ready code

# Actor input Schema

## `companies` (type: `array`):

List of US stock tickers or company names (e.g., AAPL, MSFT, TSLA, Apple).

## `formType` (type: `string`):

Filter by SEC filing form type (ALL, 10-K, or 10-Q).

## `filingsPerCompany` (type: `integer`):

Maximum number of recent financial filings to extract per company.

## `userEmail` (type: `string`):

Contact email required by SEC EDGAR fair access policy.

## `proxyConfiguration` (type: `object`):

Apify Proxy fallback settings if direct connection is rate-limited.

## Actor input object example

```json
{
  "companies": [
    "AAPL"
  ],
  "formType": "ALL",
  "filingsPerCompany": 5,
  "userEmail": "compliance_monitor@secbot.org",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `crawlResults` (type: `string`):

No description

## `overview` (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 = {
    "companies": [
        "AAPL"
    ],
    "formType": "ALL",
    "filingsPerCompany": 5,
    "userEmail": "compliance_monitor@secbot.org"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/open-financial-statements-collector").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 = {
    "companies": ["AAPL"],
    "formType": "ALL",
    "filingsPerCompany": 5,
    "userEmail": "compliance_monitor@secbot.org",
}

# Run the Actor and wait for it to finish
run = client.actor("datapilot/open-financial-statements-collector").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 '{
  "companies": [
    "AAPL"
  ],
  "formType": "ALL",
  "filingsPerCompany": 5,
  "userEmail": "compliance_monitor@secbot.org"
}' |
apify call datapilot/open-financial-statements-collector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datapilot/open-financial-statements-collector"
        }
    }
}
```

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/Xt3kVsoPcuFFqrRaO/builds/esjzcn5z8XLhszkWE/openapi.json
