Skip to contents

Retrieve information about companies.

Usage

sec_companies(ciks, type = "submissions", out = tempdir(), load = TRUE,
  overwrite = FALSE, user = Sys.getenv("SEC_USER"), verbose = TRUE)

Arguments

ciks

A vector of Central Index Keys, or a data.frame with a ciks column.

type

Type of information to collect, between submissions, which includes things like Standard Industrial Classification, ticker, and previous names, as well as information about recent filings, and facts, including financial

out

Path to a directory in which to save filings. Each filing will be saved within a subdirectory: {out}/{cik}/{SEC Accession Number}.

load

Logical; if TRUE, will read in the downloaded info file.

overwrite

Logical; if TRUE, download the info file even if it already exists.

user

User agent string (e.g., "Company Name AdminContact@example.com"); defaults to the SEC_USER environment variable, which can be set with Sys.setenv (e.g., Sys.setenv(SEC_USER = "...")).

verbose

Logical; if FALSE, will not show status updates.

Value

An invisible list with named entries for each successful CIK if load is TRUE, or a vector of HTTP status codes otherwise.

See also

Search for filings with sec_search.

Examples

if (FALSE) {

# retrieve information about Pepsico
pepsi <- sec_companies("0000077476")
pepsi$`0000077476`[1:10]

# retrieve financial information about Pepsico
pepsi_facts <- sec_companies("0000077476", "facts")
pepsi_facts$`0000077476`$facts$`us-gaap`$Revenues
}