Learn R Programming

edgarfundamentals (version 0.1.2)

get_cik: Look up a company's SEC Central Index Key from its ticker symbol

Description

Translates a stock ticker symbol into the corresponding SEC EDGAR Central Index Key (CIK). The CIK is a unique numerical identifier assigned by the SEC to every company that files with EDGAR. It is required for all subsequent EDGAR API calls.

Usage

get_cik(symbol)

Value

A character string containing the CIK number (without zero-padding).

Arguments

symbol

A character string containing the stock ticker symbol (e.g. "AAPL"). Case-insensitive.

Details

Data is retrieved from https://www.sec.gov/files/company_tickers.json, a publicly maintained mapping file updated by the SEC. No API key is required.

The SEC requests that automated tools identify themselves via a User-Agent header. Set your identifier once per session with: options(edgarfundamentals.user_agent = "Your Name your@email.com")

Examples

Run this code
if (FALSE) {
options(edgarfundamentals.user_agent = "Jane Smith jane@example.com")
get_cik("AAPL")
get_cik("LLY")
}

Run the code above in your browser using DataLab