Skip to main content

beatandraise: Python client for the SEC Filings API

Python client for the beatandraise.com SEC Filings API, an SEC EDGAR API designed for LLMs. It covers:

  • The whole EDGAR archive. Every filing since 1993, about 18.8 million, new filings within minutes, with every document as text.
  • 10-K, 10-Q, 8-K and 20-F Items. Risk Factors, MD&A, or any 8-K Item, found by its heading.
  • XBRL financial statements. As the company presented them, with each line's tag and a link to the figure.
  • Ownership data. Form 4 insider transactions, 13F institutional holders and portfolios, and shares outstanding with splits.
  • Every SEC XML form as JSON. Form D, 144, 13D/G, N-PX and others.
  • Verification. Checks for quotes, figures and citations against the filing.

Every result names the filing it came from. The package uses only the Python standard library and needs Python 3.9 or later.

pip install beatandraise
export BEATANDRAISE_API_KEY=bar_...   # free key: https://beatandraise.com/api-keys

Quickstart

from beatandraise import Client

api = Client()  # reads BEATANDRAISE_API_KEY

# Find a company and its latest 10-K
apple = api.search_companies("AAPL")
tenk = api.filings(cik="0000320193", form="10-K", limit=1)["filings"][0]
acc = tenk["accession_number"]

# Risk Factors (Item 1A) as text: the section itself, not the table of contents
risk_factors = api.item(acc, "1A")

# Income statement across the last five 10-Ks
history = api.financial_history(cik="0000320193", period="annual", statements="income", limit=5)

# Who owns it: % held by 13F filers, top holders, buyers and sellers
holders = api.institutional_holders("AAPL")
q = holders["quarters"][0]
print(q["period"], q["share_classes"][0]["pct_of_class"], "% held by", q["holders"], "13F filers")

Examples

# Insider sales and purchases, with the Rule 10b5-1 flag and footnotes
rows = api.insider_transactions(cik="0001045810", from_="2026-09-01", include_footnotes=True)["transactions"]
sales = [r for r in rows if r["transaction_code"] == "S"]

# 8-K officer changes (Item 5.02) across all companies, with the Item's text
events = api.filings(item="5.02", item_text="5.02", from_="2026-11-01", limit=25)

# Full-text search, one result per company
hits = api.search('"going concern"', form="10-K", year=2026, by_company=True)

# Lines in a filing that mention a term
lines = api.search_document("0000320193", acc, q="tariffs")

# Statement lines with XBRL concept, value in full units and a highlight link
stmts = api.statements("0000320193", acc, include_tags=True)

# Check a figure before you quote it
check = api.verify_figure("0000320193", acc, value="$478.8 billion", label="Net sales")

# Any endpoint by path
api.get("/fiscal-calendar", cik="0000320193")

Parameters named from in the API are from_ in Python. Lists are sent comma-separated (statements=["income", "cash_flow"]).

Methods

Method Endpoint
filings(cik, form, from_, to, item, item_text, limit, offset) GET /filings
search(q, form, cik, year, limit, page, by_company) GET /search
search_companies(q), company(cik) GET /company/search, /company/{cik}
identifiers(ticker, cik, cusip) GET /identifiers
sic(...) GET /sic
fiscal_calendar(cik, fiscal_year, from_, to) GET /fiscal-calendar
filing(acc), filing_tables(acc), files(acc) GET /filing/{acc}, /filing/{acc}/tables, /files/{acc}
download(acc, filename) (bytes) GET /files/{acc}/{filename}
document(cik, acc, filename, markdown=True) (text) GET /document/{cik}/{acc}/{filename}
search_document(cik, acc, q, filename, context) GET /document/search/...
items(acc), item(acc, item) (text) GET /items/{acc}, /items/{acc}/{item}
form_data(cik, form, ...) GET /form-data
statements(cik, acc, include_tags) GET /statements/{cik}/{acc}
financial_history(cik, period, statements, limit, fiscal_year, fiscal_period, include_tags) GET /financial-history
insider_transactions(cik, from_, to, include_table_ii, include_footnotes) GET /insider-transactions
shares_outstanding(cik, share_class, from_, to) GET /shares-outstanding
holdings(cik, period) GET /holdings/{cik}
institutional_holders(company, quarters, holder, detail) GET /institutional-holders/{company}
verify_quote(cik, acc, filename, quote) GET /document/verify/...
verify_figure(cik, acc, value, label, filename) GET /document/verify-figure/...
figures(cik, acc, filename, near) GET /document/figures/...
check_citations(text) POST /check-citations
account() GET /account

The full reference, with an example response for each endpoint, is the OpenAPI spec. You can also try any request in the browser.

Errors and limits

A refused request raises beatandraise.APIError with .status and .body. Requests refused for rate (429) or by a busy server (502-504) are retried twice, honouring Retry-After. The free plan includes 100 successful requests at up to 10 a second; Pro is unlimited at 20 a second. See plans.

Using it from an LLM

To give Claude, ChatGPT, Cursor or Codex the same data with no code, add the MCP server at https://mcp.beatandraise.com/mcp. Setup for each client is at beatandraise.com/mcp.

Guides

Questions: support@beatandraise.com. Data source: SEC EDGAR. Nothing here is investment advice.

Metadata

Release files for beatandraise 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beatandraise 0.1.0
File Size Uploaded Provenance Actions
beatandraise-0.1.0.tar.gz 8.5 kB Without provenance Details for beatandraise-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beatandraise 0.1.0
File Interpreter ABI Platform Actions
beatandraise-0.1.0-py3-none-any.whl Python 3 none any Details for beatandraise-0.1.0-py3-none-any.whl

Total release size: 17.4 kB

Release files / beatandraise-0.1.0.tar.gz

Download URL beatandraise-0.1.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
500ce981578bca35c18d5bf8c90990d8ff8715834f603f4bbabec360207a7807
BLAKE2b-256 checksum
How to use checksums
856429ddb79a01c80ca0cb47bfd023c3fcdeed16a9c49b738b6c844b0f30d4cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / beatandraise-0.1.0-py3-none-any.whl

Download URL beatandraise-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8780a615dbae466eb14f070c2f32ee78628ece5db5bb72a4af421dc7c2b22271
BLAKE2b-256 checksum
How to use checksums
d6de64de255274b98afce32292cd7737d50493b08366e93b7cce51c95a88b0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for beatandraise 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page