# SEC EDGAR Filings (`earthen_garland/sec-edgar-filings`) Actor

Official SEC EDGAR company filings: 10-K, 10-Q, 8-K, Form D, and 13F-HR. Ticker/CIK input, 8-K item codes, Form D offering fields, 13F holdings from the information table XML, and key 10-K/10-Q XBRL metrics. Declared User-Agent and a polite rate limit well under the SEC 10 requests/second cap.

- **URL**: https://apify.com/earthen_garland/sec-edgar-filings.md
- **Developed by:** [Kobi Mozgori](https://apify.com/earthen_garland) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 filings

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 Filings

Fetch **official** U.S. SEC EDGAR company filings and parse the forms that are most useful in research and monitoring workflows:

- **10-K / 10-Q** — filing metadata plus key XBRL metrics from the official `companyconcept` APIs (assets, equity, revenues, net income, EPS, cash, and similar)
- **8-K** — item codes (for example 2.02, 8.01, 9.01) with standard titles
- **Form D** — key offering fields from official `primary_doc.xml` (amounts sold, exemptions, security types, investor counts)
- **13F-HR** — holdings from the official information-table XML, plus cover/summary totals from `primary_doc.xml`

The Actor talks only to documented SEC JSON and XML endpoints. It does not scrape search HTML, does not use a browser, and does not log in.

### Features

- Input by **ticker** (resolved through official `company_tickers.json`) and/or **CIK**
- Form-type filter, date range, per-company and global caps, optional amendments (`/A`)
- Declared **User-Agent** with a contact email, polite default interval (**1.2 seconds**), hard ceiling at the official **10 requests/second** cap, retries with backoff
- Pay-per-event: `filing-metadata` ($0.008 per filing row) charged from code, plus Apify's synthetic `apify-actor-start` event that the platform charges automatically (see [PRICING.md](PRICING.md))

### Input

Recommended: `contactEmail` (used only in the SEC User-Agent). If it is empty the Actor falls back to a generic, non-personal contact; if both `tickers` and `ciks` are empty it runs a small sample (AAPL, latest 2 8-K filings).

```json
{
  "tickers": ["AAPL"],
  "ciks": ["0001028357"],
  "formTypes": ["10-K", "10-Q", "8-K", "D", "13F-HR"],
  "filedSince": "2025-01-01",
  "filedUntil": "",
  "maxFilingsPerCompany": 5,
  "maxResults": 20,
  "includeAmendments": true,
  "includeDocumentList": true,
  "parseFormD": true,
  "includeFormDRelatedPersons": true,
  "parse13F": true,
  "includeXbrlMetrics": true,
  "contactEmail": "you@your-domain.example",
  "userAgentProduct": "SecEdgarFilings/0.1",
  "minRequestIntervalSeconds": 1.2
}
```

Aliases: `Form D` → `D`, `13F` → `13F-HR`. Issuers without a ticker (typical for many Form D filers and some 13F managers) should be passed as CIKs.

### Output

Each dataset item is one filing. Fields include `ticker`, `cik`, `companyName`, `form`, `filingDate`, `accessionNumber`, official document URLs, and optional payloads:

- `items` — 8-K item codes and titles
- `formD` — offering and issuer fields from `primary_doc.xml`
- `thirteenF` — summary totals and `holdings[]` (name, CUSIP, value, shares, voting authority)
- `xbrlMetrics` — compact facts whose accession matches that 10-K or 10-Q
- `documents` — official `index.json` file list when requested

Example 8-K (shape):

```json
{
  "ticker": "AAPL",
  "cik": "0000320193",
  "companyName": "Apple Inc.",
  "form": "8-K",
  "filingDate": "2026-11-09",
  "accessionNumber": "0001140361-26-042798",
  "items": [
    { "code": "8.01", "title": "Other Events" },
    { "code": "9.01", "title": "Financial Statements and Exhibits" }
  ],
  "primaryDocumentUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126042798/ef20085077_8k.htm"
}
```

### Pricing

See [PRICING.md](PRICING.md). Suggested PPE: **$0.008** per filing row, plus the synthetic Actor-start event (Apify default $0.00005, charged by the platform).

### Fair access and legal note

This Actor follows the SEC's documented rules for scripted access:

- [Accessing EDGAR Data](https://www.sec.gov/search-filings/edgar-search-assistance/accessing-edgar-data) — maximum **10 requests/second**, declared User-Agent with a contact, download only what you need
- [Webmaster FAQ](https://www.sec.gov/about/webmaster-frequently-asked-questions) — “We allow scripted access to sec.gov content”
- [EDGAR APIs](https://www.sec.gov/search-filings/edgar-application-programming-interfaces) — `data.sec.gov` JSON APIs do not require an API key

**Legal note.** Output is **public SEC filing data**. The Actor does not scrape people profiles, private social accounts, or third-party contact databases. Some official forms (notably Form D) already disclose related-person names and roles; those fields are copied from the filing when you leave `includeFormDRelatedPersons` on, and street addresses are never included. 13F information-table values are stored as the filer reported them (SEC 13F values are conventionally in thousands of dollars — confirm against the filing). This project is not affiliated with or endorsed by the U.S. Securities and Exchange Commission.

### Local run (no Apify account)

```bash
cd /workspace/apify-actors/sec-edgar-filings
python3 -m src.main --input storage/key_value_stores/default/INPUT.json
python3 -m unittest discover -s tests -v
```

Set `SKIP_LIVE=1` to skip the small live smoke test.

### FAQ

**Why was my request blocked?** The SEC rejects undeclared automated tools. Set a real `contactEmail` and keep `minRequestIntervalSeconds` at or above 1.0 unless you have a reason to go slightly faster (never above 10 req/s).

**Why is a ticker missing?** `company_tickers.json` covers EDGAR issuers with exchange tickers. Private issuers and many investment managers are CIK-only.

**Does this download every exhibit?** No. By default you get metadata, official URLs, and structured parses of Form D / 13F / XBRL concepts. Full HTML/PDF bodies are not stored.

**Can I point this at non-SEC sites?** No. Only official `sec.gov` / `data.sec.gov` URLs are used.

# Changelog

This Actor's version history is a separate document: https://apify.com/earthen_garland/sec-edgar-filings/changelog.md

# Actor input Schema

## `tickers` (type: `array`):

Exchange tickers resolved through the official SEC company_tickers.json map (for example AAPL). If both Tickers and CIKs are empty, the Actor runs a small sample (AAPL, latest 2 8-K filings).

## `ciks` (type: `array`):

SEC Central Index Keys, with or without leading zeros. Use this for issuers that have no ticker (common for Form D and some 13F managers).

## `formTypes` (type: `array`):

Form types to keep. Aliases: Form D → D, 13F → 13F-HR. Empty is not recommended; the default covers 10-K, 10-Q, 8-K, D, and 13F-HR.

## `filedSince` (type: `string`):

Inclusive lower bound on filing date. Leave empty for no lower bound. If set, older submission history files may also be fetched.

## `filedUntil` (type: `string`):

Inclusive upper bound on filing date. Leave empty for no upper bound.

## `maxFilingsPerCompany` (type: `integer`):

Maximum matching filings to return for each company, most recent first.

## `maxResults` (type: `integer`):

Optional cap on the total number of filing rows across all companies. 0 means no global cap beyond the per-company limit.

## `includeAmendments` (type: `boolean`):

If true, 10-K also matches 10-K/A, D matches D/A, 13F-HR matches 13F-HR/A, and so on.

## `includeDocumentList` (type: `boolean`):

If true, attach the official Archives index.json document list (name, type, size, URL) to each filing row.

## `parseFormD` (type: `boolean`):

If true, parse Form D primary_doc.xml for key offering fields (amounts, exemptions, investor counts, issuer identity).

## `includeFormDRelatedPersons` (type: `boolean`):

Official Form D disclosures only (names and roles). Street addresses are never included. Turn off to omit related-person fields entirely.

## `parse13F` (type: `boolean`):

If true, parse the 13F-HR information table XML for holdings and the primary document summary totals.

## `maxHoldingsPer13F` (type: `integer`):

0 or empty means no extra cap (the official table is returned in full).

## `includeXbrlMetrics` (type: `boolean`):

Uses official data.sec.gov companyconcept APIs (assets, equity, revenues, net income, EPS, cash, and similar).

## `includeFilingHistory` (type: `boolean`):

Also requested automatically when Filed since is set. Uses official data.sec.gov/submissions history files.

## `contactEmail` (type: `string`):

Contact for the SEC fair-access User-Agent (SEC asks automated tools to declare one). Replace the generic example address with your own mailbox for production use. If empty, the Actor uses its generic contact.

## `userAgentProduct` (type: `string`):

Product token placed at the start of the SEC User-Agent, before the contact email.

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

If set, used as the complete User-Agent instead of '{product} {contactEmail}'. Still include a contact address.

## `minRequestIntervalSeconds` (type: `number`):

The SEC cap is 10 requests/second. This Actor defaults to 1.2 seconds and will not go faster than 0.1 seconds (the 10 req/s floor).

## Actor input object example

```json
{
  "tickers": [
    "AAPL"
  ],
  "ciks": [],
  "formTypes": [
    "8-K"
  ],
  "filedSince": "",
  "filedUntil": "",
  "maxFilingsPerCompany": 2,
  "maxResults": 0,
  "includeAmendments": true,
  "includeDocumentList": true,
  "parseFormD": true,
  "includeFormDRelatedPersons": true,
  "parse13F": true,
  "maxHoldingsPer13F": 0,
  "includeXbrlMetrics": false,
  "includeFilingHistory": false,
  "contactEmail": "sec-edgar-filings-actor@example.com",
  "userAgentProduct": "SecEdgarFilings/0.4 (+https://apify.com/earthen_garland/sec-edgar-filings)",
  "userAgent": "",
  "minRequestIntervalSeconds": 1.2
}
```

# Actor output Schema

## `filings` (type: `string`):

Default dataset of official SEC filing rows (10-K, 10-Q, 8-K, Form D, 13F-HR, and parsed fields when enabled).

# 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 = {
    "tickers": [
        "AAPL"
    ],
    "formTypes": [
        "8-K"
    ],
    "maxFilingsPerCompany": 2,
    "includeXbrlMetrics": false,
    "includeFilingHistory": false,
    "contactEmail": "sec-edgar-filings-actor@example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("earthen_garland/sec-edgar-filings").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 = {
    "tickers": ["AAPL"],
    "formTypes": ["8-K"],
    "maxFilingsPerCompany": 2,
    "includeXbrlMetrics": False,
    "includeFilingHistory": False,
    "contactEmail": "sec-edgar-filings-actor@example.com",
}

# Run the Actor and wait for it to finish
run = client.actor("earthen_garland/sec-edgar-filings").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 '{
  "tickers": [
    "AAPL"
  ],
  "formTypes": [
    "8-K"
  ],
  "maxFilingsPerCompany": 2,
  "includeXbrlMetrics": false,
  "includeFilingHistory": false,
  "contactEmail": "sec-edgar-filings-actor@example.com"
}' |
apify call earthen_garland/sec-edgar-filings --silent --output-dataset

```

## MCP server setup

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

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/7TCZlvI54sANVqrpg/builds/OXPyKVdKFHbpdvU52/openapi.json
