% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_filing_history.R
\name{get_filing_history}
\alias{get_filing_history}
\title{Retrieve recent SEC filing history for a company}
\usage{
get_filing_history(symbol, form_type = "10-K", n = 5)
}
\arguments{
\item{symbol}{A character string containing the stock ticker symbol
(e.g. \code{"AAPL"}). Case-insensitive.}

\item{form_type}{A character string specifying the SEC form type to
retrieve. Common values are \code{"10-K"} (annual report),
\code{"10-Q"} (quarterly report), and \code{"8-K"} (current report).
Defaults to \code{"10-K"}.}

\item{n}{An integer specifying the maximum number of filings to return.
Defaults to \code{5}.}
}
\value{
A data frame with one row per filing and the following columns:
\describe{
  \item{symbol}{The ticker symbol passed to the function.}
  \item{accession_number}{The SEC accession number uniquely identifying
    the filing (e.g. \code{"0000320193-24-000123"}).}
  \item{filing_date}{The date the filing was submitted to EDGAR.}
  \item{report_date}{The period-end date covered by the filing.}
  \item{form}{The form type as recorded in EDGAR.}
  \item{primary_document}{The filename of the primary HTML document within
    the filing.}
}
}
\description{
Returns a data frame listing the most recent EDGAR filings of a specified
form type for a given company. Useful for verifying that a company has
filed the expected number of 10-K or 10-Q reports, or for retrieving
accession numbers needed to access specific filings.
}
\details{
Data is retrieved from the SEC EDGAR submissions API
(\url{https://data.sec.gov/submissions/}). The API returns up to the 1,000
most recent filings across all form types; older filings may not appear.

Set your User-Agent once per session:
\code{options(edgarfundamentals.user_agent = "Your Name your@email.com")}
}
\examples{
\dontrun{
options(edgarfundamentals.user_agent = "Jane Smith jane@example.com")

# Five most recent annual reports for Lockheed Martin
get_filing_history("LMT", form_type = "10-K", n = 5)

# Most recent quarterly reports for Eli Lilly
get_filing_history("LLY", form_type = "10-Q", n = 4)
}

}
