# Yahoo Finance Scraper (`wyle/yahoo-finance-scraper`) Actor

Get Yahoo Finance live quotes, income/balance/cashflow financials, analyst ratings, options chains, OHLCV price history, and stock news for any ticker cleanly without an API key.

- **URL**: https://apify.com/wyle/yahoo-finance-scraper.md
- **Developed by:** [Willy Lengkong](https://apify.com/wyle) (community)
- **Categories:** Business, News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Scraper: Quotes, Financials, OHLCV & News

Extract real-time market quotes, company financials, analyst ratings, historical OHLCV candlesticks, options chains, market movers screeners, and breaking financial news from **Yahoo Finance**. Supports US and international stocks, ETFs, indices, cryptocurrencies, and forex pairs in one unified dataset. Runs fast and lightweight with zero browser overhead.

***

### Modes

| Mode | Input | What you get |
|---|---|---|
| **Full Stock Profile (`full_profile`)** | `symbols` | Rich company record combining live quote, valuation multiples, financial statements, executives, analyst targets/trends, earnings date, and latest news. |
| **Fast Batch Quotes (`quotes`)** | `symbols` | Live prices, daily change, volume, 52-week range, market cap, and P/E ratios across up to dozens of tickers per batch. |
| **Historical OHLCV (`historical_ohlcv`)** | `symbols`, `historyRange` or `dateFrom`/`dateTo`, `historyInterval` | Timestamped Open, High, Low, Close, Adjusted Close, and Volume bars plus dividends and stock splits. |
| **Options Chain (`options`)** | `symbols`, `maxExpirations`, `maxItems` | Call and put option contracts across upcoming expiration dates with strike, bid, ask, last price, volume, open interest, and implied volatility. |
| **Financial News (`news`)** | `symbols` (tickers, URLs, or keywords), `maxItems` | News articles with headline, publisher, publication timestamp, article URL, thumbnail, and related tickers. |
| **Market Screener (`screener`)** | `screenerId`, `region`, `maxItems` | Live lists of day gainers, day losers, most actives, growth stocks, most shorted stocks, or regional trending tickers. |

***

### Supported Coverage

- **Asset Classes**:
  - **Equities**: US and global exchanges (e.g., `AAPL`, `NVDA`, `MSFT`, `BBCA.JK`).
  - **ETFs & Indices**: `SPY`, `QQQ`, `^GSPC`, `^DJI`, `^IXIC`.
  - **Crypto & Forex**: `BTC-USD`, `ETH-USD`, `EURUSD=X`, `USDJPY=X`.
- **Historical Granularity**: Intervals `1m`, `5m`, `15m`, `30m`, `1h`, `1d`, `1wk`, `1mo` across lookbacks `1d` to `max` or custom `dateFrom` / `dateTo` dates.
- **Predefined Screeners (`screenerId`)**: `day_gainers`, `day_losers`, `most_actives`, `undervalued_growth_stocks`, `growth_technology_stocks`, `aggressive_small_caps`, `small_cap_gainers`, `most_shorted_stocks`, and `trending` (by 2-letter `region` code such as `US`, `GB`, `CA`, `AU`, `DE`, `IN`, `SG`).

***

### Output Modes & Proxy Tips

- **Out-of-the-Box Direct Runs**: Standard direct connections work reliably for moderate runs; enable **Apify Residential Proxy** if running frequent schedules or large ticker batches.
- **Mode-Specific Controls**:
  - Use `historyRange` (or `dateFrom` / `dateTo`) and `historyInterval` only with `historical_ohlcv`.
  - Use `maxExpirations` (1–20) with `options`.
  - Use `screenerId` and `region` with `screener`.
  - `maxItems` caps records per ticker/query (`historical_ohlcv`, `options`, `news`) or total rows (`screener`).

***

### Use Cases

- **Quantitative Backtesting & Time-Series Modeling**: Pull clean OHLCV price history, dividends, and splits across equities, ETFs, and crypto.
- **Equity Research & Fundamental Screening**: Aggregate revenue, EBITDA, margins, cash flow, analyst target prices, and buy/hold/sell consensus.
- **Options Volatility & Flow Tracking**: Monitor implied volatility, open interest, and strike pricing across upcoming option expirations.
- **AI Financial Copilots & Market Alerts**: Power investment assistants and news monitors with live quotes, screeners, and ticker-tagged headlines.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `scrapeMode` | String | `"full_profile"` | Data mode: `"full_profile"`, `"quotes"`, `"historical_ohlcv"`, `"options"`, `"news"`, or `"screener"`. |
| `symbols` | Array | `["AAPL", "NVDA", "MSFT", "BTC-USD"]` | Ticker symbols, Yahoo Finance quote URLs, or search keywords (when `scrapeMode` is `"news"`). |
| `screenerId` | String | `"day_gainers"` | Predefined Yahoo Finance screener or `"trending"` (when `scrapeMode` is `"screener"`). |
| `region` | String | `"US"` | 2-letter market region for trending tickers (e.g., `US`, `GB`, `CA`, `AU`, `DE`, `IN`, `SG`). |
| `historyRange` | String | `"1mo"` | Lookback period for historical candles (`1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`). |
| `historyInterval` | String | `"1d"` | Bar interval for historical OHLCV data (`1m`, `5m`, `15m`, `30m`, `1h`, `1d`, `1wk`, `1mo`). |
| `dateFrom` | String | `""` | Optional `YYYY-MM-DD` start date for `historical_ohlcv` (overrides `historyRange`). |
| `dateTo` | String | `""` | Optional `YYYY-MM-DD` end date for `historical_ohlcv`. |
| `maxExpirations` | Integer | `2` | Number of upcoming option expiration dates to fetch per ticker (`1`–`20`, `options` mode). |
| `maxItems` | Integer | `50` | Maximum dataset records per symbol (`historical_ohlcv`, `options`, `news`) or total rows (`screener`). |
| `proxyConfiguration` | Object | `{"useApifyProxy": false}` | Optional Apify Proxy configuration (Residential supported). |

***

### Sample Output

```json
{
  "recordType": "full_profile",
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "longName": "Apple Inc.",
  "quoteType": "EQUITY",
  "exchange": "NMS",
  "exchangeName": "NasdaqGS",
  "marketState": "REGULAR",
  "currency": "USD",
  "price": 354.63,
  "change": 6.119995,
  "changePercent": 1.7560457,
  "previousClose": 348.51,
  "openPrice": 349.585,
  "dayHigh": 355.13,
  "dayLow": 349.325,
  "volume": 14479469,
  "avgVolume3M": 42821268,
  "marketCap": 5153547616256.0,
  "enterpriseValue": 5102367670272.0,
  "trailingPE": 39.491093,
  "forwardPE": 33.60842,
  "priceToBook": 45.97822,
  "epsTrailing": 8.98,
  "epsForward": 10.55182,
  "dividendYieldPercent": 0.31,
  "dividendRate": 1.08,
  "fiftyTwoWeekHigh": 355.38,
  "fiftyTwoWeekLow": 243.42,
  "beta": 1.089,
  "targetHighPrice": 405.0,
  "targetLowPrice": 250.0,
  "targetMeanPrice": 340.7655,
  "recommendationKey": "buy",
  "numberOfAnalystOpinions": 40,
  "totalRevenue": 478833999872.0,
  "ebitda": 171486003200.0,
  "profitMargins": 0.27604,
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "country": "United States",
  "city": "Cupertino",
  "website": "https://www.apple.com",
  "employees": 167000,
  "earningsDate": "2027-01-28",
  "recommendationTrend": [
    {
      "period": "0m",
      "strongBuy": 6,
      "buy": 19,
      "hold": 14,
      "sell": 3,
      "strongSell": 3
    }
  ],
  "latestNews": [
    {
      "title": "MP Materials Clears GM Magnet Milestone, Targets Apple as Next Customer",
      "publisher": "MarketBeat",
      "url": "https://finance.yahoo.com/energy/articles/mp-materials-clears-gm-magnet-171548636.html",
      "publishedAt": "2026-11-11T17:15:48Z"
    }
  ],
  "screenerId": "",
  "url": "https://finance.yahoo.com/quote/AAPL/",
  "scrapedAt": "2026-11-11T17:24:54Z"
}
```

# Actor input Schema

## `scrapeMode` (type: `string`):

Choose data mode: 'full_profile' (1 rich fundamental+quote row per ticker), 'quotes' (fast batch quotes), 'historical_ohlcv' (price history + dividends/splits), 'options' (calls/puts chain), 'news' (financial news), or 'screener' (day gainers/losers/actives/trending).

## `symbols` (type: `array`):

Ticker symbols (e.g., 'AAPL', 'NVDA', 'BTC-USD', 'EURUSD=X', '^GSPC', 'BBCA.JK'), Yahoo Finance quote URLs, or search keywords when scrapeMode is 'news'.

## `screenerId` (type: `string`):

Select predefined Yahoo Finance market screener or trending list when 'scrapeMode' is 'screener'.

## `region` (type: `string`):

2-letter market region for trending tickers (e.g., US, GB, CA, AU, DE, IN, SG).

## `historyRange` (type: `string`):

Lookback period for historical candles (ignored if dateFrom/dateTo are specified).

## `historyInterval` (type: `string`):

Bar interval for historical OHLCV data.

## `dateFrom` (type: `string`):

Optional start date for 'historical_ohlcv' mode (overrides historyRange when paired with or without dateTo).

## `dateTo` (type: `string`):

Optional end date for 'historical_ohlcv' mode.

## `maxExpirations` (type: `integer`):

Number of upcoming option expiration dates to fetch per ticker (1–20).

## `maxItems` (type: `integer`):

Maximum dataset records to return per symbol (for OHLCV/options/news) or total rows (for screener).

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy configuration (Residential supported). Standard direct connections work out of the box.

## Actor input object example

```json
{
  "scrapeMode": "full_profile",
  "symbols": [
    "AAPL",
    "NVDA",
    "MSFT",
    "BTC-USD"
  ],
  "screenerId": "day_gainers",
  "region": "US",
  "historyRange": "1mo",
  "historyInterval": "1d",
  "dateFrom": "",
  "dateTo": "",
  "maxExpirations": 2,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "scrapeMode": "full_profile",
    "symbols": [
        "AAPL",
        "NVDA",
        "MSFT",
        "BTC-USD"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("wyle/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 = {
    "scrapeMode": "full_profile",
    "symbols": [
        "AAPL",
        "NVDA",
        "MSFT",
        "BTC-USD",
    ],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("wyle/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 '{
  "scrapeMode": "full_profile",
  "symbols": [
    "AAPL",
    "NVDA",
    "MSFT",
    "BTC-USD"
  ],
  "maxItems": 50
}' |
apify call wyle/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wyle/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/KxzMxMMd0cJaCFNeR/builds/IdVp2BgVze9wZY8u8/openapi.json
