# SEC Official Dataset Rows (`bb-tradetec/sec-official-dataset-rows`) Actor

Read bounded, typed rows from catalogued public SEC dataset tables while retaining original columns and source provenance.

- **URL**: https://apify.com/bb-tradetec/sec-official-dataset-rows.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

from $0.05 / 1,000 sec official dataset rows

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/platform/actors/running/actors-in-store#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 Official Dataset Rows

Local Package-4 C07 capability `sec.official.dataset.rows`. It streams bounded,
typed rows from an explicitly versioned public SEC Data Library or DERA dataset
table without domain-specific interpretation. It accepts no user URL,
does not crawl broadly or invoke a sibling Actor. Each `secOfficialDatasetRow` preserves
the source column names and typed values in `data.fields`, while `normalized`
contains only safe cross-dataset identifiers such as CIK, accession, date,
form, and file number.

Packages 1–4 supply the executable contract, Pydantic models, parser,
inventory-bound resolver, exact-artifact HTTPX client, stateless cursor,
service, native Apify adapter and offline tests. The adapter writes only
schema-valid Dataset rows plus bounded `SUMMARY` and `ERRORS` values. It stores
fixed, sanitized error messages and creates no charge event.

The public input intentionally has no C06 record or URL. The native adapter
does not import, invoke, or read C06 at runtime. Its in-code registry currently
supports only `financial-statement-data-sets:2026-03-31`, table `sub`, with the
exact SEC 2026 Q1 archive and member `sub.txt`; all other version/table pairs
fail closed as `DATASET_UNMAPPED` before a fetch. The registry is derived from
the official [Financial Statement Data Sets](https://www.sec.gov/data-research/sec-markets-data/financial-statement-data-sets)
README/data dictionary and carries the ordered schema fingerprint and natural
key. There is no archive discovery or caller-controlled locator.

The eventual reader is limited to 50,000 rows, 250 MiB compressed input, 1 GiB
uncompressed input, and 1,000 SEC source requests per run. It will stream only
known archive files, reject traversal and archive-limit hazards, apply typed
filters during streaming, and retain valid rows on bounded per-row failures.

No Cloud action or pricing configuration is performed by the tests. A bounded
manual SEC preflight is documented in the handover; the normal test suite is
offline. See the [implementation specification](docs/implementation-spec.md) and
[test plan](docs/test-plan.md). Example input:
`examples/input-minimal.json`.

# Actor input Schema

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

One to twenty bounded requests for exact C06-catalogued tables.

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

Hard cap on emitted rows.

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

Hard cap on SEC source requests.

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

Compatibility limit equal to maxCompressedBytes; both must be equal.

## `maxCompressedBytes` (type: `integer`):

Hard cap on archive bytes before decompression.

## `maxUncompressedBytes` (type: `integer`):

Hard cap on streamed archive expansion.

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

Only the stable 1.0 public schema is supported.

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

Full or compact row output.

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

Opaque continuation token returned by a later implementation.

## Actor input object example

```json
{
  "maxResults": 1000,
  "maxSourceRequests": 100,
  "maxDownloadBytes": 52428800,
  "maxCompressedBytes": 52428800,
  "maxUncompressedBytes": 262144000,
  "outputSchemaVersion": "1.0",
  "outputMode": "full"
}
```

# Actor output Schema

## `rows` (type: `string`):

Default dataset with secOfficialDatasetRow records only.

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

Written for successful, empty, partial, and failed runs.

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

Structured non-chargeable errors only.

# 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-official-dataset-rows").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-official-dataset-rows").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-official-dataset-rows --silent --output-dataset

```

## MCP server setup

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

```

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/7WOYYnye9gD3rfyXl/builds/kPu7npjIHqEP4l97q/openapi.json
