SEC Filings Lookup

from datamulehub import sec_filings_lookup

This is mostly a helper for other functions, but exposed to the user in case they find it useful.

SGML Lookup

Look up SEC filings in the SGML archive. Returns columns: accession, filingDate.

lookup_sgml(**args)

Yields one page at a time instead of returning everything at once.

stream_sgml(**args)

Tar Lookup

Look up SEC filings in the tar archive. Returns columns: accession, filingDate, start, end. start and end are byte ranges, which enable downloading specific files within filings.

lookup_tar(**args)

Yields one page at a time instead of returning everything at once.

stream_tar(**args)

Arguments are shared between lookups

Arguments:

Python accepts lists, tuples and sets for filters and matches them as multiple values. JavaScript accepts arrays for filters; date and time arrays represent ranges.

Example

from datamulehub import sec_filings_lookup

# get tar byte ranges for Apple 10-Ks and 10-Qs
results = sec_filings_lookup.lookup_tar(cik=320193, document_type=["10-K", "10-Q"])

# results is columnar: {"accession": [...], "filingDate": [...], "start": [...], "end": [...]}

# stream large result sets one page at a time
for page in sec_filings_lookup.stream_sgml(submission_type="10-K", filing_date=("2024-01-01", "2024-12-31")):
    print(page["accession"][:5])