Home / Tutorials / Fetch & download
Fetch & download

Download SEC filings and exhibits from EDGAR

List every file in an SEC filing and download any document or exhibit, such as Exhibit 21 subsidiaries, with two API calls.

An EDGAR filing is a folder of files: the main document, exhibits, XBRL instance files, images and a full text submission. SecFeed gives you two endpoints to work with them:

  • /v1/files lists every file in a filing, with its size and URL.
  • /v1/download returns any EDGAR archive file as filed, through SecFeed, so you do not have to manage SEC rate limits or User-Agent rules yourself.

This tutorial downloads the subsidiaries exhibit (Exhibit 21) from Apple's fiscal 2025 10-K.

Step 1: find the filing

You need the CIK and the accession number. Get them from a filing search, for example cik:320193 AND filedAt:[2025-01-01 TO *], or from any accessionNo in an API response. Apple's fiscal 2025 10-K is 0000320193-25-000079.

Step 2: list the files and download one

import os
import requests

BASE = "https://secfeedapi.com"
HEADERS = {"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"}

# 1. List every file in Apple's fiscal 2025 10-K
files = requests.get(f"{BASE}/v1/files", params={"cik": 320193, "accessionNo": "0000320193-25-000079"},
                     headers=HEADERS, timeout=60).json()
print(len(files), "files")
for f in files:
    if "exhibit" in f["name"]:
        print(f["name"], f["size"])

# 2. Download the subsidiaries exhibit (Exhibit 21)
ex21 = next(f for f in files if "exhibit21" in f["name"])
doc = requests.get(f"{BASE}/v1/download", params={"url": ex21["url"]}, headers=HEADERS, timeout=60)
open("aapl-ex21.htm", "wb").write(doc.content)
print("saved", len(doc.content), "bytes,", doc.headers["Content-Type"])

Output:

93 files
a10-kexhibit21109272025.htm 11807
a10-kexhibit23109272025.htm 6251
a10-kexhibit31109272025.htm 10507
a10-kexhibit31209272025.htm 10543
a10-kexhibit32109272025.htm 8356
a10-kexhibit4109272025.htm 118590
saved 11925 bytes, text/html; charset=utf-8

The 10-K folder holds 93 files. Exhibit file names follow the filer's own convention, so match on a substring (exhibit21) or on the description from the filing index rather than an exact name.

Common exhibits

ExhibitContents
Ex 10Material contracts: credit agreements, employment agreements, leases
Ex 19Insider trading policy (required in 10-Ks since 2024)
Ex 21Subsidiaries of the registrant
Ex 23Auditor consent
Ex 31, 32CEO and CFO certifications
Ex 99Press releases, often attached to 8-Ks

Tips

  • /v1/download returns the original bytes with the original content type: HTML, XML, PDF, images or text.
  • For many filings at once, loop over a search result and call /v1/files per accession. Each call counts once against your quota.
  • If you only need the text of one section, skip the download and use the section extractor.
  • For subsidiaries as structured rows, the Subsidiaries API parses Exhibit 21 for you.

Next steps

More fetch & download tutorials

Run this tutorial with your own key

500 free API calls a month. Every example on this page works on the free plan.

Get free API key →