Metadata-Version: 2.4
Name: edgar_agent_tool
Version: 0.0.1
Summary: A tool to read through filings on the EDGAR site from the SEC
Home-page: https://github.com/problemsolversguild/edgar_agent_tool
Author: Kevin Bird
Author-email: kevin@problemsolversguild.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

# edgar_tool


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Features

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

## Developer Guide

If you are new to using `nbdev` here are some useful pointers to get you
started.

### Install edgar_tool in Development mode

``` sh
# make sure edgar_tool package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to edgar_tool
$ nbdev_prepare
```

## Usage

## Installation

``` bash
pip install edgar_tool
```

Or install from GitHub for the latest version:

``` bash
pip install git+https://github.com/problemsolversguild/edgar_tool.git
```

### Documentation

Documentation can be found hosted on this GitHub
[repository](https://github.com/problemsolversguild/edgar_tool)’s
[pages](https://problemsolversguild.github.io/edgar_tool/). Additionally
you can find package manager specific guidelines on
[conda](https://anaconda.org/problemsolversguild/edgar_tool) and
[pypi](https://pypi.org/project/edgar_tool/) respectively.

## Quick Start

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

``` bash
export SEC_USER_AGENT="YourName your@email.com"
```

``` python
from edgar_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"])
```

    10-K Filed: 2025-10-31 | Report Date: 2025-09-27
    Ticker: AAPL | CIK: 320193

    Items found: 23

    Part I:
      • Item 1: Business
      • Item 1A: Risk Factors
      • Item 1B: Unresolved Staff Comments
      • Item 1C: Cybersecurity
      • Item 2: Properties
      • Item 3: Legal Proceedings
      • Item 4: Mine Safety Disclosures

    Part II:
      • Item 5: Market for Registrant's Common Equity
      • Item 6: [Reserved]
      • Item 7: Management's Discussion and Analysis (MD&A)
      • Item 7A: Quantitative and Qualitative Disclosures About Market Risk
      • Item 8: Financial Statements and Supplementary Data
      • Item 9: Changes in and Disagreements with Accountants
      • Item 9A: Controls and Procedures
      • Item 9B: Other Information
      • Item 9C: Disclosure Regarding Foreign Jurisdictions

    Part III:
      • Item 10: Directors, Executive Officers and Corporate Governance
      • Item 11: Executive Compensation
      • Item 12: Security Ownership of Certain Beneficial Owners
      • Item 13: Certain Relationships and Related Transactions
      • Item 14: Principal Accountant Fees and Services

    Part IV:
      • Item 15: Exhibits and Financial Statement Schedules
      • Item 16: Form 10-K Summary

``` python
# 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")
```

    Risk Factors: 68281 characters

``` python
# 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']}")
```

    2025-12-08: 8-K - 8-K - 5.02,5.07
    2025-10-29: 8-K - 8-K - 2.02,7.01,9.01
    2025-09-30: 8-K - 8-K - 5.02
    2025-07-30: 8-K - 8-K - 2.02,9.01
    2025-07-01: 8-K - 8-K - 5.03,9.01

## Key Functions

| Function | Description |
|----|----|
| `get_filing(ticker, filing_type, 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)` | Search filings across all companies |
| `ticker_to_cik(ticker)` | Convert ticker to SEC CIK number |
| `get_filing_document(url)` | Fetch raw filing content as markdown |

## Filing Classes

For more control, use the typed filing classes directly:

| Class | Description |
|----|----|
| [`Filing10K`](https://problemsolversguild.github.io/edgar_tool/filings.html#filing10k) | Annual reports with 23 standard items across 4 parts |
| [`Filing10Q`](https://problemsolversguild.github.io/edgar_tool/filings.html#filing10q) | Quarterly reports with financial statements and MD&A |
| [`Filing8K`](https://problemsolversguild.github.io/edgar_tool/filings.html#filing8k) | Current reports for material events (earnings, exec changes, etc.) |

Each class provides: - **Lazy content loading** — Content fetched only
when accessed - **Automatic section parsing** — Structured access to all
standard items - **Convenience properties** — `.business`,
`.risk_factors`, `.mda`, `.financials` - **Summary generation** —
Human-readable filing overviews

## 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**: Financial Statements
- **I-2**: MD&A ⭐
- **II-1A**: Risk Factor updates

### 8-K Items

- **2.02**: Results of Operations (earnings) ⭐
- **5.02**: Director/Officer changes
- **7.01**: Regulation FD Disclosure
- **8.01**: Other Events

Ok, how is that looking?
