跳到主要内容
知仓学习社ZHICANG

edgartools

Python library for accessing, analyzing, and extracting data from SEC EDGAR filings. Use when working with SEC filings, financial statements (income…

写文件严重 0 · 高危 1foryourhealth111-pixel/Vibe-Skills

它会碰到什么

扫了多少8 个文本文件,56 KB
它会碰到什么写文件
命中总数3 处
命中统计严重 0 · 高 1 · 中 0 · 低 0
逐条看命中(1 条严重或高危)
  • references/ai-integration.md:31identity-config-write
    Add to your MCP config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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 your.email@example.com")

Set via environment variable to avoid hardcoding: EDGAR_IDENTITY="Your Name your@email.com".

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()

Access Filing Content

text = filing.text()             # plain text
html = filing.html()             # HTML
md = filing.markdown()           # markdown (good for LLM processing)
filing.open()                    # open in browser

Key Company Properties

company.name                     # "Apple Inc."
company.cik                      # 320193
company.ticker                   # "AAPL"
company.industry                 # "ELECTRONIC COMPUTERS"
company.sic                      # "3571"
company.shares_outstanding       # 15115785000.0
company.public_float             # 2899948348000.0
company.fiscal_year_end          # "0930"
company.exchange                 # "Nasdaq"

Form → Object Mapping

| Form | Object | Key Properties |

|------|--------|----------------|

| 10-K | TenK | financials, income_statement, balance_sheet |

| 10-Q | TenQ | financials, income_statement, balance_sheet |

| 8-K | EightK | items, press_releases |

| Form 4 | Form4 | reporting_owner, transactions |

| 13F-HR | ThirteenF | infotable, total_value |

| DEF 14A | ProxyStatement | executive_compensation, proposals |

| SC 13D/G | Schedule13 | total_shares, items |

| Form D | FormD | offering, recipients |

Important: filing.financials does NOT exist. Use filing.obj().financials.

Common Pitfalls

  • filing.financials → AttributeError; use filing.obj().financials
  • get_filings() has no limit param; use .head(n) or .latest(n)
  • Prefer amendments=False for multi-period analysis (amended filings may be incomplete)
  • Always check for None before accessing optional data

Reference Files

Load these when you need detailed information:

  • [companies.md](references/companies.md) — Finding companies, screening, batch lookups, Company API
  • [filings.md](references/filings.md) — Working with filings, attachments, exhibits, Filings collection API
  • [financial-data.md](references/financial-data.md) — Financial statements, convenience methods, DataFrame export, multi-period analysis
  • [xbrl.md](references/xbrl.md) — XBRL parsing, fact querying, multi-period stitching, standardization
  • [data-objects.md](references/data-objects.md) — All supported form types and their structured objects
  • [entity-facts.md](references/entity-facts.md) — EntityFacts API, FactQuery, FinancialStatement, FinancialFact
  • [ai-integration.md](references/ai-integration.md) — MCP server setup, Skills installation, .docs and .to_context() properties

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 3,314
本站分层T1
该仓技能数258
原文件路径bundled/skills/edgartools/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 258 个技能