# Yahoo Finance History Pro (`red.cars/yahoo-finance-history-pro`) Actor

Daily and intraday OHLCV price history for any Yahoo Finance ticker with quote snapshots, date windows, dividends and splits. Clean one-row-per-record output for agents and pipelines.

- **URL**: https://apify.com/red.cars/yahoo-finance-history-pro.md
- **Developed by:** [AutomateLab](https://apify.com/red.cars) (community)
- **Categories:** Business, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 History Pro

Daily and intraday price history for any Yahoo Finance ticker. One run returns clean, one-row-per-record OHLCV history, a live quote snapshot per symbol, and optional dividends and splits — built for AI agents, pipelines, and backtests that need predictable tabular output.

### Why this over the alternatives

The category's best-known actor (architjn/yahoo-finance, rated 4.7 from 6 reviews) has not been updated in over five months and returns one giant nested blob per ticker. The most comprehensive recent entry (kaix/yahoo-finance-scraper) has 111 monthly users and zero reviews. Yahoo Finance History Pro is a fresh, focused pull: exact date windows, dividend and split rows, a hard row cap, and one flat record per data point that loads straight into a spreadsheet or an agent's context.

| Actor | Rating | 30-day users | Price |
|---|---|---|---|
| **Yahoo Finance History Pro** | new | new | **$0.40 per 1,000 records + $0.005 per run** |
| kaix/yahoo-finance-scraper | 0.0 (0 reviews) | 111 | $0.40 per 1,000 stocks |
| architjn/yahoo-finance | 4.7 (6 reviews) | 92 | $0.90 per 1,000 results |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| symbols | string list | `["AAPL"]` | Ticker symbols: stocks, ETFs, indices (`^GSPC`), crypto (`BTC-USD`), FX (`EURUSD=X`), futures (`GC=F`). Up to 25 per run. |
| range | select | `1mo` | History depth when no date window is set: 1d to max, or ytd. |
| interval | select | `1d` | Candle interval: daily, weekly, monthly, or intraday (1h, 30m, 15m, 5m). |
| periodStart | date | — | Optional exact window start (YYYY-MM-DD). Overrides range when set with periodEnd. |
| periodEnd | date | — | Optional exact window end (YYYY-MM-DD). |
| includeQuote | checkbox | true | One quote row per symbol: last price, change, currency, exchange, 52-week range. |
| includeEvents | checkbox | false | Dividend and split rows inside the requested window. |
| maxRows | integer | 500 | Hard cap on total history rows per run, 1 to 2000. |

### Output

One flat record per data point, tagged with a `type` field:

```
{"type":"quote","symbol":"AAPL","name":"Apple Inc.","price":262.11,"changePercent":-0.87,"currency":"USD","exchangeName":"NMS","fiftyTwoWeekHigh":288.62,"fiftyTwoWeekLow":164.08}
{"type":"history","symbol":"AAPL","date":"2026-09-17T00:00:00.000Z","open":255.4,"high":257.9,"low":254.2,"close":256.6,"volume":54210300}
{"type":"dividend","symbol":"AAPL","date":"2026-08-10T00:00:00.000Z","amount":0.26}
```

An invalid symbol returns one `error` record and the run continues with the rest.

### Pricing

Pay per event: **$0.005 per actor start + $0.40 per 1,000 records**. A default run (AAPL, 1 month, daily) returns about 22 records and costs under two cents. Runs that cannot load any data succeed with a status message and no result charge.

### Use cases

- Backtesting and charting pipelines that need one clean row per candle, not nested blobs.
- Feeding AI agents current quotes plus recent price action in a token-efficient form.
- Portfolio dashboards refreshed on a schedule across a watchlist of up to 25 tickers.
- Corporate-action tracking: dividend amounts and split ratios inside any date window.

### FAQ

**Which instrument types work?**
Anything Yahoo Finance lists: stocks, ETFs, indices, cryptocurrencies, currencies, futures, and mutual funds. Index symbols start with `^`, forex pairs end with `=X`, futures end with `=F`.

**Can I get a custom date window?**
Yes. Set periodStart and periodEnd (YYYY-MM-DD) and they override the range for every symbol in the run.

**Do intraday intervals cover long windows?**
No. Exchanges cap intraday depth to recent days, so use daily, weekly, or monthly intervals for long windows.

**What happens when a symbol is wrong?**
You get a single error record for it and every other symbol still processes.

# Actor input Schema

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

Yahoo Finance tickers, e.g. AAPL, MSFT, ^GSPC, BTC-USD, EURUSD=X. Up to 25 per run.

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

How far back to pull history when no date window is set. Ignored when periodStart and periodEnd are provided.

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

Candle interval. Daily, weekly and monthly cover long windows; intraday intervals are limited to recent days.

## `periodStart` (type: `string`):

Optional exact window start date in UTC, e.g. 2024-01-01. When set together with window end, it overrides the range.

## `periodEnd` (type: `string`):

Optional exact window end date in UTC, e.g. 2024-12-31. When set together with window start, it overrides the range.

## `includeQuote` (type: `boolean`):

Add one quote row per symbol with last price, change, currency, exchange and market state.

## `includeEvents` (type: `boolean`):

Add dividend and split rows inside the requested window when the exchange reports them.

## `maxRows` (type: `integer`):

Hard cap on total history rows per run across all symbols, 1 to 2000.

## Actor input object example

```json
{
  "symbols": [
    "AAPL"
  ],
  "range": "1mo",
  "interval": "1d",
  "includeQuote": true,
  "includeEvents": false,
  "maxRows": 500
}
```

# Actor output Schema

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

Link to the dataset of market records

# 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 = {
    "symbols": [
        "AAPL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("red.cars/yahoo-finance-history-pro").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 = { "symbols": ["AAPL"] }

# Run the Actor and wait for it to finish
run = client.actor("red.cars/yahoo-finance-history-pro").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 '{
  "symbols": [
    "AAPL"
  ]
}' |
apify call red.cars/yahoo-finance-history-pro --silent --output-dataset

```

## MCP server setup

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

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/ZHNQ7QMJAl2PtePm9/builds/0XRePczOPI8eGLfDw/openapi.json
