Claude Financial Analysis: Analyze SEC Filings with Apify (2026)
Automate 10-K and 10-Q analysis by scraping SEC EDGAR with Apify, cleaning the filing text, and passing it to Claude for revenue trends, risk factors, and management commentary. Output structured insights to Apify Datasets or Google Sheets. With current Claude models offering a 1M-token context window, a full annual filing fits in a single request, so you rarely need to chunk. If you want to test the analysis side before wiring up a pipeline, you can try Claude free for a week and paste a filing in directly. Start with Apify.
Use Case: Investor Research at Scale
Manual analyst research on one 10-K takes hours. An automated pipeline can process dozens of filings per day. Use cases: retail investor tools, hedge fund research, earnings call prep, and compliance monitoring. The bottleneck is extraction and structure. Apify handles scraping, Claude handles analysis. Retail investors can screen hundreds of companies for risk factors. Hedge funds can ingest new filings as they drop and surface material changes. Earnings call prep becomes faster when MD&A and risk sections are pre-summarized. Compliance teams can flag unusual language or missing disclosures automatically.
Step 1: Scrape SEC EDGAR with Apify
SEC filings live on EDGAR. Use the Website Content Crawler or a custom crawler. Input: filing URL (e.g. https://www.sec.gov/Archives/edgar/data/.../...htm). Set crawlerType: "cheerio" for speed. Limit maxCrawlPages to the filing plus index if needed.
For bulk runs, build a list of CIKs and filing URLs from the EDGAR full-text search or index. Store URLs in an Apify Dataset and run the crawler in a loop or via a scheduled task. EDGAR allows reasonable access; stay under 10 requests per second and set a descriptive User-Agent (SEC asks bots to identify themselves with contact info). Use the SEC's RSS feeds or bulk download files to discover new filings without hammering the index. Some Apify Actors in the Store target EDGAR specifically, so search for "SEC" or "EDGAR" to compare.
Step 2: Clean and Structure the Filing
Raw EDGAR HTML is noisy. Strip tags, remove XBRL, and keep prose. Extract sections by heading (Item 1, 1A, 7, 7A). A simple regex or BeautifulSoup pass works. For markdown output, use the crawler's markdown option and split by ##-style headings. Keep metadata: company, fiscal period, form type. Some filers use inline XBRL; strip those tags to avoid feeding the model machine-readable markup. Preserve table structure when it carries financial data (e.g. segment breakdowns). Normalize whitespace and remove duplicate section headers that appear in both HTML and text versions.
Step 3: Claude API with Financial Analysis Prompt
Pass cleaned sections to Claude. Example prompt structure:
Analyze this 10-K excerpt. Provide:
1. Revenue trend (last 3 years, YoY%)
2. Top 3 risk factors
3. Management's key forward-looking statements
4. Red flags (if any)
Format as JSON.
Use Claude Sonnet 4.6 (claude-sonnet-4-6) for the best balance of cost and quality, or Claude Opus 4.7 (claude-opus-4-7) when you want the strongest reasoning on dense MD&A and footnotes. Both offer a 1M-token context window, so an entire 10-K (typically well under 1M tokens) fits in one request and you do not need to chunk a single filing. Claude returns structured JSON you can validate and store. Define a strict schema (e.g. Pydantic) so downstream systems can parse reliably. Add a "confidence" or "completeness" field if sections are missing. For earnings call prep, also scrape the earnings transcript and pass it alongside the 10-K excerpt for cross-referencing.
Step 4: Store to Dataset, Export to Sheets
Push Claude's output to an Apify Dataset with client.dataset(run_id).push_items(). Use Apify Google Sheets integration or a webhook to a Make.com scenario that writes to Sheets. See the webhooks guide for event-driven flows.
Key Sections to Extract
Focus on these 10-K/10-Q sections for analysis: Item 1 (Business) for company overview, Item 1A (Risk Factors) for risk assessment, Item 7 (MD&A) for management commentary and trends, Item 7A (Quantitative and Qualitative Disclosures) for market risk. Item 8 (Financial Statements) is tabular, so it is often better handled by parsing the XBRL or a dedicated financial data provider. Extract these by regex or by matching standard SEC heading text. Different filers use slightly different formats; normalize before passing to Claude.
Complete Python Example
from apify_client import ApifyClient
from anthropic import Anthropic
import re
client = ApifyClient(token="apify_api_YOUR_TOKEN")
anthropic = Anthropic()
# Step 1: Scrape filing
actor = client.actor("apify/website-content-crawler")
run = actor.call(run_input={
"startUrls": [{"url": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000106/aapl-20240928.htm"}],
"maxCrawlPages": 1,
"crawlerType": "cheerio"
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
text = items[0].get("text", "")
# Step 2: Extract Item 7 (MD&A) - simplified
# With a 1M-token context window you can pass the whole filing,
# but isolating the section you care about cuts cost and sharpens the answer.
mda_match = re.search(r"Item 7[.\s]*Management's Discussion(.*?)(?=Item 8|$)", text, re.DOTALL | re.I)
mda = mda_match.group(1) if mda_match else text
# Step 3: Claude analysis
response = anthropic.messages.create(
model="claude-sonnet-4-6",
max_tokens=2048,
messages=[{
"role": "user",
"content": f"Analyze this 10-K MD&A section. JSON: revenue_trend, top_risks (list), key_forward_statements, red_flags.\n\n{mda}"
}]
)
analysis = response.content[0].text
# Step 4: Store to dataset
dataset = client.dataset(run["defaultDatasetId"])
client.dataset(run["defaultDatasetId"]).push_items([{"analysis": analysis, "source": "claude"}])
Rate Limits and Cost
- Apify: Compute units scale with crawl depth. One 10-K page: ~0.01–0.05 USD. Bulk runs: use schedules and check pricing.
- Claude API: Claude Sonnet 4.6 runs $3 per million input tokens and $15 per million output. A 50K-token filing plus 2K output is roughly $0.18 per filing. Claude Haiku 4.5 ($1/$5) is cheaper for first-pass screening; reserve Opus 4.7 ($5/$25) for the deepest reads. Use the Batch API for large jobs to cut input cost further.
- EDGAR: Respect SEC fair access. Use reasonable rate limits (10 req/sec max).
Manual vs Automated: Comparison
| Manual analyst | Automated (Apify + Claude) | |
|---|---|---|
| Time per 10-K | 2–4 hours | 2–5 minutes |
| Coverage | Few companies | Hundreds per day |
| Consistency | Varies by analyst | Same schema every time |
| Cost (labor) | High | Compute + API only |
| Best for | Deep due diligence, nuance | Screening, trend monitoring, alerts |
Automation excels at screening and trend work. Manual review still matters for high-stakes decisions. Use this workflow to narrow the field, then have analysts focus on the shortlist. Combine with Claude real-time web access for interactive deep dives: ask Claude to pull a specific filing and analyze it on demand. For batch processing, the API pipeline above is more efficient. Choose based on whether your workflow is ad-hoc or scheduled.
Wire Apify webhooks to trigger Make.com when new filings are scraped. Route results to Slack or Sheets automatically.
Website Content Crawler works for any EDGAR URL. Search the Apify Store for 'SEC' or 'EDGAR' for dedicated Actors. Custom Actors can target the full-text search API.
Rarely. Claude Sonnet 4.6 and Opus 4.7 both have a 1M-token context window, and a single 10-K is almost always well under that, so you can pass the whole filing in one call. Chunking only helps if you batch many filings into one request or you want to trim cost by sending just Item 1A and Item 7.
Yes. Give Claude real-time web access via Apify MCP. You can ask Claude to run the scraper and analyze in one chat. API is better for scheduled pipelines.
Use Apify's Google Sheets integration, or a webhook to Make.com that writes to Sheets. Store structured JSON in an Apify Dataset first for traceability.
EDGAR data is public. Follow SEC's fair access policy: reasonable rate limits, identify your bot. Do not circumvent access controls.
Yes. 8-Ks are shorter. Use the same crawler and prompt structure. Adjust the prompt for material events (acquisitions, leadership changes, etc.) instead of full financial analysis.




