# SEC 13F Holdings Scraper (`muhammadafzal/sec-13f-holdings-scraper`) Actor

Parse official SEC EDGAR Form 13F information tables into structured institutional holdings records for investment research and AI-agent workflows.

- **URL**: https://apify.com/muhammadafzal/sec-13f-holdings-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** MCP servers, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 13f holding record returneds

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/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 13F Holdings Scraper

Parse official SEC EDGAR Form 13F filings into clean, row-per-holding data for institutional ownership research, portfolio monitoring, and AI-agent workflows.

### What it does

The actor reads SEC submissions metadata, locates the filing's Information Table XML, and returns one structured record per reported security. It is HTTP-first and uses the SEC's public EDGAR endpoints; no login, third-party data provider, or browser session is required.

| Field group | Returned data |
| --- | --- |
| Manager | Manager name and ten-digit SEC CIK |
| Filing | Form type, accession number, filing date, reporting period, SEC archive link |
| Security | Issuer, class, CUSIP, shares/principal, SH/PRN type, PUT/CALL |
| Valuation | Value in thousands, converted market value in USD, parsed portfolio weight |
| Control | Investment discretion, other manager, sole/shared/none voting authority |
| Provenance | Direct Information Table XML URL, collection timestamp, warnings |

### When to use it

Use it to inspect quarterly institutional holdings for investment research, manager comparisons, ownership monitoring, competitive intelligence, and data pipelines. It is a good fit when you need the as-filed SEC position data with a verifiable source URL.

Do not use it for real-time positions, trade execution, performance attribution, short positions, or a complete portfolio: Form 13F is a delayed disclosure and covers only reportable Section 13(f) securities. Review the original SEC filing before making an investment decision.

### Input

All fields are optional. The default run uses Berkshire Hathaway's CIK (`0001067983`) and collects up to four recent initial 13F-HR filings, capped at 500 holding records.

```json
{
  "cik": "0001067983",
  "maxFilings": 4,
  "maxItems": 500,
  "includeAmendments": false
}
```

For a manager lookup, provide `managerName` and leave `cik` blank. For a precise filing, use `filingAccession` together with the institutional filer's `cik`, for example `filingAccession: "0001193125-26-226661"` and `cik: "0001067983"`; SEC accession prefixes identify the filing agent and are not always the filer CIK. `cik` takes precedence over `managerName`. `periodOfReport` accepts an exact quarter-end ISO date such as `2025-12-31`.

Set the optional `SEC_USER_AGENT` environment variable in Apify Console to a descriptive value that includes a contact address or URL. The actor uses a conservative request delay and retries transient SEC responses. The fallback User-Agent identifies the actor, but a contact-bearing value is recommended for production use.

### Output

Example item:

```json
{
  "managerName": "Berkshire Hathaway Inc",
  "cik": "0001067983",
  "formType": "13F-HR",
  "accessionNumber": "0001067983-25-000003",
  "filingDate": "2025-02-14",
  "periodOfReport": "2024-12-31",
  "nameOfIssuer": "APPLE INC",
  "titleOfClass": "COM",
  "cusip": "037833100",
  "valueThousands": 35500000,
  "marketValueUsd": 35500000000,
  "portfolioWeightPct": 12.345678,
  "sharesOrPrincipal": 830000000,
  "securityType": "SH",
  "putCall": null,
  "investmentDiscretion": "SOLE",
  "otherManager": null,
  "votingSole": 830000000,
  "votingShared": 0,
  "votingNone": 0,
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/1067983/000106798325000003/",
  "informationTableUrl": "https://www.sec.gov/Archives/edgar/data/1067983/000106798325000003/InfoTable.xml",
  "scrapedAt": "2026-08-02T12:00:00.000Z",
  "warnings": []
}
```

`valueThousands` follows the SEC Information Table convention. `marketValueUsd` is the same reported value multiplied by 1,000; it is not a live market price. `portfolioWeightPct` is calculated from the sum of parsed Information Table values in that filing, so it is approximate for amendments or unusual filings.

### Pricing

| Event | Price |
| --- | ---: |
| Actor start | $0.00005 per run |
| Holding record | $0.005 per stored record |

The run status reports the record cap before collection. A 100-record run costs approximately $0.50 in record events plus the start event. The actor also supports Apify's usage-based billing option when enabled for the actor.

### API and MCP examples

Run with the Apify API:

