john-friedman / datamule-python

A package to work with SEC data. Incorporates datamule endpoints.
MIT License
72 stars 7 forks source link

Adding a metadata.json output from downloader #13

Closed john-friedman closed 4 days ago

john-friedman commented 2 weeks ago

Add optional param to downloader that when set saves the efts call as a series of .json files, with a function on top such as downloader.get_metadata(input_dir, accession number) to return information such as reporting date, cik, etc for that filing.

e.g. metadata from https://efts.sec.gov/LATEST/search-index?forms=10-K&startdt=2024-09-13&enddt=2024-12-31

john-friedman commented 4 days ago

Thanks @anirudh for your help. Just pushed a metadata update which saves efts calls to metadata.jsonl.

downloader.download(form='10-K',output_dir='10-K',date=('2010-01-01','2010-01-31'),save_metadata=True)
downloader.load_metadata('10-K/')
downloader.save_metadata_to_csv('metadata.csv') # write metadata to csv