The SEC EDGAR Python Client simplifies the process of accessing institutional holdings, SEC filings, and data on over 10,000 public companies. With a clean and Pythonic interface, it allows users to easily integrate financial data into their applications using a straightforward installation and a dedicated API call structure.
The SEC EDGAR Python Client is a comprehensive tool designed to simplify the interaction with the SEC EDGAR Financial Data API. This Python library provides a user-friendly wrapper that enables users to efficiently query institutional holdings, explore SEC filings, and access data from over 10,000 public companies.
Key Features
- Query Institutional Holdings: Retrieve the latest 13F portfolio holdings for any institutional investor.
- Search Public Companies: Utilize company name or ticker symbols to find detailed profiles and recent SEC filings.
- Explore SEC Filings: Perform searches across all SEC filings, ensuring access to pertinent financial information.
Getting Started
To begin using the SEC EDGAR Python Client, you first need to subscribe to the RapidAPI service and acquire your free API key.
Quick Start Example
Here’s how to get started with a simple example:
from edgar_client import EdgarAPI
with EdgarAPI(api_key="YOUR_RAPIDAPI_KEY") as api:
portfolio = api.holdings(EdgarAPI.BERKSHIRE)
print(f"{portfolio.company_name} — {portfolio.report_date}")
print(f"Total AUM: ${portfolio.total_value_billions:.1f}B\n")
for h in portfolio.top(5):
print(f" {h.name_of_issuer:<35} ${h.value_millions:>10,.1f}M")
Example Output
BERKSHIRE HATHAWAY INC — 2024-09-30
Total AUM: $266.4B
APPLE INC $69,900.0M
AMERICAN EXPRESS CO $41,100.0M
BANK OF AMERICA CORP $31,700.0M
COCA-COLA CO $28,700.0M
CHEVRON CORP NEW $17,500.0M
Built-in CIK Constants
The library comes pre-loaded with common institutional investor CIK constants, allowing for quick and easy access:
EdgarAPI.BERKSHIRE # 1067983 — Berkshire Hathaway
EdgarAPI.BRIDGEWATER # 1350694 — Bridgewater Associates
EdgarAPI.CITADEL # 1423053 — Citadel Advisors
EdgarAPI.RENAISSANCE # 1037389 — Renaissance Technologies
EdgarAPI.VANGUARD # 102909 — Vanguard Group
EdgarAPI.BLACKROCK # 1364742 — BlackRock Inc.
Capabilities
- Holdings Retrieval: Access the latest 13F holdings and parse through detailed portfolio information with a simple function call.
- Company Search: Implement searches for companies using relevant keywords or identifiers effortlessly.
- Recent Filings: Access recent filings for specific companies, providing insights into the latest corporate activities.
Example Usage for Searching Companies
results = api.search_companies("Tesla", limit=5)
for c in results:
print(c.cik, c.ticker, c.name)
# 1318605 TSLA Tesla, Inc.
Data Source
Data is sourced from official SEC EDGAR public filings and is served through a robust REST API, ensuring that the information remains accurate and up-to-date.
No comments yet.
Sign in to be the first to comment.