# SEC EDGAR API — Filings, XBRL Financials & Full-Text Search (`insight.solutions/sec-edgar-api`) Actor

Query the SEC's official EDGAR APIs from one Actor: resolve any ticker, CIK or company name; list 10-K, 10-Q, 8-K and Form 4 filings by date; pull normalized XBRL income statement, balance sheet and cash flow by period; run full-text search across filings since 2001.

- **URL**: https://apify.com/insight.solutions/sec-edgar-api.md
- **Developed by:** [Insight Solutions](https://apify.com/insight.solutions) (community)
- **Categories:** Business, Developer tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 filing records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SEC EDGAR API — Filings, XBRL Financials & Full-Text Search

**Get SEC filings and financials by ticker or CIK, as clean JSON, with no API key.** Give it `AAPL`, `320193` or `Apple Inc.` and get back the company record, the 10-K / 10-Q / 8-K / Form 4 filing history, a normalized income statement, balance sheet and cash flow built from XBRL, or full-text search hits across filing documents.

Every request goes to the SEC's own public JSON APIs — `data.sec.gov`, `www.sec.gov` and `efts.sec.gov` — so the data is EDGAR's, live, and no scraping or login is involved. Filings appear within minutes of acceptance. **From $0.0015 per filing record**, and diagnostic rows are free.

Most SEC Actors cover exactly one slice: Form D only, Form 4 only, financials only. This one covers all four in a single, consistent interface — which is what makes it useful to an agent that does not know in advance what it will need.

### Try it in 30 seconds

The five most recent Apple annual reports:

```json
{
  "mode": "filings",
  "identifiers": ["AAPL"],
  "formTypes": ["10-K"],
  "maxFilingsPerCompany": 5,
  "userAgentContact": "Acme Research data@acme.com"
}
```

**Set `userAgentContact` to your own organisation and a working address.** The SEC requires every automated request to say who is making it and answers HTTP 403 otherwise. The Console example is pre-filled with the publisher's contact so the sample run works out of the box; replace it with yours for real use, so the SEC reaches you, not us, about your traffic. Runs with an empty or placeholder contact stop with an explanatory row and are not charged.

### Four modes: company, filings, XBRL financials, full-text search

| Mode | Give it | Get back | Charged as |
|---|---|---|---|
| `company` | tickers / CIKs / names | One entity record per company: SIC code, exchanges, addresses, fiscal year end, former names | `company-record` |
| `filings` | identifiers + optional form and date filters | One row per filing, with direct links to the primary document and the filing index | `filing-record` |
| `financials` | identifiers | One row per statement per fiscal period, with normalized concepts and source XBRL tags | `financial-period` |
| `fullTextSearch` | a search phrase, optionally scoped to companies, forms and dates | One row per matching filing document, with a highlighted snippet | `filing-record` |

More examples:

```json
{ "mode": "financials", "identifiers": ["MSFT"], "statements": ["income", "cashflow"], "periodType": "annual", "maxPeriods": 4 }
```

```json
{ "mode": "fullTextSearch", "query": "\"material weakness\"", "formTypes": ["10-K"], "filedAfter": "2023-01-01", "maxFilingsPerCompany": 50 }
```

```json
{ "mode": "filings", "identifiers": ["TSLA", "NVDA", "AMD"], "formTypes": ["8-K"], "filedAfter": "2024-01-01", "maxFilingsPerCompany": 200 }
```

### Use cases

- **Pull 10-K and 10-Q financials by ticker** into a model or spreadsheet — revenue, gross profit, operating income, net income, EPS, free cash flow, per fiscal period.
- **Build a filings alert feed** — `filings` mode with `formTypes: ["8-K"]` and `filedAfter` set to your last check, on an Apify Schedule.
- **Search the text of SEC filings** for a phrase — "material weakness", "going concern", a product name — across every filer since 2001, then follow `documentUrl` to the source.
- **Screen companies before a deal or an investment** — `company` mode returns SIC code, exchanges, fiscal year end and former names for a whole ticker list in one run.
- **Ground an LLM or research agent in primary sources** — every row carries `source`, `sourceUrl` and, for financials, the exact XBRL tag behind each number.
- **Track insider and ownership filings** — Form 4 and Form D are just `formTypes` values.

### How it compares

- **Four modes, one Actor.** Company resolution, filing history, normalized financials and full-text search behind one input schema, instead of four listings that each do one.
- **XBRL that is actually normalized.** US-GAAP tagging is inconsistent between filers and across years. Each field is filled from a documented fallback chain of tags, and `rawConcepts` records exactly which tag, filing and date produced each number — so nothing is hidden and nothing is unauditable.
- **Complete filing history, not a silent truncation.** Large filers keep only their most recent ~1,000 filings in the main submissions file; the rest live in overflow pages. This Actor walks up to five of those per company, skipping any whose date window cannot match, so a request for older filings gets real answers.
- **Any identifier resolves.** `AAPL`, `320193`, `0000320193` and `Apple Inc.` all land on the same company. Multi-class tickers (`GOOG` / `GOOGL`) resolve to one CIK and are returned once, so you are charged once.
- **Charge-on-success.** An identifier that does not resolve, a filter matching no filings, an SEC outage — all produce free diagnostic rows. If the SEC never answered at all, the run finishes FAILED and costs nothing, start fee included.

### Input reference

| Field | Type | Default | Applies to | Notes |
|---|---|---|---|---|
| `mode` | string | `filings` | all | `company`, `filings`, `financials`, or `fullTextSearch` |
| `identifiers` | array | `["AAPL"]` | all | Tickers, CIKs (padded or not), or company names. Required except in `fullTextSearch`, where it narrows the search |
| `formTypes` | array | all forms | `filings`, `fullTextSearch` | e.g. `["10-K","10-Q","8-K","4","D"]`. Asking for `10-K` also returns `10-K/A`, flagged with `isAmendment` |
| `filedAfter` / `filedBefore` | date | — | `filings`, `fullTextSearch` | Inclusive bounds on filing date, `YYYY-MM-DD` |
| `maxFilingsPerCompany` | integer | `50` | `filings`, `fullTextSearch` | Filings per company, newest first. In `fullTextSearch` it caps total hits. Max 1000 |
| `statements` | array | all three | `financials` | Any of `income`, `balance`, `cashflow`. One row per statement per period |
| `periodType` | string | `annual` | `financials` | `annual`, `quarterly`, or `both` |
| `maxPeriods` | integer | `8` | `financials` | Periods per company, most recent first. With `both`, applies to each separately. Max 40 |
| `query` | string | — | `fullTextSearch` | Required. Wrap a phrase in double quotes for an exact match |
| `includeDocumentUrls` | boolean | `true` | `filings`, `fullTextSearch` | Include links to the primary document and the filing index page |
| `userAgentContact` | string | — | all | **Required in practice.** Your organisation and a working contact address |
| `maxRunSecs` | integer | `240` | all | Wall-clock budget. The Actor stops asking for more data when reached, keeps everything written, and says so. Min 30, max 3600 |

### Output reference

Every row carries `ok`, `source`, `sourceUrl` and `scrapedAt`. Rows where `ok` is `false` are diagnostics and are never charged; `errorType` says which kind of problem it was (`unresolved-identifier`, `no-results`, `not-found`, `invalid-input`, `budget-exhausted`, `time-budget`, or an upstream class: `forbidden`, `rate-limit`, `network`, `http`, `parse`, `upstream-shape`).

**`filings`** — `cik`, `companyName`, `accessionNumber`, `formType`, `baseFormType`, `isAmendment`, `filingDate`, `reportDate`, `acceptanceDateTime`, `primaryDocument`, `primaryDocDescription`, `documentUrl`, `filingIndexUrl`, `size`, `isXBRL`, `isInlineXBRL`, `items`.

**`company`** — `cik`, `cikPadded`, `ticker`, `tickers`, `name`, `sic`, `sicDescription`, `entityType`, `exchanges`, `fiscalYearEnd`, `category`, `ein`, `stateOfIncorporation`, `phone`, `businessAddress`, `mailingAddress`, `formerNames`, `matchedOn`, `matchedInputs`.

**`fullTextSearch`** — `accessionNumber`, `cik`, `companyName`, `tickerFromDisplayName`, `formType`, `filingDate`, `periodEnding`, `snippet`, `documentUrl`.

**`financials`** — one row per statement per period:

```json
{
  "ok": true,
  "cik": "320193", "companyName": "Apple Inc.",
  "statement": "income", "periodType": "annual",
  "fiscalYear": 2024, "fiscalPeriod": "FY", "fiscalLabelSource": "sec-fy-fp",
  "periodStart": "2023-10-01", "periodEnd": "2024-09-28", "periodDays": 363,
  "unit": "USD",
  "revenues": 391035000000,
  "costOfRevenue": 210352000000,
  "grossProfit": 180683000000,
  "operatingIncome": 123216000000,
  "netIncome": 93736000000,
  "eps": 6.08,
  "rawConcepts": {
    "revenues": {
      "tag": "RevenueFromContractWithCustomerExcludingAssessedTax",
      "value": 391035000000, "unit": "USD",
      "accn": "0000320193-24-000123", "form": "10-K", "filed": "2024-11-01"
    }
  },
  "source": "data.sec.gov",
  "scrapedAt": "2026-09-08T06:55:41.000Z"
}
```

#### How the XBRL is normalized

Each normalized field is filled from the first US-GAAP tag in its chain that has a value for the period; `rawConcepts` always records which tag was used.

| Statement | Fields | Example tag chains |
|---|---|---|
| income | `revenues`, `costOfRevenue`, `grossProfit`, `operatingExpenses`, `researchAndDevelopment`, `operatingIncome`, `incomeBeforeTax`, `incomeTaxExpense`, `netIncome`, `eps`, `epsBasic`, `weightedAverageSharesDiluted` | `revenues`: `RevenueFromContractWithCustomerExcludingAssessedTax` → `…IncludingAssessedTax` → `Revenues` → `SalesRevenueNet` → `SalesRevenueGoodsNet` → `RevenuesNetOfInterestExpense`. `grossProfit`: `GrossProfit`, else computed as `revenues − costOfRevenue`. `netIncome`: `NetIncomeLoss` → `ProfitLoss` → `NetIncomeLossAvailableToCommonStockholdersBasic` |
| balance | `totalAssets`, `currentAssets`, `totalLiabilities`, `currentLiabilities`, `stockholdersEquity`, `cashAndEquivalents`, `shortTermInvestments`, `inventory`, `longTermDebt` | `totalLiabilities`: `Liabilities`, else `liabilitiesAndEquity − stockholdersEquity`. `cashAndEquivalents`: `CashAndCashEquivalentsAtCarryingValue` → `CashCashEquivalentsRestrictedCash…` |
| cashflow | `operatingCashFlow`, `investingCashFlow`, `financingCashFlow`, `capitalExpenditures`, `depreciationAndAmortization`, `dividendsPaid`, `shareRepurchases`, `freeCashFlow` | `capitalExpenditures`: `PaymentsToAcquirePropertyPlantAndEquipment` → `PaymentsToAcquireProductiveAssets`. `freeCashFlow`: computed as `operatingCashFlow − capitalExpenditures` |

Four rules make these numbers trustworthy:

1. **Units are never mixed.** Money comes from `USD` series, EPS from `USD/shares`, share counts from `shares`.
2. **Restatements win.** When the same period appears in several filings, the most recently filed value is used — a restated figure supersedes the one originally reported.
3. **Annual reports outrank earnings releases.** A value from a 10-K or 10-Q is preferred over the same value from an 8-K, even if the 8-K was filed later.
4. **Year-to-date figures are discarded.** Six- and nine-month cumulative periods inside 10-Qs are excluded, so a `quarterly` row is always a single quarter.

Fiscal labelling deserves a note, because it is where most XBRL pipelines go wrong. In the SEC's `companyfacts` feed, a fact's `fy` and `fp` describe *the filing it appeared in*, not the fact's own period — so FY2022 comparatives sitting inside a FY2024 10-K carry `fy: 2024`. This Actor cross-references each fact's accession number against the filing's report date and only adopts the SEC's `fy`/`fp` when they genuinely describe that period. Where that check cannot be made, the label is derived from the period end and the company's fiscal year end, and `fiscalLabelSource` tells you which happened.

### Pricing

You pay per result, not per minute. There is no subscription and no platform-usage surcharge.

| Event | What triggers it | Free | Bronze | Silver | Gold |
|---|---|---|---|---|---|
| `actor-start` | Once per run | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| `company-record` | Each company profile returned | $0.002 | $0.002 | $0.002 | $0.002 |
| `filing-record` | Each filing or search hit returned | $0.0015 | $0.0015 | $0.0012 | $0.001 |
| `financial-period` | Each statement × period returned | $0.004 | $0.004 | $0.003 | $0.0025 |

Bronze is the Starter plan, Silver is Scale, Gold is Business. Higher plans pay less per result.

**What that costs in practice**

| You ask for | You get | You pay |
|---|---|---|
| 5 Apple 10-Ks | 5 filing records | $0.0005 + 5 × $0.0015 = **$0.008** |
| 1,000 filings across 20 companies | 1,000 filing records | $0.0005 + 1,000 × $0.0015 = **$1.50** |
| 4 years of income + cash flow for one company | 8 financial periods | $0.0005 + 8 × $0.004 = **$0.033** |
| Company profiles for 100 tickers | 100 company records | $0.0005 + 100 × $0.002 = **$0.20** |

**You are never charged for:** diagnostic rows — an identifier that does not resolve, a company with no filings matching your filters, an SEC outage; **anything at all on a run that never got an answer out of the SEC** — the `actor-start` fee is billed once, and only after your input has validated *and* an SEC request has come back successfully, so an outage that starts before we reach the SEC costs nothing and finishes FAILED; rows the Actor could not write because your run or time budget was exhausted; anything beyond the events above — no platform-usage pass-through.

In `financials` mode, a company that files with the SEC but publishes no XBRL facts (some foreign private issuers, and anything filed before 2009) returns one company record with `financials: null`, charged at the `company-record` rate rather than as a financial period.

### Rate limits and the User-Agent requirement

The SEC requires a descriptive `User-Agent` naming the requester with an address it can reach (requests without one get HTTP 403), and no more than 10 requests per second. This Actor sends the `userAgentContact` you supply on every request and holds itself to a token bucket of **8 requests per second** — a deliberate margin under the published ceiling. It backs off and retries on 429, 5xx and the SEC's rate-limit 403, honouring `Retry-After`.

The 8 req/s ceiling is enforced **per run process**. Nothing coordinates across concurrent runs, so several of your own runs in parallel can add up beyond the SEC's limit — another reason the identity in `userAgentContact` should be yours.

Two budgets bound one run: `maxRunSecs` (default 240), and a cap of **5 overflow pages per company** when walking a large filer's older filings, so a filter that matches nothing costs at most five extra requests instead of downloading an entire history. When either truncates results, the run says so in its status message and log.

### Integrations and use from code

One JSON input, one flat JSON array out — the shape agent runtimes handle best. No browser, no proxy, no credentials beyond `userAgentContact`. The Actor is configured for x402 agentic payments: pay-per-event pricing, event-only charging, limited permissions, no Standby mode. It is callable by name over the **Apify MCP server**, and the **Integrations** tab pushes results to Slack, a webhook, Zapier, Make, Google Sheets, Snowflake or BigQuery.

```bash
curl -X POST "https://api.apify.com/v2/acts/insight.solutions~sec-edgar-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"filings","identifiers":["AAPL"],"formTypes":["10-K"],"maxFilingsPerCompany":5,"userAgentContact":"Acme Research data@acme.com"}'
```

```python
## pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("insight.solutions/sec-edgar-api").call(run_input={
    "mode": "financials",
    "identifiers": ["NVDA", "AMD"],
    "statements": ["income"],
    "periodType": "annual",
    "maxPeriods": 3,
    "userAgentContact": "Acme Research data@acme.com",
})

for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("ok"):
        print(row["companyName"], row["fiscalYear"], row["revenues"], row["netIncome"])
```

**Agent patterns that work well:** answer a question about a company's numbers with `financials` and a small `maxPeriods`, citing `rawConcepts` for the exact XBRL tag; find the source document for a claim with `fullTextSearch` on a quoted phrase, then follow `documentUrl`; establish what a company is with `company` before anything else; watch for new filings with `filings`, `formTypes: ["8-K"]` and `filedAfter`.

### FAQ

**Why does one of my companies have no financials?**
XBRL reporting became mandatory in phases starting in 2009, and some filers — notably foreign private issuers filing 20-F or 40-F — are not in the `companyfacts` feed at all. You get a company record with `financials: null` instead of an error, charged at the company rate.

**A number disagrees with what the company reported. Why?**
Almost always a restatement. This Actor returns the most recently filed value for each period, which is the current, restated figure — not necessarily the number printed in the original filing. `rawConcepts[field].filed` and `.accn` tell you which filing the value came from.

**Are amended filings included?**
Yes. Filtering on `10-K` returns both `10-K` and `10-K/A`; `isAmendment` and `baseFormType` separate them. In `financials` mode, values from original 10-K/10-Q filings are preferred over amendments and over 8-K earnings releases.

**Why do `GOOG` and `GOOGL` return one row?**
They are two share classes of one registrant with one CIK. Both resolve to that CIK and it is returned once, with all matched inputs listed in `matchedInputs`, so you are charged once rather than twice.

**How far back does full-text search go?**
EDGAR's full-text index covers filings from 2001 onwards. For anything older, use `filings` mode, which reaches back to the beginning of a company's EDGAR history.

**Does `maxFilingsPerCompany` really reach older filings?**
Yes. The SEC keeps roughly the most recent 1,000 filings in the main submissions file and pushes the rest into overflow pages. The Actor follows those when your limit or date range requires it, and only then — so small requests stay fast. It follows at most five per company; if that truncates your results, the run says so, and narrowing `filedAfter`/`filedBefore` takes you straight to the right pages.

**When is an empty result a failure, and when is it not?**
A failure is the SEC not answering: 403, 5xx, timeouts, or a maintenance page instead of JSON. Zero rows plus one of those is a FAILED run. Everything else is a successful run with diagnostic rows — a ticker that does not exist, a CIK with no submissions record, a form filter matching no filings, a company with no XBRL facts. Those are answers, just not the ones you hoped for, and you are not charged for them.

**Is any of this investment advice?**
No. This Actor reproduces public regulatory filings. It does not interpret them.

### Legal

- **Not affiliated with, endorsed by, or sponsored by the U.S. Securities and Exchange Commission.** "EDGAR" and "SEC" are used descriptively to identify the public data source.
- All data comes from **US federal public records** that the SEC publishes explicitly for programmatic access. No login, no authentication, no paywall is bypassed.
- The Actor honours the SEC's published access policy: a descriptive `User-Agent` on every request and a self-imposed limit of 8 requests per second against a published ceiling of 10.
- **Nothing here is investment, legal, or tax advice.** Filing data may contain errors, omissions, or restatements; verify against the source documents, which are linked on every row.
- Company officers' names appear in some filings as a matter of public record. This Actor does not extract, enrich, or infer personal data beyond what the SEC itself publishes in the structured fields listed above.

### Our other Actors

Public-data Actors on the same principles: official or public endpoints only, no login, no personal data, pay only for results.

| Actor | What it does |
|---|---|
| [Career Site Jobs API](https://apify.com/insight.solutions/ats-jobs-api) | Every open role from Greenhouse, Lever, Ashby, Workable and 10+ other ATS platforms, normalized |
| [New Job Postings Monitor](https://apify.com/insight.solutions/job-postings-monitor) | Only the roles that opened, closed or changed since your last run — hiring signals for sales and recruiting |
| [Website Contact Extractor](https://apify.com/insight.solutions/website-contact-extractor) | Business emails, phone numbers and social profiles from a list of website domains |
| [Wayback Machine Toolkit](https://apify.com/insight.solutions/wayback-toolkit) | Archived URLs, archived page text, and a diff of one page between two dates |

# Actor input Schema

## `mode` (type: `string`):

What to return. company = the entity record for each identifier. filings = filing history with form and date filters. financials = normalized XBRL income statement, balance sheet and cash flow by period; a company that files with the SEC but publishes no XBRL facts returns one company record with financials: null, billed as a company-record rather than a financial-period. fullTextSearch = EDGAR full-text search across filing documents (2001 onwards).

## `identifiers` (type: `array`):

Tickers (AAPL), CIKs (320193 or 0000320193), or company names (Apple Inc.). Required for the company, filings and financials modes. In fullTextSearch mode these are optional and narrow the search to those companies. Multi-class tickers such as GOOG and GOOGL resolve to the same CIK and are returned once.

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

Filter to these EDGAR form types, e.g. 10-K, 10-Q, 8-K, 4, D. Amendments are included automatically: asking for 10-K also returns 10-K/A, flagged with isAmendment. Leave empty for all forms. Used by the filings and fullTextSearch modes.

## `filedAfter` (type: `string`):

Only include filings filed on or after this date (YYYY-MM-DD).

## `filedBefore` (type: `string`):

Only include filings filed on or before this date (YYYY-MM-DD).

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

Maximum filings returned per company in filings mode, newest first. In fullTextSearch mode this caps the total number of search hits returned. Older filings beyond the most recent 1,000 are fetched automatically when this limit or the date range requires it.

## `statements` (type: `array`):

Which financial statements to return in financials mode. One dataset row is produced per statement per fiscal period.

## `periodType` (type: `string`):

Fiscal periods to return in financials mode. Year-to-date figures reported inside quarterly filings (six- and nine-month periods) are deliberately excluded so that quarterly rows are always single quarters.

## `maxPeriods` (type: `integer`):

Maximum fiscal periods returned per company in financials mode, most recent first. When period type is 'both', this limit applies separately to annual and to quarterly periods.

## `query` (type: `string`):

Search phrase for fullTextSearch mode. Wrap a phrase in double quotes for an exact match, e.g. "material weakness". EDGAR full-text search covers filings from 2001 onwards.

## `includeDocumentUrls` (type: `boolean`):

Include direct links to the primary filing document and to the filing index page on sec.gov.

## `userAgentContact` (type: `string`):

Your organisation and a working contact address, e.g. 'Acme Research data@acme.com'. The SEC requires every automated request to declare who is making it and how to reach them (sec.gov/os/accessing-edgar-data), and answers HTTP 403 without it. The pre-filled value is the publisher's own contact so the example run works out of the box; please replace it with yours for real use, so the SEC reaches you, not us, about your traffic.

## `maxRunSecs` (type: `integer`):

Wall-clock budget for the whole run. When it is reached the Actor stops requesting more data, keeps every row it has already written, and says so in the run status. Rows already written are still charged; nothing is charged for work that did not happen.

## Actor input object example

```json
{
  "mode": "filings",
  "identifiers": [
    "AAPL"
  ],
  "formTypes": [
    "10-K"
  ],
  "maxFilingsPerCompany": 5,
  "statements": [
    "income",
    "balance",
    "cashflow"
  ],
  "periodType": "annual",
  "maxPeriods": 8,
  "includeDocumentUrls": true,
  "userAgentContact": "Insight Solutions austinhughhillis@gmail.com",
  "maxRunSecs": 240
}
```

# Actor output Schema

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

Company profiles, filings, financial periods or full-text search hits, depending on the mode you ran. Delivered as JSON items in the default dataset.

# 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 = {
    "mode": "filings",
    "identifiers": [
        "AAPL"
    ],
    "formTypes": [
        "10-K"
    ],
    "maxFilingsPerCompany": 5,
    "userAgentContact": "Insight Solutions austinhughhillis@gmail.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("insight.solutions/sec-edgar-api").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 = {
    "mode": "filings",
    "identifiers": ["AAPL"],
    "formTypes": ["10-K"],
    "maxFilingsPerCompany": 5,
    "userAgentContact": "Insight Solutions austinhughhillis@gmail.com",
}

# Run the Actor and wait for it to finish
run = client.actor("insight.solutions/sec-edgar-api").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 '{
  "mode": "filings",
  "identifiers": [
    "AAPL"
  ],
  "formTypes": [
    "10-K"
  ],
  "maxFilingsPerCompany": 5,
  "userAgentContact": "Insight Solutions austinhughhillis@gmail.com"
}' |
apify call insight.solutions/sec-edgar-api --silent --output-dataset

```

## MCP server setup

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

```

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/h6VCo6270nZgZx2Zt/builds/WQje7nnL4yh7gLah6/openapi.json
