Back to Blog

sec.gov/Archives/edgar/data URL Structure: CIK, Accession Number & Document Filenames

Every SEC filing document lives at a predictable URL under sec.gov/Archives/edgar/data. Here is exactly how to construct that URL from a CIK, an accession number, and a primary document filename, with worked examples verified against live EDGAR.

The URL Pattern

Every filing document in EDGAR is served from this template:

https://www.sec.gov/Archives/edgar/data/{CIK}/{ACCESSION_NUMBER_NO_DASHES}/{PRIMARY_DOCUMENT}

Three pieces, three rules:

Where the Pieces Come From

The company's filing history lives at https://data.sec.gov/submissions/CIK##########.json, where the CIK is zero-padded to 10 digits (the opposite of the Archives rule). Inside filings.recent you get parallel arrays; index i across accessionNumber, form, filingDate, and primaryDocument describes one filing:

{
  "cik": "0000320193",
  "name": "Apple Inc.",
  "filings": {
    "recent": {
      "accessionNumber": ["0000320193-25-000079", ...],
      "form":            ["10-K", ...],
      "filingDate":      ["2025-10-31", ...],
      "primaryDocument": ["aapl-20250927.htm", ...]
    }
  }
}

See the full field-by-field breakdown in our data.sec.gov/submissions JSON structure guide.

Worked Example: Apple's FY2025 10-K

From the submissions JSON above:

  1. CIK 0000320193 → strip leading zeros → 320193
  2. Accession number 0000320193-25-000079 → strip dashes → 000032019325000079
  3. primaryDocument → aapl-20250927.htm

Assemble:

https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm

That URL returns the full 10-K HTML document (HTTP 200, verified). The same folder also serves supporting files: exhibits, XBRL instance documents, and images referenced by the primary document.

Listing a Filing's Files: index.json

To enumerate everything inside a filing folder, request index.json:

https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/index.json

The response is a directory object whose item array lists each file:

{
  "directory": {
    "item": [
      {"last-modified": "2025-10-31 06:01:26", "name": "0000320193-25-000079-index.html", "type": "text.gif", "size": ""},
      {"last-modified": "2025-10-31 06:01:26", "name": "0000320193-25-000079.txt", "type": "text.gif", "size": ""},
      {"last-modified": "2025-10-31 06:01:26", "name": "a10-kexhibit21109272025.htm", "type": "text.gif", "size": "11807"},
      ...
    ]
  }
}

Useful entries in every folder:

curl and Python Examples

curl

# SEC requires a declared User-Agent with contact info on every request
curl -A "YourName [email protected]" \
  "https://data.sec.gov/submissions/CIK0000320193.json" -o aapl.json

curl -A "YourName [email protected]" \
  "https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm" \
  -o aapl-10k.htm

Python: build the URL for the latest 10-K

import requests

HEADERS = {'User-Agent': 'YourName [email protected]'}

def latest_filing_url(cik, form_type='10-K'):
    padded = str(int(cik)).zfill(10)          # 10 digits for data.sec.gov
    subs = requests.get(
        f'https://data.sec.gov/submissions/CIK{padded}.json',
        headers=HEADERS
    ).json()

    recent = subs['filings']['recent']
    for i, form in enumerate(recent['form']):
        if form == form_type:
            accession = recent['accessionNumber'][i].replace('-', '')
            doc = recent['primaryDocument'][i]
            cik_short = str(int(cik))          # no leading zeros for Archives
            return (f'https://www.sec.gov/Archives/edgar/data/'
                    f'{cik_short}/{accession}/{doc}')
    return None

print(latest_filing_url('0000320193'))
# https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm

Common Gotchas

FAQ

How do I build a sec.gov/Archives/edgar/data URL?

Use https://www.sec.gov/Archives/edgar/data/{CIK}/{ACCESSION_NO_DASHES}/{PRIMARY_DOCUMENT}. The CIK has no leading zeros, the accession number has its dashes removed, and the primaryDocument filename comes from the submissions API.

Do I keep the leading zeros in the CIK for Archives URLs?

No. Archives paths use the CIK without leading zeros (320193 for Apple). Only data.sec.gov API filenames require the 10-digit zero-padded form.

How do I list all files inside a filing folder?

Append index.json to the filing folder URL. The response contains a directory.item array with every filename, last-modified timestamp, and size.

What User-Agent does the SEC require?

A User-Agent header identifying you with contact info, e.g. "CompanyName [email protected]". Requests without one return 403. Keep traffic under roughly 10 requests per second.

Related Guides