Download Filings
sec_download.RdDownload SEC filings based on Central Index Key (CIK) and document ID (as returned
from sec_search.
Usage
sec_download(ciks, out, ids = NULL, complete = FALSE,
user = Sys.getenv("SEC_USER"), verbose = TRUE)Arguments
- ciks
A vector of Central Index Keys, or a
data.framewith acikscolumn.- out
Path to a directory in which to save filings. Each filing will be saved within a subdirectory:
{out}/{cik}/{SEC Accession Number}.- ids
A vector of document IDs. These are combinations of SEC Accession Numbers and file names, separated by a colon (e.g.,
"0001564590-22-032043:gs-424b2.htm"). If the file name is not included, this will default to the complete submission text file (e.g.,"0001564590-22-032043.txt").- complete
Logical; if
TRUE, will download the complete submission text file rather than another files specified after a colon inids.- user
User agent string (e.g.,
"Company Name AdminContact@example.com"); defaults to theSEC_USERenvironment variable, which can be set withSys.setenv(e.g.,Sys.setenv(SEC_USER = "...")).- verbose
Logical; if
FALSE, will not show status updates.
See also
Search for filings with sec_search.
Examples
if (FALSE) {
# search for filings based on SIC
forms <- sec_search(SICs = 2080, forms = "10-K", limit = 100)
# download some of those filings
sec_download(forms[1:3, ], out = tempdir())
}