# SEC Document Content Extractor (`bb-tradetec/sec-document-content-extractor`) Actor

Extract bounded, reproducible text, table, XML, and data blocks from confirmed public SEC filing documents.

- **URL**: https://apify.com/bb-tradetec/sec-document-content-extractor.md
- **Developed by:** [BB](https://apify.com/bb-tradetec) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Document Content Extractor

> Extract bounded, reproducible text, table, XML, and data blocks from confirmed public SEC filing documents.

### What this Actor gives you

Produce addressable content blocks from confirmed EDGAR documents while preserving structural paths and source identity.

Every Dataset item uses the SEC Complete Data Suite envelope and the primary
record type `secDocumentContentBlock`. Stable IDs, explicit coverage,
source/evidence references, parser versions, warnings, and structured
`SUMMARY`/`ERRORS` outputs make the result practical for both agent pipelines
and human review.

### Why an AI agent chooses this

It is a universal, bounded fallback when no narrower semantic capability matches. The AI receives stable records and explicit gaps instead of inventing a parser or guessing an archive path.

### Good fits

- filing text and table extraction
- evidence retrieval for AI workflows
- generic fallback for uncommon form types

### Agent selection contract

- **Actor slug:** `sec-document-content-extractor`
- **Capability ID:** `sec.document.content.extract`
- **Intent:** `extract_document_content`
- **Primary Dataset record:** `secDocumentContentBlock`
- **Accepted identifiers or inputs:** `accession+filerCik+filename`
- **Source authority:** `SEC`
- **Hard limits:** queries: 20, records: 10,000, sourceRequests: 100, downloadBytes: 104,857,600

Choose this Actor when the requested outcome matches the capability and record
type above. The contract is deterministic: unknown source values, incompatible
schema majors, ambiguity, truncation, and partial source failures remain
visible instead of being silently guessed away.

### Context and token efficiency

This Actor makes no LLM, embedding, or vector-search call and therefore spends
zero model tokens internally. Typed records and compact output can keep raw SEC pages, archive markup, and discovery instructions out of downstream model context.

For Suite-level selection, an AI client can use the compact
`agent-catalog.json` instead of loading this or the other Actor READMEs. Under
that documented baseline, README-selection tokens are avoided by construction.

No fixed percentage is promised: actual downstream token savings depend on the
client model, tokenizer, source document, output mode, and requested evidence.

### Part of the SEC Complete Data Suite

The SEC Complete Data Suite separates **universal coverage**, **specialized
normalization**, and **deterministic aggregation** into focused Actors. This
Actor provides the **universal coverage** role: Universal content fallback when no specialty Actor exists and evidence supplier for document-based normalizers.

It works especially well with `sec-filing-document-manifest`, `sec-comment-letter-thread-normalizer`, `sec-corporate-action-normalizer`. Suite Actors exchange documented
record envelopes and exact identifiers; they do not hide sibling runs or
surprise network costs. A client or the `sec-ai-query-planner` decides which
steps to execute.

### Example input

```json
{
  "queries": [
    {
      "requestId": "apple-annual-report",
      "accession": "0000320193-25-000079",
      "filerCik": "320193",
      "filename": "aapl-20250927.htm",
      "blockTypes": [
        "heading",
        "paragraph"
      ],
      "maxDocumentBytes": 5242880,
      "maxBlocks": 5000,
      "maxCharactersPerBlock": 20000,
      "includeRawMarkup": false
    }
  ],
  "maxResults": 3,
  "maxSourceRequests": 2,
  "maxDownloadBytes": 10485760,
  "outputSchemaVersion": "1.0",
  "outputMode": "full"
}
```

The executable input schema remains the authority for modes, filters,
defaults, cursor rules, and maximum values.

### Runtime and cost controls

The hard limits above are enforceable ceilings, not usage targets. Actual
runtime and platform cost depend on selected inputs, source requests, downloaded
bytes, result volume, and the Apify run configuration. Start with the bounded
example, lower `maxResults` and byte/request limits where the schema permits,
and inspect `SUMMARY` plus `ERRORS` before expanding a run. There is no hidden
model-token charge inside this Actor.

### Not the right tool for

- free-form web scraping
- legal conclusions or generated filing summaries

Additional non-goals from the capability contract include:

- follow arbitrary user URLs
- perform OCR
- execute JavaScript or macros
- extract XBRL facts
- generate summaries

### Trust, provenance, and limits

- It uses only its inventoried public SEC sources.
- Inputs, requests, bytes, records, retries, redirects, and cursor scope are
  bounded by the executable contract.
- Derived records retain exact input record IDs and evidence IDs where the
  capability performs normalization or aggregation.
- This independent community Actor is not affiliated with or endorsed by the
  U.S. Securities and Exchange Commission.
- The output is public-source data processing, not legal, compliance,
  accounting, voting, or investment advice.

### Reproducible support report

For a diagnosable issue, retain the Actor slug, run ID, sanitized input,
`SUMMARY`, `ERRORS`, and the first unexpected record ID. Never include an API
token, secret, private filing, or unrelated Dataset contents.

### Publication status

The Actor API and canonical Apify Store page are authoritative for current availability, active build, and pricing. This README deliberately does not duplicate mutable lifecycle or price claims.

# Actor input Schema

## `queries` (type: `array`):

One to twenty exact C03-compatible document identities with bounded extraction options.

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

Hard run-wide output ceiling.

## `maxSourceRequests` (type: `integer`):

Hard run-wide SEC request ceiling.

## `maxDownloadBytes` (type: `integer`):

Hard run-wide byte ceiling.

## `outputSchemaVersion` (type: `string`):

Only stable schema 1.0 is supported.

## `outputMode` (type: `string`):

Full or compact output shape.

## `cursor` (type: `string`):

Opaque cursor reserved for a later service package.

## Actor input object example

```json
{
  "maxResults": 100,
  "maxSourceRequests": 100,
  "maxDownloadBytes": 104857600,
  "outputSchemaVersion": "1.0",
  "outputMode": "full"
}
```

# Actor output Schema

## `contentBlocks` (type: `string`):

Default dataset: one secDocumentContentBlock per bounded extracted block.

## `summary` (type: `string`):

SUMMARY is written for success, empty, partial, and failed runs.

## `errors` (type: `string`):

ERRORS contains non-chargeable structured errors.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("bb-tradetec/sec-document-content-extractor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("bb-tradetec/sec-document-content-extractor").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 '{}' |
apify call bb-tradetec/sec-document-content-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bb-tradetec/sec-document-content-extractor"
        }
    }
}

```

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/URQNn8CUQLLcHiDgD/builds/O8w0FBudpp8Zm6Oqy/openapi.json
