Filings submitted to the U.S. Securities and Exchange Commission (SEC) are a key source of information about public companies. Analyzing this data can reveal patterns in corporate behavior and market trends, but the sheer volume of filings makes manual review difficult.
This guide shows how to use the FinFeedAPI to programmatically access and analyze SEC filing data. We will cover methods for looking at broad trends using filing metadata and then show how to get specific information from within the documents themselves.
This guide covers:
- Fetching filing metadata based on criteria like form type and date.
- Analyzing filing frequency over time and the distribution of different event items.
- Extracting the structured content from a specific filing.
- Searching for keywords inside the full text of documents.
What you need:
- Python 3.x with
pandasandmatplotlib. - The
api-bricks-sec-api-restlibrary. - Your personal
Most Common 8-K Items
We can also analyze the items field to see which types of corporate events were most frequently reported.
CODEif not filings_df.empty and 'items' in filings_df.columns:
all_items = filings_df['items'].str.split(',').explode()
item_counts = all_items.value_counts()
item_counts.plot(kind='bar', color='skyblue', edgecolor='black')
plt.title('Distribution of Items in 8-K Filings')
plt.xlabel('Item Number')
plt.ylabel('Number of Occurrences')
plt.xticks(rotation=45, ha='right')
plt.show()
4. Performing a Full-Text Search
For topic-based discovery, the/v1/full-textendpoint allows you to search for keywords within the documents. This is a good way to find filings related to a specific theme that is not captured in the metadata.
For example, let's find 10-K filings from 2025 that mention "artificial intelligence."
CODEprint("\nPerforming full-text search...")
full_text_api = api_bricks_sec_api_rest.FullTextSearchApi(api_client)
try:
search_results = full_text_api.v1_full_text_get(
form_type="10-K",
filling_date_start="2025-01-01",
filling_date_end="2025-12-31",
text_contains="artificial intelligence",
page_size=10
)
if search_results:
search_df = pd.DataFrame.from_records([vars(x) for x in search_results])
print("Full-Text Search Results Sample:")
print(search_df[['company_name', 'filing_date']].head())
except api_bricks_sec_api_rest.ApiException as e:
print(f"Exception during full-text search: {e}")
Final Thoughts
This guide showed several methods for working with SEC filing data using the FinFeedAPI. You can begin with broad, metadata-based analysis to identify trends and then use the extractor and full-text search endpoints to get more specific information. This workflow lets you move from a high-level view of filing activity to a detailed look at the content inside the documents.
From here, you could build more advanced applications, such as applying natural language processing (NLP) to extracted text or correlating filing data with market prices.
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
SOCIAL SHARE CARD GENERATOR