On this page本文目录
TL;DR: choose by workflow, not by logoTL;DR:按工作流选,不要按品牌选
SEC EDGAR is the source-of-record choice. FMP is practical when filings already sit inside a financial-data stack. Finnhub is useful when filings are one input in a broader market-data product. sec-api.io is the strongest specialist option here for complex search, streaming, exhibits, and section extraction. QVeris helps an agent discover and call the right tool; it does not replace source attribution.
SEC EDGAR 适合作为第一方记录源;当 Filing 已经属于金融数据栈的一部分时,FMP 更省集成成本;若 Filing 只是综合市场数据产品的一种输入,可考虑 Finnhub;需要复杂搜索、实时流、附件和章节提取时,sec-api.io 是这里更专业的选择。QVeris 用于帮助 Agent 发现并调用合适工具,但不会替代来源归属。
Best for authoritative submissions and XBRL facts when your team can own parsing, caching, and access controls.
适合重视权威来源,并能自行承担解析、缓存与访问控制的团队。
Best when you want symbol-, CIK-, or form-based filing discovery beside other normalized financial endpoints.
适合希望用股票代码、CIK 或表单类型检索,并与其他标准化财务接口共用一套数据栈的团队。
Worth testing when SEC filings must share authentication and operations with global company and market data.
当 SEC Filing 需要与全球公司和市场数据共用认证与运维体系时,值得测试。
Best fit for full-text queries, filing streams, exhibit retrieval, section extraction, and XBRL conversion.
更适合全文查询、实时 Filing 流、附件获取、章节提取与 XBRL 转换。
Who this guide is for这份指南适合谁
This guide is for engineers building research copilots, event-monitoring agents, earnings workflows, compliance review, or retrieval systems that must answer with primary-source evidence. It assumes you can make HTTPS requests, store normalized JSON, and run a scheduled job or queue.
本文适合构建研究 Copilot、事件监控 Agent、财报工作流、合规审阅或检索系统的工程师,尤其是输出必须附带第一方证据的场景。你需要具备 HTTPS 请求、标准化 JSON 存储以及定时任务或队列的基础能力。
A descriptive User-Agent, a stable company-identity mapping, persistent evidence storage, retry and caching controls, and a policy for amendments and exhibits.
准备一个可识别的 User-Agent、稳定的公司身份映射、持久化证据存储、重试与缓存控制,以及修订文件和附件的处理策略。
What an AI agent actually needs from a filing APIAI Agent 真正需要 Filing API 提供什么
“Returns a 10-K” is not a sufficient requirement. A production agent must identify the issuer, distinguish filing dates from reporting periods, preserve amendments, retrieve the primary document and exhibits, and prove which source supported every claim.
“能返回 10-K”并不是完整需求。生产级 Agent 必须确认发行人身份,区分提交日期与报告期,保留修订版本,获取主文件和附件,并证明每条结论来自哪份原始材料。
- Identity: CIK as the stable SEC key; ticker and legal name as aliases.身份:以 CIK 作为稳定 SEC 主键,Ticker 和法定名称作为别名。
- Discovery: filter by form, issuer, filing date, report date, and amendment status.发现:按表单、发行人、提交日期、报告期和修订状态过滤。
- Documents: primary HTML or text, filing index, exhibits, inline XBRL, and attachments.文档:主 HTML/TXT、Filing Index、附件、Inline XBRL 及其他提交材料。
- Evidence: accession number, canonical source URL, retrieval time, content hash, and cited section.证据:Accession Number、规范来源 URL、抓取时间、内容哈希和引用章节。
- Operations: documented limits, retries, caching, backfills, and predictable error behavior.运维:明确的限额、重试、缓存、历史回补和可预测的错误行为。
SEC filings APIs comparedSEC 文件 API 对比
| Option选项 | Best use最适场景 | Strength优势 | Main trade-off主要代价 |
|---|---|---|---|
| SEC EDGAR | Primary-source ingestion第一方来源采集 | No API key; submissions and XBRL data; real-time updates无需 API Key;Submissions 与 XBRL;实时更新 | You own identity mapping, parsing, caching, history files, and fair-access compliance需自行处理身份映射、解析、缓存、历史文件与公平访问规范 |
| FMP Stable API | Managed finance applications托管型金融应用 | Search by symbol, CIK, or form beside broader financial endpoints支持 Symbol、CIK、Form 检索,可接入更广泛财务接口 | Plan limits and provider normalization must be validated for your workload需要针对业务量验证套餐限制和供应商标准化规则 |
| Finnhub | Filings within a wider global-data stack全球数据栈中的 Filing 输入 | One provider surface for company, market, and filing-related data在同一供应商体系内组合公司、市场及 Filing 数据 | Confirm exact fields, history, entitlements, and throughput with a representative test set需用代表性样本确认字段、历史深度、授权和吞吐 |
| sec-api.io | Advanced filing search and extraction高级 Filing 搜索与提取 | Query, full text, stream, download, exhibits, XBRL conversion, and item extraction查询、全文、实时流、下载、附件、XBRL 转换和 Item 提取 | Commercial dependency; scope and pricing should be checked against usage商业依赖;应按实际用量核对覆盖和价格 |
Do not choose from a feature matrix alone. Run the same 25–50 filings through every shortlisted provider: recent and historical 10-Ks, 10-Qs, 8-Ks with exhibits, amendments, a renamed issuer, a ticker change, and at least one filing with custom taxonomy facts.
不要只看功能表。应把相同的 25–50 份文件交给每个候选供应商测试:近期与历史 10-K、10-Q、带附件的 8-K、修订文件、公司更名、Ticker 变更,以及至少一份含自定义 Taxonomy Fact 的文件。
Provider notes: where each option wins供应商详解:各自真正擅长什么
The Submissions API exposes filing history by 10-digit CIK. Company Facts and Company Concept expose standardized XBRL facts. APIs require no authentication and update throughout the day, but older filing history may live in additional files referenced by the response.
Submissions API 按 10 位 CIK 返回提交历史;Company Facts 与 Company Concept 提供标准化 XBRL Facts。接口无需认证且全天更新,但较早历史可能位于响应中指向的附加文件。
FMP documents Stable endpoints for filing search by symbol, CIK, and form type, as well as 8-K and financial filings. This is convenient when the same application already uses normalized company and financial data.
FMP Stable 文档提供按 Symbol、CIK、Form Type 检索,以及 8-K 和财务 Filing 端点。若应用已经使用其标准化公司与财务数据,集成会更直接。
Finnhub can be attractive for teams already operating its token, SDK, and market-data workflows. Before committing, test amendment flags, exhibit links, full-text access, field stability, historical depth, and plan entitlements.
已经使用 Finnhub Token、SDK 和市场数据工作流的团队,可能更容易接入。正式采用前,应测试修订标记、附件链接、全文访问、字段稳定性、历史深度及套餐权限。
Its documentation covers metadata queries, full-text search, WebSocket streaming, filing and exhibit download, 10-K/10-Q/8-K item extraction, and XBRL-to-JSON. That can remove substantial parsing work from an agent pipeline.
其文档覆盖元数据查询、全文搜索、WebSocket 实时流、Filing 与附件下载、10-K/10-Q/8-K Item 提取和 XBRL-to-JSON,可显著减少 Agent 管线的解析工作。
Reference architecture for a source-backed filing agent带来源证据的 Filing Agent 参考架构
Map user text or ticker to a legal entity and store the zero-padded 10-digit CIK.
将用户输入或 Ticker 映射到法定实体,并保存补零后的 10 位 CIK。
Filter by form, filing date, report date, and amendment policy. Keep the raw provider response.
按 Form、提交日期、报告期和修订策略筛选,并保留供应商原始响应。
Fetch the filing index, primary document, relevant exhibits, and structured facts. Do not assume the primary HTML contains every material attachment.
获取 Filing Index、主文档、相关附件和结构化 Facts;不要假设主 HTML 包含所有重要材料。
Create clean text and fact records while retaining accession number, source URLs, section boundaries, units, periods, and original payloads.
生成干净文本和 Fact 记录,同时保留 Accession Number、来源 URL、章节边界、单位、期间和原始载荷。
Reject identity mismatches, malformed accessions, missing sources, duplicate versions, and facts with incompatible units or periods.
拒绝身份不匹配、Accession 格式错误、来源缺失、版本重复以及单位或期间不兼容的 Facts。
Return the answer, quoted or structured evidence, filing metadata, and a canonical link a reviewer can open.
输出答案、引用或结构化证据、Filing 元数据,以及审阅者可直接打开的规范链接。
Step-by-step: fetch the latest 10-K from EDGAR分步实现:从 EDGAR 获取最新 10-K
The SEC Submissions API is a good baseline because it forces the workflow to preserve first-party identifiers. Use a descriptive User-Agent with organization and contact information, cache responses, and stay below the SEC’s published fair-access ceiling.
SEC Submissions API 是很好的基线,因为它迫使工作流保留第一方标识。请使用包含组织与联系方式的可识别 User-Agent,缓存响应,并低于 SEC 公布的公平访问上限。
curl --compressed \
-H "User-Agent: ResearchAgent/1.0 contact@example.com" \
-H "Accept-Encoding: gzip, deflate" \
"https://data.sec.gov/submissions/CIK0000320193.json"import hashlib
import requests
from datetime import datetime, timezone
CIK = "0000320193"
HEADERS = {
"User-Agent": "ResearchAgent/1.0 contact@example.com",
"Accept-Encoding": "gzip, deflate",
}
submissions_url = f"https://data.sec.gov/submissions/CIK{CIK}.json"
data = requests.get(submissions_url, headers=HEADERS, timeout=30)
data.raise_for_status()
payload = data.json()
recent = payload["filings"]["recent"]
rows = [dict(zip(recent, values)) for values in zip(*recent.values())]
filing = next(row for row in rows if row["form"] == "10-K")
accession = filing["accessionNumber"]
accession_path = accession.replace("-", "")
cik_path = str(int(CIK))
primary = filing["primaryDocument"]
source_url = (
f"https://www.sec.gov/Archives/edgar/data/"
f"{cik_path}/{accession_path}/{primary}"
)
document = requests.get(source_url, headers=HEADERS, timeout=30)
document.raise_for_status()
evidence = {
"cik": CIK,
"accessionNumber": accession,
"form": filing["form"],
"filingDate": filing["filingDate"],
"reportDate": filing["reportDate"],
"primaryDocument": primary,
"sourceUrl": source_url,
"retrievedAt": datetime.now(timezone.utc).isoformat(),
"sha256": hashlib.sha256(document.content).hexdigest(),
}This example intentionally selects only the exact form 10-K. If your workflow should include amendments, model 10-K/A as a separate version and define how it affects earlier conclusions.
示例刻意只选择精确的 10-K。如果工作流需要包含修订文件,应将 10-K/A 建模为独立版本,并定义它如何影响此前结论。
Define an evidence contract before prompting the model在调用模型前先定义证据契约
| Field字段 | Why it matters为什么重要 |
|---|---|
cik | Stable SEC entity identity; never rely on ticker alone.稳定的 SEC 实体身份;不要只依赖 Ticker。 |
accessionNumber | Unique filing identity and the key to the EDGAR archive path.唯一 Filing 身份,也是构造 EDGAR Archive 路径的关键。 |
form / isAmendment | Prevents a 10-K/A or 10-Q/A from silently replacing the original.防止 10-K/A 或 10-Q/A 在无提示情况下覆盖原文件。 |
filingDate / reportDate | Separates publication timing from the financial period being reported.区分公开时间和财务报告所属期间。 |
sourceUrl / retrievedAt | Lets reviewers reproduce what the agent saw and when.让审阅者复现 Agent 在何时看到了什么。 |
sha256 | Detects content drift and supports immutable audit records.检测内容漂移,并支持不可变审计记录。 |
section / quoteRange | Links generated claims to exact narrative evidence.把生成结论绑定到精确的叙述性证据。 |
taxonomy / concept / unit / period | Makes an XBRL fact interpretable rather than just numeric.让 XBRL Fact 具备可解释性,而不只是一串数字。 |
Know which filing answers which question先明确不同 Filing 回答什么问题
Annual business, risk, audited financials, controls, and long-form narrative. Best for baseline company understanding.
年度业务、风险、审计财务数据、内部控制和长篇叙述,适合建立公司基线。
Quarterly updates, interim financials, changing risks, and management discussion. Best for period-over-period monitoring.
季度更新、中期财务、风险变化和管理层讨论,适合环比监控。
Material events. The item number and exhibits often matter more than generic full-document summarization.
重大事件。Item 编号和附件通常比泛化的全文摘要更重要。
Amended filings. Preserve both versions, calculate the difference, and re-run affected claims.
修订文件。保留两个版本、计算差异,并重新验证受影响结论。
Insider transactions. Parse transaction codes, ownership type, shares, prices, and footnotes.
内部人交易。需解析交易代码、持有类型、股份、价格和脚注。
Proxy statements covering governance, voting matters, ownership, and executive compensation context.
委托书,涵盖公司治理、投票事项、持股和高管薪酬背景。
Validation checklist before an agent can answerAgent 回答前的验证清单
- The CIK maps to the intended legal entity, not merely a matching ticker string.CIK 对应目标法定实体,而不只是匹配了 Ticker 字符串。
- The accession number has the expected format and resolves to a filing index or primary document.Accession Number 格式正确,并能解析到 Filing Index 或主文档。
- The form policy explicitly includes or excludes amendments.Form 策略明确包含或排除修订文件。
- Filing date, report date, acceptance time, and fiscal period are not conflated.提交日期、报告期、接收时间和财政期间没有混为一谈。
- Required exhibits were retrieved and linked to the parent filing.所需附件已经获取,并关联到父 Filing。
- XBRL facts agree on taxonomy, unit, duration or instant, dimensions, and period.XBRL Facts 的 Taxonomy、单位、时长或时点、维度和期间一致。
- Every generated claim has a source URL and exact evidence location.每条生成结论都有来源 URL 和精确证据位置。
- The stored hash and retrieval timestamp make the input reproducible.存储的哈希和抓取时间能让输入被复现。
Security, cost, and latency controls安全、成本与延迟控制
SEC currently asks automated users to make no more than 10 requests per second in total and may block excessive or unclassified bots. Treat that number as a ceiling, not a target. Use a shared rate limiter, descriptive User-Agent, cache, exponential backoff, jitter, and bulk archives for large backfills.
SEC 当前要求自动化用户总计不超过每秒 10 次请求,并可能阻止过量或无法识别的 Bot。应把这个数字当作上限而非目标。使用共享限流器、可识别 User-Agent、缓存、指数退避、抖动,并在大规模历史回补时使用 Bulk Archive。
Key document storage by accession number and URL. Revalidate metadata separately from the filing body.
以 Accession Number 和 URL 作为文档存储键;元数据与正文分别复核。
One user request should not trigger uncontrolled per-section or per-fact downloads.
一次用户请求不应触发不受控的逐章节或逐 Fact 下载。
Commercial provider tokens belong in a secret manager, never in browser code or prompts.
商业供应商 Token 应进入 Secret Manager,绝不能出现在浏览器代码或 Prompt 中。
Queue and validate documents first; let models consume a stable evidence store instead of live scraping.
先排队、采集并验证文档,再让模型消费稳定证据库,而不是实时抓取。
Common failure modes and fixes常见失败模式与修复方式
| Failure失败 | Why it happens原因 | Fix修复 |
|---|---|---|
| Wrong company公司错误 | Ticker-only identity or reused symbols仅按 Ticker 匹配或代码被复用 | Resolve and persist the CIK plus legal name解析并保存 CIK 与法定名称 |
| Missing filing history历史缺失 | Only the recent Submissions array was read只读取了 Submissions 的 recent 数组 | Follow additional history files or use bulk archives继续读取附加历史文件或 Bulk Archive |
| Duplicate conclusions结论重复 | Original and amended forms were merged原文件与修订文件被合并 | Version by accession and model amendments explicitly按 Accession 建版本并显式建模修订 |
| Incorrect financial fact财务 Fact 错误 | Unit, period, dimensions, or taxonomy ignored忽略单位、期间、维度或 Taxonomy | Validate the full XBRL context before comparison对比前验证完整 XBRL Context |
| Unverifiable summary摘要不可验证 | Chunks lost document metadata切块时丢失文档元数据 | Attach evidence fields to every chunk and generated claim给每个 Chunk 和生成结论附加证据字段 |
| 429 or blocked requests429 或请求被阻止 | Burst traffic, no identity, or inefficient crawling突发流量、无身份标识或低效爬取 | Throttle centrally, identify the client, cache, and back off集中限流、标识客户端、缓存并退避 |
News, transcripts, and prices are supporting layers—not filing APIs新闻、电话会与行情是辅助层,不是 Filing API
A news API explains market reaction. An earnings-call transcript adds management language. Price and volume data measure response. None of them replaces the filed document, accession number, amendment history, or SEC source URL. Retrieve the filing first, then join these datasets using issuer identity and event time.
新闻 API 用于解释市场反应,财报电话会文本补充管理层表达,价格与成交量用于衡量响应。但它们都不能替代已提交文件、Accession Number、修订历史或 SEC 来源 URL。应先获取 Filing,再按发行人身份和事件时间连接这些数据集。
QVeris implementation pattern: Discover → Inspect → CallQVeris 实现模式:Discover → Inspect → Call
In an agent system, QVeris can sit above provider-specific endpoints as a discovery and routing layer. The agent discovers candidate SEC tools, inspects the input schema and provider metadata, then calls the selected tool with bounded arguments. The returned evidence object should still name the underlying provider and retain the original SEC source.
在 Agent 系统中,QVeris 可以位于各供应商端点之上,承担发现与路由。Agent 先发现候选 SEC 工具,再检查输入 Schema 与供应商元数据,最后用受控参数调用所选工具。返回的证据对象仍应注明底层供应商,并保留原始 SEC 来源。
Search by capability: filing discovery, XBRL facts, section extraction, exhibits, or real-time alerts.
按能力搜索:Filing 发现、XBRL Facts、章节提取、附件或实时提醒。
Check required identifiers, date semantics, response schema, source fields, limits, and error behavior.
检查必需标识、日期语义、响应 Schema、来源字段、限额和错误行为。
Invoke the smallest sufficient query, validate the response, and write the result into the evidence contract.
调用满足需求的最小查询,验证响应,并把结果写入证据契约。
Frequently asked questions常见问题
Is the SEC EDGAR API free?SEC EDGAR API 免费吗?
Yes. data.sec.gov APIs require no API key. Automated access must still follow SEC fair-access guidance, identify the client, and avoid excessive traffic.
免费,data.sec.gov API 无需 API Key。但自动化访问仍须遵守 SEC 公平访问规范、标识客户端并避免过量流量。
Which SEC filing API is best for an AI agent?哪种 SEC Filing API 最适合 AI Agent?
There is no universal winner. EDGAR is best for first-party provenance, FMP for managed finance workflows, Finnhub for a broader provider stack, and sec-api.io for advanced filing-native search and extraction.
没有通用冠军。EDGAR 适合第一方溯源,FMP 适合托管金融工作流,Finnhub 适合更广的数据供应商栈,sec-api.io 适合高级 Filing 原生搜索与提取。
Can I use a ticker instead of a CIK?可以用 Ticker 代替 CIK 吗?
A provider may accept tickers for convenience, but production records should resolve and store the CIK because tickers can change or be reused.
供应商可能为了方便接受 Ticker,但生产记录应解析并保存 CIK,因为 Ticker 可能变更或被复用。
What should an SEC filing citation contain?SEC Filing 引用应包含什么?
At minimum: CIK, accession number, form, filing date, source URL, retrieval timestamp, and the exact section, exhibit, or XBRL fact used.
至少包含 CIK、Accession Number、Form、提交日期、来源 URL、抓取时间,以及所用章节、附件或 XBRL Fact。
How should amendments be handled?应如何处理修订文件?
Store forms such as 10-K/A and 10-Q/A as separate versions, compare them with the original, and re-evaluate only the claims affected by the change.
将 10-K/A、10-Q/A 等作为独立版本存储,与原文件比较,并重新评估受变更影响的结论。
Are XBRL facts enough?只使用 XBRL Facts 足够吗?
No. XBRL supports comparable facts, but narrative sections, footnotes, exhibits, policies, and event context still require filing documents.
不够。XBRL 适合可比 Facts,但叙述章节、脚注、附件、会计政策和事件背景仍需要 Filing 文档。
Do news and transcript APIs count as SEC filing APIs?新闻和电话会 API 算 SEC Filing API 吗?
No. They add context but cannot replace the primary filing or its source identifiers.
不算。它们能补充背景,但不能替代原始 Filing 及其来源标识。
Where does QVeris fit?QVeris 位于哪一层?
QVeris is an agent-facing tool discovery and routing layer. The selected SEC or commercial provider remains the source of record.
QVeris 是面向 Agent 的工具发现与路由层;被选中的 SEC 或商业供应商仍是记录源。
Official sources and next steps官方资料与下一步
Provider features and access rules can change. Verify current documentation, entitlements, and terms before production use.
供应商功能与访问规则可能变化。生产使用前,请核对最新文档、权限和条款。
Build the evidence layer before the answer layer先构建证据层,再构建答案层
Use QVeris to discover and inspect agent-ready tools, then keep the SEC filing, provider identity, and evidence contract visible throughout the workflow.
用 QVeris 发现并检查适合 Agent 的工具,并在整个工作流中持续保留 SEC Filing、供应商身份和证据契约。
Start with QVeris开始使用 QVeris