Skip to main content

Edgar Agent Tool

Structured access to SEC EDGAR filings (10-K, 10-Q, 8-K, 20-F, 13F-HR) with automatic section extraction — designed for LLM agents and financial analysis.

Features

  • 🔍 Company Lookup — Convert stock tickers or CIK strings to SEC CIK numbers
  • 📑 Filing Retrieval — Fetch recent filings for any public company or institutional filer
  • 🧩 Automatic Section Parsing — Extract specific sections (Risk Factors, MD&A, Financial Statements, etc.)
  • 🌐 Cross-Company Search — Find filings across all companies by date range
  • 🤖 LLM-Friendly — Clean markdown output, structured dictionary returns, designed for AI agents
  • ⚡ Smart Caching — Built-in TTL caches to respect SEC rate limits

Installation

pip install edgar-agent-tool

Or install from GitHub for the latest version:

pip install git+https://github.com/problemsolversguild/edgar_agent_tool.git

Development Installation

pip install -e ".[dev]"
pytest

Quick Start

First, set up your SEC User-Agent (required by the SEC):

export SEC_USER_AGENT="YourName your@email.com"
from edgar_agent_tool.filings import get_filing, get_recent_filings

# Get Apple's latest 10-K with automatic section parsing
filing = get_filing("AAPL", filing_type="10-K")
print(filing["summary"])

# Extract a specific section (e.g., Risk Factors)
filing = get_filing("AAPL", filing_type="10-K", section="1A")
print(f"Risk Factors: {len(filing['section']['content'])} characters")

# Get a list of recent 8-K filings
filings = get_recent_filings("MSFT", filing_type="8-K", count=5)
for f in filings:
    print(f"{f['filingDate']}: {f['form']} - {f['primaryDocDescription']} - {f['items']}")

Key Functions

Function Description
get_filing(ticker, filing_type, index, section) Get a parsed filing with automatic section extraction
get_recent_filings(ticker, filing_type, count) List recent filings for a company
get_latest_filings(filing_type, start_date, end_date, count) Search filings across all companies
ticker_to_cik(ticker) Convert ticker to SEC CIK number
resolve_cik(identifier) Resolve ticker or CIK string to (cik, label)
get_filing_document(url, as_md) Fetch raw filing content (optionally as markdown)

Filing Classes

For direct object-oriented control, use the typed filing classes:

Class Description
Filing10K Annual reports with 23 standard items across 4 parts
Filing10Q Quarterly reports with financial statements and MD&A
Filing8K Current reports for material events (earnings, exec changes, etc.)
Filing20F Annual reports for foreign private issuers
Filing13F Institutional investment manager quarterly holdings reports (13F-HR)

Each class provides:

  • Lazy content loading — Content fetched only when accessed
  • Automatic section parsing — Structured access to standard items or holdings
  • Convenience properties — .business, .risk_factors, .mda, .financials (or .holdings, .top_holdings, .total_value on Filing13F)
  • Summary generation — Human-readable filing overviews via .summary()

Section Reference

10-K Sections

  • Item 1: Business description
  • Item 1A: Risk Factors ⭐
  • Item 7: Management's Discussion & Analysis (MD&A) ⭐
  • Item 8: Financial Statements ⭐

10-Q Sections

  • I-1 (or 1): Financial Statements
  • I-2 (or 2): MD&A ⭐
  • II-1A (or 1A): Risk Factor updates

8-K Items

  • 1.01: Material Definitive Agreement
  • 2.02: Results of Operations (earnings) ⭐
  • 5.02: Director/Officer changes
  • 7.01: Regulation FD Disclosure
  • 8.01: Other Events

20-F Sections

  • 3.D: Risk Factors ⭐
  • 4.B: Business Overview
  • 5: Operating and Financial Review (OFR) ⭐
  • 18: Financial Statements ⭐

Metadata

Release files for edgar_agent_tool 1.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 edgar_agent_tool 1.1.0
File Size Uploaded Provenance Actions
edgar_agent_tool-1.1.0.tar.gz 56.2 kB Without provenance Details for edgar_agent_tool-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 103.8 kB

Release files / edgar_agent_tool-1.1.0.tar.gz

Download URL edgar_agent_tool-1.1.0.tar.gz
Size 56.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fe837236de106dea177371fe316026e43a3f4063cff69310031517695b22ab59
BLAKE2b-256 checksum
How to use checksums
aa33a519d50c9d3a73153656ba1c7cf7de081abddcd1ab8b7632a3f5118e1336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / edgar_agent_tool-1.1.0-py3-none-any.whl

Download URL edgar_agent_tool-1.1.0-py3-none-any.whl
Size 47.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cadb113bec98f6912bd03fd32c8d3ee5cbf579098409cf123de4f44b6ec6f643
BLAKE2b-256 checksum
How to use checksums
44f1285435a23c5ceeffa590f96be3daf9c7ff967e25c1f5d89adb8af7fc67cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for edgar_agent_tool 1.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.

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