```bash
curl "https://api.apify.com/v2/acts/YOUR_USERNAME~sec-13f-holdings-scraper/runs?token=YOUR_TOKEN" \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"cik":"0001067983","periodOfReport":"2025-12-31","maxItems":100}'
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('YOUR_USERNAME/sec-13f-holdings-scraper').call({
  cik: '0001067983',
  maxFilings: 1,
  maxItems: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

For MCP, add the actor through Apify MCP and call it with a CIK, manager name, accession, or reporting period. The tool returns a compact dataset preview and a dataset ID for paging through the complete result set.

### Limits and reliability

- Maximum 20 filings and 5,000 holding records per run.
- The default run is intentionally small enough for Apify health checks.
- The actor uses SEC EDGAR submissions and archive endpoints, with one request at a time and retry/backoff for 403, 429, and transient 5xx responses.
- SEC filing layouts are authoritative but are supplied by individual filers; an unusual or malformed filing can produce a warning or no rows.
- Initial reports and amendments are not automatically merged. Set `includeAmendments` when you need amendments, then deduplicate or choose the filing version in downstream analysis.
- Manager-name search first uses SEC's public company ticker directory and then EDGAR full-text search. For deterministic automation, prefer an exact CIK.

### Legal and research note

This actor accesses public SEC EDGAR data for research and automation. It does not provide investment advice, a recommendation, or real-time market data. Form 13F is delayed and incomplete by design; verify important facts against the original SEC filing and consult a qualified professional before making financial decisions. Respect SEC access guidance and provide a descriptive User-Agent contact when operating at scale.

# Actor input Schema

## `cik` (type: `string`):

Use this when you know the institutional manager's SEC Central Index Key. Enter up to 10 digits, such as '0001067983' for Berkshire Hathaway; the actor pads shorter values with leading zeros. Leave blank to use managerName or the default Berkshire filer, and do not enter a ticker symbol here.

## `managerName` (type: `string`):

Use this when you want the actor to resolve a manager name to a SEC CIK before collecting filings. Enter a name such as 'Berkshire Hathaway'; CIK takes precedence when both are supplied. Leave blank for the default filer, and do not use this to filter individual stock issuers.

## `filingAccession` (type: `string`):

Use this when you need one exact EDGAR filing instead of the manager's latest filings. Enter the accession in '0001193125-26-226661' format and also provide the institutional filer's cik or managerName; the accession prefix is not always the filer CIK. Leave blank for recent filings, and do not paste the full SEC URL here.

## `periodOfReport` (type: `string`):

Use this when you need one quarter-end reporting period. Enter an ISO date such as '2025-12-31'; the filter applies to the SEC report date, not the filing submission date. Leave blank for the newest filings, and do not use a month-only or natural-language date.

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

Use this when amended 13F-HR/A submissions should be included alongside initial 13F-HR reports. The default is false so the latest initial reports are easier to compare; set true to include amendments. This does not merge or restate duplicate holdings across filings.

## `maxFilings` (type: `integer`):

Use this when you need to cap the number of SEC filings inspected. Set an integer from 1 to 20; the default is 4, which normally covers one year's quarterly reports. This limits filings, not holding rows, and is not a page number.

## `maxItems` (type: `integer`):

Use this when you need a predictable output and PPE cost cap. Set an integer from 1 to 5000; the default is 500 and each stored holding record costs $0.005. This is not a limit on shares or market value.

## Actor input object example

```json
{
  "cik": "0001067983",
  "managerName": "Berkshire Hathaway",
  "filingAccession": "0001067983-25-000003",
  "periodOfReport": "2025-12-31",
  "includeAmendments": false,
  "maxFilings": 4,
  "maxItems": 100
}
```

# Actor output Schema

## `status` (type: `string`):

SUCCEEDED when SEC submissions and selected Information Tables were processed, or FAILED when all selected filings could not produce holdings.

## `recordsReturned` (type: `string`):

Number of holding records written to the default dataset.

## `filingsProcessed` (type: `string`):

Number of SEC 13F filings selected for this run.

## `cik` (type: `string`):

Resolved SEC Central Index Key used for the run.

## `chargedRecordEvents` (type: `string`):

Number of per-holding PPE events charged after stored records.

## `spentUsd` (type: `string`):

Approximate per-holding event spend; the actor-start event is listed separately in pricing.

## `warnings` (type: `string`):

Non-fatal diagnostics such as missing XML rows, truncation, or manager-resolution notes.

# 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 = {
    "cik": "0001067983"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/sec-13f-holdings-scraper").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 = { "cik": "0001067983" }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/sec-13f-holdings-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cik": "0001067983"
}' |
apify call muhammadafzal/sec-13f-holdings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammadafzal/sec-13f-holdings-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gFYkQ6gjzdwNadK8M/builds/oualNheKLYOmT5DNb/openapi.json
