You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Datasets class, DownloadApi, and bulk dataset download/sync support
- Add Datasets class with get_all(), get_dataset_details(), show_all(),
show_dataset_details(), download(), and sync() methods
- Downloads are atomic (.tmp + rename) with incremental sync support —
only new or updated containers are re-downloaded based on file size
- Helpful error on misspelled dataset names listing all available datasets
- Add DownloadApi class (alias for RenderApi, backward compatible)
- Update filing download endpoint to edgar-mirror.sec-api.io
- Add Quick Start section, Bulk Datasets docs with download/sync examples
- Add tests for Datasets, DownloadApi (42 tests total)
Copy file name to clipboardExpand all lines: README.md
+177-4Lines changed: 177 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -499,9 +499,9 @@ Variants such as `ConsolidatedStatementsofOperations` or `ConsolidatedStatements
499
499
There are 3 ways to convert XBRL to JSON:
500
500
501
501
-`htm_url`: Provide the URL of the filing ending with `.htm`.
502
-
Example URL: https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231.htm
502
+
Example URL: [sec.gov/.../tsla-10k_20201231.htm](https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231.htm)
503
503
-`xbrl_url`: Provide the URL of the XBRL file ending with `.xml`. The XBRL file URL can be found in the `dataFiles` array returned by our query API. The array item has the description `EXTRACTED XBRL INSTANCE DOCUMENT` or similar.
504
-
Example URL: https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231_htm.xml
504
+
Example URL: [sec.gov/.../tsla-10k_20201231_htm.xml](https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231_htm.xml)
505
505
-`accession_no`: Provide the accession number of the filing, e.g. `0001564590-21-004599`
506
506
507
507
```python
@@ -775,14 +775,187 @@ Download complete datasets for offline analysis and large-scale processing. All
775
775
| Form 10-Q - Quarterly Reports | 10-Q, 10-Q/A | 1993-present | ZIP (HTML, TXT) |
776
776
| Form 8-K Exhibit 99 - Press Releases | 8-K, 8-K/A | 1994-present | ZIP (HTML, TXT, PDF) |
| Form N-PORT - Fund Holdings | NPORT, NPORT/A | 2019-present | JSONL |
783
781
| Form DEF 14A - Proxy Statements | DEF 14A | 1994-present | ZIP (HTML, TXT) |
784
782
|[View all datasets...](https://sec-api.io/datasets)||||
785
783
784
+
### Download a Dataset
785
+
786
+
Downloads are atomic (written to a `.tmp` file first, renamed on completion), so interrupted downloads are automatically resumed on the next run. Only new or updated files are downloaded — existing files are skipped if their size matches the remote. This makes it easy to keep a local copy of any dataset in sync with a single line of code.
787
+
788
+
```python
789
+
from sec_api import Datasets
790
+
791
+
datasets = Datasets(api_key="YOUR_API_KEY")
792
+
793
+
# first run: downloads all containers to ./sec-api-datasets/form-10k-content/
794
+
datasets.download("form-10k-content")
795
+
796
+
# subsequent runs: only downloads new or updated containers, skips the rest
Or use `show_dataset_details()` for formatted terminal output:
942
+
943
+
```python
944
+
datasets.show_dataset_details("form-10k-content")
945
+
```
946
+
947
+
```
948
+
Name: Form 10-K - Annual Reports - Filing Contents
949
+
Description: HTML and TXT files of all Form 10-K filings published since 1993...
950
+
Updated: 2026-04-09T07:07:57.058Z
951
+
Earliest data: 1993-10-01
952
+
Form types: 10-K, 10-K/A, 10-K405, 10-K405/A, 10-KSB, 10-KSB/A, 10-KT, 10-KT/A
953
+
Format: ZIP
954
+
Total records: 303,021
955
+
Total size: 33.8 GB
956
+
Containers: 390
957
+
```
958
+
786
959
## Form ADV API
787
960
788
961
Search and access Form ADV data for registered investment advisers, including firm information, individual advisors, direct/indirect owners, private fund data, and brochures.
0 commit comments