# Yahoo Finance Historical Data Scraper — OHLCV, Dividends (`tagadanar/yahoo-finance-history-scraper`) Actor

Yahoo Finance historical prices for any list of tickers: daily, weekly, monthly or intraday OHLCV bars with adjusted close, plus dividends and splits. Stocks, ETFs, indices, crypto, FX. $0.25 per 1,000 rows + $0.001/run, usage included. No API key.

- **URL**: https://apify.com/tagadanar/yahoo-finance-history-scraper.md
- **Developed by:** [Tagada Data](https://apify.com/tagadanar) (community)
- **Categories:** Automation, Developer tools, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 1,000 price bar, dividend or split rows

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 Historical Data Scraper: OHLCV, adjusted close, dividends and splits

Paste a list of tickers, pick a date range and a bar size, and get Yahoo Finance's historical prices back as one flat table: open, high, low, close, adjusted close and volume for every bar, plus the dividends and stock splits in that window. Stocks from any exchange Yahoo covers, ETFs and funds, indices, crypto pairs, currencies and futures, many tickers in one run.

Built for backtesting and quant research, financial dashboards and spreadsheets, fintech prototypes, and AI agents that need clean price history without a data-vendor contract.

**$0.25 per 1,000 rows** (a row is one price bar, one dividend or one split) plus **$0.001 per run**. Platform usage included. No API key, no login.

### What you get

Every row has a `type` so you can split the dataset: `price`, `dividend` or `split`.

#### `price`: one row per bar

| Field | Description |
| --- | --- |
| `ticker`, `name` | The Yahoo symbol and the instrument's name |
| `date` | Bar date in the exchange's own time zone (YYYY-MM-DD) |
| `timestamp` | Bar start, ISO 8601 UTC (use it for intraday bars) |
| `open`, `high`, `low`, `close` | Prices in the instrument's currency |
| `adjClose` | Close adjusted for splits and dividends (daily, weekly and monthly bars; `null` for intraday bars, where Yahoo gives none) |
| `volume` | Volume traded in the bar (0 or `null` for indices and FX, as on Yahoo) |
| `currency`, `exchange`, `exchangeName`, `instrumentType` | Where it trades and what it is (EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE...) |
| `interval` | The bar size you asked for |
| `partialBar` | Only on the newest bar when Yahoo has not published its final close yet: the row carries the latest trade price as its close |

#### `dividend`: one row per dividend in the window

`ticker`, `date`, `timestamp`, `amount` (per share, in `currency`), `currency`, `exchange`.

#### `split`: one row per stock split in the window

`ticker`, `date`, `timestamp`, `numerator`, `denominator`, `splitRatio` (for example `4:1`).

### Input

| Field | What it does |
| --- | --- |
| **Tickers** | Yahoo symbols, one per line: `AAPL`, `BRK-B`, `7203.T`, `SAP.DE`, `VOD.L`, `SPY`, `^GSPC`, `BTC-USD`, `EURUSD=X`, `GC=F`. A `finance.yahoo.com/quote/...` link works too. Up to 500 per run. |
| **Range** | A preset window ending today: 5 days, 1, 3 or 6 months, year to date, 1, 2, 5 or 10 years, or the full history. Used when no dates are set. |
| **Start date / End date** | An exact window, YYYY-MM-DD, both inclusive. Only a start date runs to today; only an end date runs from the first trade. |
| **Interval** | Daily, weekly, monthly, 1 hour, 15 minutes or 5 minutes. |
| **Include dividends / Include splits** | On by default. Turn off to get price bars only. |

Example:

```json
{
    "tickers": ["AAPL", "BTC-USD", "^GSPC"],
    "startDate": "2020-01-01",
    "endDate": "2020-12-31",
    "interval": "1wk"
}
```

#### Intraday limits

Yahoo only keeps intraday bars for a limited time: **1-hour bars for the last 730 days, 15- and 5-minute bars for the last 60 days.** If your window starts earlier, the run starts it at Yahoo's limit and the run status says so. A window that lies entirely before the limit is rejected as an input error before anything is fetched.

### Pricing

- **$0.25 per 1,000 rows** on the Free plan, lower on paid Apify plans (down to $0.175 per 1,000 on Gold). A row is one price bar, dividend or split.
- **$0.001 per run** start fee.
- Platform usage (compute, storage) is included: you pay only the two events above.
- Tickers Yahoo does not know and windows with no trading (a weekend, a holiday) deliver no rows and cost nothing beyond the start fee.

How much is that? 10 years of daily bars for one stock is about 2,500 rows, so **$0.63**; one year of daily bars for the 30 Dow stocks is about 7,500 rows, so **$1.88**.

### The run status tells you what happened

The run ends with a one-line status, for example:

> `4 ticker(s), 2020-08-01..2020-09-30 / 1d: 188 price bar(s), 2 dividend(s), 1 split(s). Yahoo says it has no such symbol: ZZZZNOPE.`

Each kind of zero is named separately: a symbol Yahoo does not know, a window with no bars, a window Yahoo rejected (with Yahoo's own reason), a symbol Yahoo refused to answer after retries, and tickers not reached before the run's time limit. A run that delivered nothing and cannot prove why ends as FAILED, so you are never charged for a silent empty result.

### Options chains

Not included. Yahoo's options endpoint needs a session cookie and a crumb token (it answers `401 Invalid Crumb` without them), which is a fragile route; this actor stays on the public chart endpoint only.

### Notes

- Data comes from Yahoo Finance's public chart data, the same numbers as the Historical Data tab on finance.yahoo.com. Yahoo's data is provided for information; check its terms for your use.
- Prices are in the instrument's own currency (`currency` field): `7203.T` is in JPY, `VOD.L` in GBp (pence).
- Need quotes, key statistics or financial statements too? See our [Yahoo Finance Scraper](https://apify.com/tagadanar/yahoo-finance-scraper).

# Changelog

This Actor's version history is a separate document: https://apify.com/tagadanar/yahoo-finance-history-scraper/changelog.md

# Actor input Schema

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

Yahoo Finance symbols, one per line: stocks (AAPL, BRK-B), foreign listings with their suffix (7203.T, SAP.DE, VOD.L), ETFs (SPY), indices (^GSPC, ^FTSE), crypto (BTC-USD), FX (EURUSD=X), futures (GC=F). A finance.yahoo.com/quote/... URL also works. Up to 500 per run.

## `range` (type: `string`):

Preset window ending today. Ignored when a start or end date is set.

## `startDate` (type: `string`):

First day, YYYY-MM-DD (inclusive). Leave empty to use the range preset.

## `endDate` (type: `string`):

Last day, YYYY-MM-DD (inclusive). Empty = today.

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

Bar size. Yahoo serves intraday bars for a limited lookback only: 1 hour for the last 730 days, 15 and 5 minutes for the last 60 days. Older windows are cut to that limit and the run status says so.

## `includeDividends` (type: `boolean`):

Add one row per dividend paid in the window (type = dividend).

## `includeSplits` (type: `boolean`):

Add one row per stock split in the window (type = split).

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "BTC-USD",
    "^GSPC"
  ],
  "range": "1mo",
  "interval": "1d",
  "includeDividends": true,
  "includeSplits": true
}
```

# Actor output Schema

## `dataset` (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",
        "BTC-USD",
        "^GSPC"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tagadanar/yahoo-finance-history-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",
        "BTC-USD",
        "^GSPC",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tagadanar/yahoo-finance-history-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",
    "BTC-USD",
    "^GSPC"
  ]
}' |
apify call tagadanar/yahoo-finance-history-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tagadanar/yahoo-finance-history-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/He7V8KPGmYJ04jOo3/builds/Z5n9M7XZBc2lAaCdT/openapi.json
