Home / Developers / Filing & Exhibit Download API
API reference

Filing & Exhibit Download API

List every file inside a filing, then fetch any of them exactly as filed: HTML, text, XML, XBRL, PDF exhibits or images. Use it after a search to pull the documents you need without scraping sec.gov yourself. Product overview →

Endpoints

/v1/files

GEThttps://secfeedapi.com/v1/files

Every file in a filing: documents, exhibits, XBRL, images.

ParameterTypeDescriptionExample
cikrequiredintegerFiler CIK.320193
accessionNorequiredstringAccession number, with or without dashes.0000320193-26-000020
  • Returns a JSON array, one object per file in the filing folder, including index pages, the full submission .txt and the XBRL zip.
  • type is the icon name sec.gov shows for the file (text.gif, compressed.gif), not a document type such as EX-99.1.
  • size is in bytes as a string, empty for generated index files.

/v1/download

GEThttps://secfeedapi.com/v1/download

Any EDGAR archive file as filed.

ParameterTypeDescriptionExample
urlrequiredstringAny file under https://www.sec.gov/Archives/edgar/data/. Inline XBRL viewer links (/ix?doc=) are accepted and unwrapped.https://www.sec.gov/Archives/edgar/data/320193/000032019326000020/0000320193-26-000020-index.htm
  • Returns the raw file bytes with a Content-Type guessed from the extension (text/html, application/xml, application/pdf...).
  • Files are fetched live from EDGAR every time and not cached, so large files take as long as sec.gov does.

Request examples

Every response below is real output from the API, trimmed to the first records.

List the files in a 10-Q

Every document, exhibit and XBRL file in Apple's 10-Q with its size and direct URL.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=320193&accessionNo=0000320193-26-000020"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/files",
    params={'cik': '320193', 'accessionNo': '0000320193-26-000020'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
[
  {
    "name": "0000320193-26-000020-index-headers.html",
    "type": "text.gif",
    "size": "",
    "url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000020/0000320193-26-000020-index-headers.html"
  },
  {
    "name": "0000320193-26-000020-index.html",
    "type": "text.gif",
    "size": "",
    "url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000020/0000320193-26-000020-index.html"
  }
]

List the files in a Form 4

Insider filings are small: the index pages, the full text submission and one XML file.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=1045810&accessionNo=0001197647-26-000011"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/files",
    params={'cik': '1045810', 'accessionNo': '0001197647-26-000011'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
[
  {
    "name": "0001197647-26-000011-index-headers.html",
    "type": "text.gif",
    "size": "",
    "url": "https://www.sec.gov/Archives/edgar/data/1045810/000119764726000011/0001197647-26-000011-index-headers.html"
  },
  {
    "name": "0001197647-26-000011-index.html",
    "type": "text.gif",
    "size": "",
    "url": "https://www.sec.gov/Archives/edgar/data/1045810/000119764726000011/0001197647-26-000011-index.html"
  }
]

Download a filing index page

Returns the HTML exactly as sec.gov serves it. Pass any URL from /v1/files the same way.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/download?url=https://www.sec.gov/Archives/edgar/data/1045810/000119764726000011/0001197647-26-000011-index.htm"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/download",
    params={'url': 'https://www.sec.gov/Archives/edgar/data/1045810/000119764726000011/0001197647-26-000011-index.htm'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())

Response fields

FieldTypeMeaning
[]array/v1/files returns a bare array, one entry per file.
[].namestringFile name inside the filing folder.
[].typestringIcon name from the sec.gov folder listing, for example text.gif or compressed.gif.
[].sizestringSize in bytes, empty for generated index files.
[].urlstringDirect URL; pass it to /v1/download or /v1/pdf.

How to

How do I find the primary document of a filing?

List the files and take the largest .htm that is not an index page. Exhibit names usually contain ex or exhibit.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=320193&accessionNo=0000320193-26-000020"
How do I get the XML of a Form 4?

List the files and download the one ending in .xml.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=1045810&accessionNo=0001197647-26-000011"
How do I download the full submission as one text file?

Every filing has <accession>.txt with all documents concatenated. Use linkToTxt from the filing search, or the .txt entry in /v1/files.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/download?url=https://www.sec.gov/Archives/edgar/data/1045810/000119764726000011/0001197647-26-000011-index.htm"
How do I get the XBRL files of a 10-Q?

The listing includes the -xbrl.zip archive and the extracted instance and schema files; download them by URL.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=320193&accessionNo=0000320193-26-000020"
Can I pass an inline XBRL viewer link?

Yes. URLs of the form https://www.sec.gov/ix?doc=/Archives/... are unwrapped to the archive file before download.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/download?url=https://www.sec.gov/Archives/edgar/data/320193/000032019326000020/0000320193-26-000020-index.htm"
Do I need dashes in the accession number?

No. Both 0000320193-26-000020 and 000032019326000020 work.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=320193&accessionNo=000032019326000020"
How do I get a filing as a PDF instead?

Use /v1/pdf with the same URL; it renders HTML documents to PDF.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/files?cik=1045810&accessionNo=0001197647-26-000011"
Where do I get the cik and accession number?

Every row of /v1/filings has both. Search first, then list the files.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/filings?query=accessionNo:0000320193-26-000020"

Errors

  • 400 when cik or accessionNo is missing on /v1/files.
  • 400 when url is not under https://www.sec.gov/Archives/edgar/data/.
  • 502 when EDGAR does not have the file or is unreachable.

See also the error codes every endpoint shares.

Try it with your own key

Free key, no card needed.

Get free API key →