# Yahoo Finance Stock Quotes, Financials, OHLCV & AI News API (`church_of_loujess/yahoo-finance-scraper`) Actor

Scrape real-time Yahoo Finance stock quotes, historical OHLCV bars, full Income Statement, Balance Sheet & Cash Flow, options chains, analyst ratings, holders, news, and AI/RAG Markdown financial tear-sheets. Zero-proxy drop-in API.

- **URL**: https://apify.com/church_of_loujess/yahoo-finance-scraper.md
- **Developed by:** [H H](https://apify.com/church_of_loujess) (community)
- **Categories:** AI, MCP servers, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 enriched stock/crypto ticker (quotes, financials, ohlcv & news)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Yahoo Finance Stock Quotes, Financials, OHLCV & AI News Scraper

Extract **real-time stock quotes**, **historical OHLCV candlestick bars**, **complete Income Statements, Balance Sheets & Cash Flow Statements** (annual & quarterly via Yahoo's `fundamentals-timeseries` engine), **options chains (calls/puts + Put/Call ratios)**, **analyst recommendations & price targets**, **institutional/insider holders**, **dividends & splits**, **real-time ticker news**, and **LLM/RAG-ready Markdown financial tear-sheets** directly from Yahoo Finance — **with zero external proxies required**.

***

### Why Use This Yahoo Finance Scraper?

Most legacy Yahoo Finance scrapers and `yfinance` wrappers on Apify broke when Yahoo Finance enforced `fc.yahoo.com` A3 cookie + crumb authentication and deprecated legacy `balanceSheetHistory` / `cashflowStatementHistory` modules in `v10/finance/quoteSummary`.

This Actor solves both problems natively using pure async **HTTP/2** (`httpx`):

1. **Automatic Crumb & Cookie Handshake (`fc.yahoo.com` + `v1/test/getcrumb`)**: Zero `401 Unauthorized` or `403 Forbidden` errors without requiring expensive residential proxies.
2. **Full Financial Statements Restored (`fundamentals-timeseries`)**: Combines `v10/finance/quoteSummary` with Yahoo's `ws/fundamentals-timeseries/v1/finance/timeseries` API so your **Income Statement**, **Balance Sheet** (`TotalAssets`, `CashAndCashEquivalents`, `TotalDebt`, `StockholdersEquity`), and **Cash Flow Statement** (`OperatingCashFlow`, `CapitalExpenditure`, `FreeCashFlow`) are 100% populated across both annual and quarterly periods.
3. **100% Drop-In Schema Compatibility**: Supports the exact input (`tickers`, `start_date`, `end_date`) and output keys (`ticker`, `stock_info`, `price_info`, `history`, `financials`, `dividends`, `splits`, `news`, `recommendations`, `holders`, `options`, `earnings`) expected by existing workflows.
4. **Built for AI Agents, Hedge Fund Automation & MCP Pipelines**: Every ticker includes `aiSummaryMarkdown` (a structured Markdown financial tear-sheet) and `ragChunks` ready for LangChain, LlamaIndex, CrewAI, or Claude/OpenAI tool calling.

***

### What Data Can You Extract?

| Category | Extracted Fields |
| :--- | :--- |
| **Real-Time Price (`price_info`)** | `current_price`, `previous_close`, `change`, `change_percent`, `currency`, `market_state`, `timestamp` |
| **Company & Valuation (`stock_info`)** | `name`, `sector`, `industry`, `market_cap`, `enterprise_value`, `pe_ratio`, `forward_pe`, `peg_ratio`, `price_to_book`, `enterprise_to_revenue`, `enterprise_to_ebitda`, `beta`, `52_week_high`, `52_week_low`, `dividend_yield`, `profit_margins`, `operating_margins`, `return_on_equity`, `target_mean_price`, `recommendation_key` |
| **Historical OHLCV (`history`)** | Daily/Weekly/Monthly/Hourly bars (`date`, `timestamp`, `open`, `high`, `low`, `close`, `adj_close`, `volume`) via `period` (`1mo`, `1y`, `5y`, `max`) or custom `start_date` / `end_date` |
| **Financial Statements (`financials`)** | Annual & Quarterly **Income Statement** (`TotalRevenue`, `GrossProfit`, `OperatingIncome`, `NetIncome`, `EBITDA`, `DilutedEPS`), **Balance Sheet** (`TotalAssets`, `CashAndCashEquivalents`, `TotalLiabilitiesNetMinorityInterest`, `TotalDebt`, `StockholdersEquity`), and **Cash Flow** (`OperatingCashFlow`, `CapitalExpenditure`, `FreeCashFlow`, `RepurchaseOfCapitalStock`) |
| **Options Chain (`options`)** | All active `expiration_dates`, `put_call_volume_ratio`, `put_call_oi_ratio`, and top nearest-expiry Calls & Puts by Open Interest (`strike`, `lastPrice`, `bid`, `ask`, `volume`, `openInterest`, `impliedVolatility`) |
| **Analyst & Ownership (`recommendations`, `holders`)** | Monthly Buy/Hold/Sell `recommendationTrend`, latest Wall Street firm `upgrades_downgrades`, `major_holders_breakdown`, top `institutional_holders`, `mutual_fund_holders`, and `insider_transactions` |
| **News & AI Tear-Sheet (`news`, `aiSummaryMarkdown`)** | Real-time financial news (`title`, `publisher`, `link`, `publishedAt`) + full Markdown financial tear-sheet and `ragChunks` |

***

### Input Example

```json
{
  "tickers": ["AAPL", "MSFT", "NVDA"],
  "period": "1mo",
  "interval": "1d",
  "includeFinancials": true,
  "includeOptions": true,
  "includeNews": true,
  "includeAiSummary": true
}
```

#### Custom Date Range Example (Drop-in Compatible)

```json
{
  "tickers": ["AAPL", "GOOG", "TSLA"],
  "start_date": "2025-01-01",
  "end_date": "2026-01-01",
  "interval": "1d"
}
```

***

### Output Example (Abridged)

```json
{
  "ticker": "AAPL",
  "stock_info": {
    "symbol": "AAPL",
    "name": "Apple Inc.",
    "sector": "Technology",
    "industry": "Consumer Electronics",
    "market_cap": 3840000000000,
    "enterprise_value": 3910000000000,
    "current_price": 259.2,
    "pe_ratio": 34.8,
    "forward_pe": 28.4,
    "dividend_yield": 0.004,
    "recommendation_key": "buy",
    "target_mean_price": 275.5
  },
  "price_info": {
    "symbol": "AAPL",
    "current_price": 259.2,
    "previous_close": 258.8,
    "change": 0.4,
    "change_percent": 0.1546,
    "currency": "USD"
  },
  "financials": {
    "income_statement": [
      {
        "date": "2025-09-30",
        "TotalRevenue": 416161000000.0,
        "GrossProfit": 195201000000.0,
        "OperatingIncome": 133050000000.0,
        "NetIncome": 112010000000.0,
        "DilutedEPS": 7.46
      }
    ],
    "balance_sheet": [
      {
        "date": "2025-09-30",
        "TotalAssets": 359241000000.0,
        "CashAndCashEquivalents": 35934000000.0,
        "TotalDebt": 98657000000.0,
        "StockholdersEquity": 73733000000.0
      }
    ],
    "cash_flow": [
      {
        "date": "2025-09-30",
        "OperatingCashFlow": 111482000000.0,
        "CapitalExpenditure": -12715000000.0,
        "FreeCashFlow": 98767000000.0
      }
    ]
  },
  "history": {
    "symbol": "AAPL",
    "period": "1mo",
    "interval": "1d",
    "bars_count": 22,
    "data": [
      {
        "date": "2026-10-14",
        "open": 258.5,
        "high": 260.1,
        "low": 257.9,
        "close": 259.2,
        "adj_close": 259.2,
        "volume": 41250300
      }
    ]
  },
  "aiSummaryMarkdown": "# Apple Inc. (AAPL) — Real-Time Financial Tear-Sheet..."
}
```

***

### Explore the Full Zero-Proxy AI/RAG & B2B Lead Suite (@church_of_loujess)

All 7 Actors run on **256 MB RAM** with **zero external proxies** and support **1-click MCP integration** for Claude Desktop, Cursor, and n8n:

| Actor | Best For |
| :--- | :--- |
| **[YouTube Transcript, Chapters & AI/RAG Scraper](https://apify.com/church_of_loujess/youtube-transcript-rag-scraper)** | Android InnerTube captions, chapters, iSummaryMarkdown &
agChunks |
| **[YouTube Channel Email, Socials & B2B Leads Scraper](https://apify.com/church_of_loujess/youtube-channel-email-leads-scraper)** | Creator/business emails, socials & external bio-link domain crawling |
| **[Google Trends Fast Scraper (No 429)](https://apify.com/church_of_loujess/google-trends-fast-scraper)** | Interest over time, regional breakdown, rising queries & trending searches |
| **[Google News Scraper Fast (Real Decoded URLs + Markdown)](https://apify.com/church_of_loujess/google-news-scraper-fast)** | Decodes CBMi.../AU_yqL URLs via Fbv4je RPC + full article Markdown |
| **[Website Email, Phone, Socials & Tech Stack Finder](https://apify.com/church_of_loujess/website-email-phone-finder)** | De-obfuscated emails, live DNS/MX mail provider check & 50+ tech signals |
| **[Fast Website Content & AI/RAG Markdown Crawler](https://apify.com/church_of_loujess/fast-website-content-crawler)** | Parallel sitemap.xml + BFS Markdown crawler & token-bounded
agChunks |
| **[Yahoo Finance Stock Quotes, Financials, OHLCV & AI News API](https://apify.com/church_of_loujess/yahoo-finance-scraper)** | Real-time quotes, OHLCV bars, full Income/Balance/CashFlow & AI tear-sheets |

- **Open-Source MCP Config, LangChain Loader & n8n Templates:** <https://github.com/Churchofloujess/apify-zero-proxy-mcp-suite>

# Actor input Schema

## `tickers` (type: `array`):

List of Yahoo Finance ticker symbols to scrape (e.g. AAPL, MSFT, NVDA, BTC-USD, ^GSPC, TSLA). Drop-in compatible with architjn/yahoo-finance.

## `start_date` (type: `string`):

Optional start date for historical OHLCV bars in YYYY-MM-DD format (e.g. 2025-01-01). If omitted, uses the 'period' parameter below.

## `end_date` (type: `string`):

Optional end date for historical OHLCV bars in YYYY-MM-DD format (e.g. 2026-10-15). Defaults to today if start_date is set.

## `period` (type: `string`):

Time range for historical OHLCV bars when start_date is not specified.

## `interval` (type: `string`):

Candlestick bar interval for historical price data.

## `includeFinancials` (type: `boolean`):

Fetch complete annual and quarterly Income Statement, Balance Sheet, and Cash Flow statement via Yahoo's fundamentals-timeseries API.

## `includeOptions` (type: `boolean`):

Fetch active option expiration dates and nearest-expiry calls/puts chain with implied volatility and open interest.

## `includeNews` (type: `boolean`):

Fetch latest financial news headlines, publishers, timestamps, and links for each ticker.

## `includeAiSummary` (type: `boolean`):

Generate an LLM-ready Markdown financial tear-sheet and token-bounded RAG chunks for AI agents and MCP pipelines.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT",
    "NVDA"
  ],
  "period": "1mo",
  "interval": "1d",
  "includeFinancials": true,
  "includeOptions": true,
  "includeNews": true,
  "includeAiSummary": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tickers": [
        "AAPL",
        "MSFT",
        "NVDA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("church_of_loujess/yahoo-finance-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tickers": [
        "AAPL",
        "MSFT",
        "NVDA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("church_of_loujess/yahoo-finance-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tickers": [
    "AAPL",
    "MSFT",
    "NVDA"
  ]
}' |
apify call church_of_loujess/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,church_of_loujess/yahoo-finance-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/S7Bnjez71doovSMGb/builds/zMTb34OkrsEINhnbo/openapi.json
