get_company_facts#
- EdgarAPI.get_company_facts(ticker=None, central_index_key=None)[source]#
Get all company facts.
Retrieve all XBRL disclosures for a company in a single request.
- Parameters:
ticker (str, optional) – The ticker symbol of the company. If provided, the CIK will be derived from the ticker.
central_index_key (str, optional) – 10-digit Central Index Key (CIK) of the entity, including leading zeros. A CIK may be obtained at the SEC’s CIK lookup: https://www.sec.gov/search-filings/cik-lookup
- Returns:
An object containing all facts and disclosures for the company, organized by taxonomy and concept.
- Return type:
CompanyFact
- Raises:
ValueError – If the request fails or the response is not valid JSON format.
Example
>>> import edgar_sec as ed >>> api = ed.EdgarAPI() >>> facts = api.get_company_facts("AAPL") >>> revenue = facts.facts["us-gaap"].disclosures.get("RevenueFromContractWithCustomerExcludingAssessedTax") >>> if revenue and "USD" in revenue.units: >>> print(f"Latest revenue: ${revenue.units['USD'][0].val}")
Note
This is the most comprehensive endpoint, returning all concepts across all taxonomies for a company. The response can be quite large for companies with extensive filing histories.