SKILL.md
edgartools — SEC EDGAR Data
Python library for accessing all SEC filings since 1994 with structured data extraction.
Authentication (Required)
The SEC requires identification for API access. Always set identity before any operations:
from edgar import set_identity
set_identity("Your Name [email protected]")
Set via environment variable to avoid hardcoding: EDGAR_IDENTITY="Your Name [email protected]".
Installation
uv pip install edgartools
# For AI/MCP features:
uv pip install "edgartools[ai]"
Core Workflow
Find a Company
from edgar import Company, find
company = Company("AAPL") # by ticker
company = Company(320193) # by CIK (fastest)
results = find("Apple") # by name search
Get Filings
# Company filings
filings = company.get_filings(form="10-K")
filing = filings.latest()
# Global search across all filings
from edgar import get_filings
filings = get_filings(2024, 1, form="10-K")
# By accession number
from edgar import get_by_accession_number
filing = get_by_accession_number("0000320193-23-000106")
Extract Structured Data
# Form-specific object (most common approach)
tenk = filing.obj() # Returns TenK, EightK, Form4, ThirteenF, etc.
# Financial statements (10-K/10-Q)
financials = company.get_financials() # annual
financials = company.get_quarterly_financials() # quarterly
income = financials.income_statement()
balance = financials.balance_sheet()
cashflow = financials.cashflow_statement()
# XBRL data
xbrl = filing.xbrl()
income = xbrl.statements.income_statement()
