You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

BeanCounter v2 (beta)

Faithful, typed extraction of every document disseminated on SEC EDGAR, 1996 → 2026-08: 32,851,820 document records across 18,421,669 filings (all firms, all form types), decomposed into 4,874,403,057 ordered content blocks (headings, paragraphs, tables) that reproduce what a human sees in the browser. Successor to BeanCounter (paper).

Beta notes: this release ships the index and blocks tables. Two document-level payloads are extracted but not yet published — per-form structured data (has_data, e.g. every Form 4 transaction / 13F holding / NPORT-P position as typed fields) and byte-exact EDGAR-rendered HTML (has_rendered_html). They will arrive as an additional config. Image binaries are not included; image positions are preserved as image_ref blocks.

Keys, dates, and re-disseminations

One filing (accession) contains many documents: the main body, each exhibit, each structured XML doc, each OCR'd PDF. EDGAR occasionally re-disseminates the same filing (mostly <CORRECTION> events, common before ~2001), so the same (accession, filename) can appear on several days — sometimes with differing content (the corrected copy's feed body is often truncated by EDGAR; occasionally it is a genuine content replacement). This dataset preserves every disseminated copy and takes no editorial position on which is "the" document.

The unique key is (accession, filename, dissemination_date, dissem_seq):

  • filing_date — EDGAR's <FILING-DATE> from that copy's own header.
  • dissemination_date — the day the copy went out on the public feed (this also drives the year=/month= partitioning).
  • dissem_seq — ordinal among same-key copies within one day (0 for 99.97% of records).

To find re-disseminated documents: GROUP BY accession, filename HAVING count(*) > 1. To get one copy per document, a common choice is the largest text_chars per (accession, filename) (the feed's corrected copies are usually truncated), or the earliest/latest dissemination_date depending on your research design.

Tables

index — one row per document copy (32,851,820 rows)

column type meaning
accession string filing accession number (dashed)
filename string document filename within the filing
dissemination_date date32 feed day of this copy (key part)
dissem_seq int32 same-day copy ordinal (key part, usually 0)
extension string filename extension
form_type string the FILING's form (e.g. 8-K)
doc_type string? this DOCUMENT's <TYPE> (e.g. EX-99.1)
sequence string? document sequence within the submission
doc_format string? extraction route: html | text | xml_struct | pdf
filing_date date32 EDGAR filing date from this copy's header
cik int64? primary filer CIK
ciks list all filing entities {cik, role, name} (issuer, reporting_owner, filer, ...)
n_blocks int32 number of content blocks
n_tables int32 number of table blocks
text_chars int64 total characters of block text
n_warnings int32 parser warnings count
has_error bool a per-document extraction error was recorded
has_data bool typed structured payload exists (future config)
has_rendered_html bool byte-exact EDGAR HTML exists (future config)

blocks — one row per content block (4,874,403,057 rows)

Key columns plus duplicated hot-filter columns so most queries never touch the index.

column type meaning
accession, filename, dissemination_date, dissem_seq document key (join to index)
filing_date, form_type, doc_type, doc_format, cik duplicated filter columns
block_order int32 position within the document
block_type string heading | text | table | image_ref
text string? heading/text content
heading_level int32? 1–6 for headings
page int32? logical page (filer page-break markers; olmOCR pages for PDFs)
table_grid list<list>? canonical lossless cell matrix (exact source cell values)
table_markdown string? rendered GFM view (may drop empty spacer columns)
table_n_rows, table_n_cols int32? grid dimensions
table_is_complex bool? merged cells / multi-row headers present

Reconstructing a document as markdown: select its blocks ordered by block_order, render headings as '#' * heading_level + ' ' + text, tables via table_markdown, and join with \n\n:

def to_markdown(blocks):
    parts = []
    for b in sorted(blocks, key=lambda b: b["block_order"]):
        if b["block_type"] == "heading":
            parts.append("#" * (b["heading_level"] or 1) + " " + (b["text"] or ""))
        elif b["block_type"] == "table":
            parts.append(b["table_markdown"] or "")
        elif b["text"]:
            parts.append(b["text"])
    return "\n\n".join(parts)

Physical layout

data/index/year=YYYY/part-0000.parquet            31 files (1996–2026)
data/blocks/year=YYYY/month=MM/part-NNNN.parquet  zstd, ~≤600 MB parts
manifests/shards.parquet                          per-file rows, dates, bytes, sha256

Partitions follow dissemination_date. Rows are ordered by dissemination date, so parquet column statistics prune date-range queries even without hive-partition filtering. Use manifests/shards.parquet to plan partial downloads (it lists every data file's row count, date span, size, and sha256).

Usage

Stream blocks with datasets

from datasets import load_dataset

blocks = load_dataset(
    "fin-ai-lab/BeanCounter-v2", "blocks", split="train", streaming=True,
    columns=["accession", "filename", "dissemination_date", "form_type",
             "block_order", "block_type", "text", "table_markdown"],
)
for b in blocks.take(20):
    print(b["form_type"], b["block_type"], (b["text"] or "")[:80])

Query the index with DuckDB

SELECT filing_date, form_type, count(*) AS documents
FROM read_parquet('hf://datasets/fin-ai-lab/BeanCounter-v2/data/index/**/*.parquet')
WHERE cik = 320193
GROUP BY ALL ORDER BY filing_date;

Fetch one filing's blocks (DuckDB, pruned by date)

SELECT * FROM read_parquet(
  'hf://datasets/fin-ai-lab/BeanCounter-v2/data/blocks/year=2024/month=08/*.parquet')
WHERE accession = '0000320193-24-000081'
ORDER BY filename, dissem_seq, block_order;

Link back to EDGAR

def edgar_filing_url(accession, cik):
    return (f"https://www.sec.gov/Archives/edgar/data/{cik}/"
            f"{accession.replace('-', '')}/{accession}-index.htm")

Provenance & method

  • Source: complete EDGAR dissemination feed (daily oldloads), 1996 → 2026-08-03, all firms and all form types; 433,084 PDF documents OCR'd with olmOCR; 7,885,083 structured XML documents parsed by per-form deterministic parsers (validated byte-exact against EDGAR's own rendering); HTML and text documents extracted by engines validated against vision-model ground truth on the 109 highest-volume HTML form types.
  • Coverage: 100%+ of filings listed in EDGAR's own indexes for the period (the dissemination feed is a superset, including correction re-disseminations preserved here). SEC "paper" placeholder accessions (9999999997-*) have no electronic content and are absent. The only dropped records are 2 byte-identical extraction-pipeline artifacts.
  • Tables: table_grid is the lossless representation; table_markdown is a presentation view. 210 pathological tables (>2M cells, phantom-column colspan artifacts and dense fund-vote dumps) retain full grids but skip a cosmetic column-merge pass.

Citation

If you use BeanCounter v2, please cite:

@inproceedings{wang2024beancounter,
  title={BeanCounter: A low-toxicity, large-scale, and open dataset of business-oriented text},
  author={Wang, Siyan and Levy, Bradford},
  booktitle={Advances in Neural Information Processing Systems},
  year={2024}
}
Downloads last month
29

Paper for fin-ai-lab/BeanCounter-v2