Search Every SEC Filing by Keyword With the Keyless EDGAR Full Text API

Search Every SEC Filing by Keyword With the Keyless EDGAR Full Text API

使用无需密钥的 EDGAR 全文 API 按关键词搜索所有 SEC 文件

If you have ever wanted to find every SEC filing that mentions a phrase, a person, or a legal term, EDGAR has a full text search index that covers every filing since 2001. It is a plain JSON API, no key and no login, and most people never touch it directly. 如果你曾经想查找所有提及某个短语、人物或法律术语的 SEC(美国证券交易委员会)文件,EDGAR 提供了一个涵盖自 2001 年以来所有文件的全文搜索索引。这是一个简单的 JSON API,无需密钥,无需登录,但大多数人从未直接使用过它。

The endpoint GET https://efts.sec.gov/LATEST/search-index?q=%22material+weakness%22&forms=10-K&startdt=2026-01-01&enddt=2026-06-30 接口地址为:GET https://efts.sec.gov/LATEST/search-index?q=%22material+weakness%22&forms=10-K&startdt=2026-01-01&enddt=2026-06-30

Parameters: q is the query. Wrap a phrase in double quotes for an exact match. forms is an optional comma list of form types, e.g. 8-K,10-K. startdt and enddt scope the filing date (with dateRange=custom). ciks restricts to one or more companies by CIK number. from is the paging offset. 参数说明:q 是查询内容,将短语放在双引号内可进行精确匹配。forms 是可选的表单类型列表(以逗号分隔),例如 8-K,10-K。startdt 和 enddt 用于限定文件日期范围(需配合 dateRange=custom)。ciks 可通过 CIK 编号限制搜索一家或多家公司。from 是分页偏移量。

EDGAR asks for a descriptive User-Agent with contact info. Send one and you are fine: EDGAR 要求提供包含联系信息的描述性 User-Agent。发送一个即可正常使用:

const res = await fetch(url, {
  headers: {
    Accept: 'application/json',
    'User-Agent': 'YourApp contact@example.com',
  },
});

The response shape Results come back Elasticsearch style under hits.hits. Each hit has an _id and a _source: 响应格式:结果以 Elasticsearch 风格返回在 hits.hits 下。每个命中结果都有一个 _id 和一个 _source:

{
  "_id": "0001493152-26-015257:form10-ka.htm",
  "_source": {
    "display_names": ["Where Food Comes From, Inc. (WFCF) (CIK 0001360565)"],
    "ciks": ["0001360565"],
    "form": "10-K/A",
    "file_date": "2026-04-06",
    "adsh": "0001493152-26-015257"
  }
}

Two useful tricks: The display_names string packs the company, ticker, and CIK together. A small regex pulls them apart: 两个实用技巧:display_names 字符串将公司名称、股票代码和 CIK 打包在一起。可以使用简单的正则表达式将其拆分:

const m = name.match(/^(.*?)\s*\(([^)]+)\)\s*\(CIK\s*\d+\)\s*$/);
const companyName = m ? m[1].trim() : name;
const ticker = m ? m[2].trim() : null;

The _id is accession:filename, and adsh is the accession number. Combine them into a direct link to the document: _id 的格式为 accession:filename,而 adsh 是存取编号。将它们组合起来即可生成文档的直接链接:

const filename = id.slice(id.indexOf(':') + 1);
const nodash = adsh.replace(/-/g, '');
const cik = String(Number(ciks[0])); // strip leading zeros
const url = `https://www.sec.gov/Archives/edgar/data/${cik}/${nodash}/${filename}`;

Paging: Each request returns up to 100 hits. Advance from in steps of 100 until you have what you need. EDGAR caps deep paging at a 10,000 result window per query, so read the reported hits.total.value and stop there. 分页:每次请求最多返回 100 条结果。以 100 为步长增加 from 参数,直到获取所需内容。EDGAR 对深度分页的限制是每个查询最多 10,000 条结果,因此请读取 hits.total.value 并在此处停止。

let from = 0;
while (from < 10000) {
  const data = await getJson(buildUrl(from));
  const hits = data.hits.hits;
  if (hits.length === 0) break;
  // ...process hits...
  if (hits.length < 100) break;
  from += 100;
}

Why it is handy: Full text search across every filer is a different job from watching one company or one form. You can catch risk language like “going concern” or “material weakness” wherever it lands, follow an executive across filers, or track a product mention over time. And because it is a light JSON GET, a run costs almost nothing. 为什么它很有用:对所有申报者进行全文搜索,与监控单一公司或单一表单是完全不同的任务。你可以捕捉到诸如“持续经营”(going concern)或“重大缺陷”(material weakness)之类的风险措辞,追踪高管在不同申报文件中的动向,或随时间推移跟踪产品的提及情况。而且由于它是一个轻量级的 JSON GET 请求,运行成本几乎为零。

If you want this packaged instead of maintained by hand, I run it as a keyless pay per use actor on Apify. Give it a query and it returns one JSON row per filing with a direct link. The first rows of every run are free so you can check the output. 如果你希望将其封装而不是手动维护,我在 Apify 上将其作为一个无需密钥、按使用付费的 Actor 运行。只需输入查询,它就会为每份文件返回一行包含直接链接的 JSON 数据。每次运行的前几行是免费的,方便你检查输出结果。

https://apify.com/scrapemint/sec-filing-fulltext-scraper