# Yahoo Finance — Historical Prices (OHLCV) (`ponderable_hydrometer/yahoo-finance-scraper`) Actor

Historical OHLCV price data for stocks, ETFs, crypto & forex from Yahoo Finance — open, high, low, close, adj close, volume. Any range & interval. Free keyless API.

- **URL**: https://apify.com/ponderable\_hydrometer/yahoo-finance-scraper.md
- **Developed by:** [Ponderable Hydrometer](https://apify.com/ponderable_hydrometer) (community)
- **Categories:** Developer tools, Automation, E-commerce
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Yahoo Finance — Historical Prices (OHLCV)

**Download historical OHLCV price data for stocks, ETFs, crypto, forex and indices from Yahoo
Finance — open, high, low, close, adjusted close and volume — at any interval (1m to 3mo) and range
(up to full history) or between explicit dates.** One clean row per candle. Free, keyless.

Perfect for backtesting, quantitative research, charting, portfolio tracking and finance apps.

### What you get

One row per candle:

- **Identity** — `symbol`, `currency`, `exchange`
- **Time** — `date` (ISO), `timestamp` (unix seconds)
- **Prices** — `open`, `high`, `low`, `close`, `adjClose` (split/dividend-adjusted)
- **Volume** — `volume`

Empty/gap candles that Yahoo pads with nulls are skipped, so every row is real data.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `symbols` | array | — | Tickers, e.g. `["AAPL","BTC-USD","EURUSD=X","^GSPC"]`. **Required.** |
| `range` | enum | `1mo` | `1d`…`10y`, `ytd`, `max` (used when no explicit dates) |
| `interval` | enum | `1d` | `1m`…`3mo` (intraday intervals only work for short ranges) |
| `period1` / `period2` | string | — | Explicit `YYYY-MM-DD` (or unix seconds) window; overrides `range` |
| `events` | string | — | Optional corporate events, e.g. `div,split` |

#### Example input

```json
{"symbols":["AAPL","MSFT","NVDA"],"range":"1y","interval":"1d"}
```

Crypto between explicit dates:

```json
{"symbols":["BTC-USD","ETH-USD"],"period1":"2024-01-01","period2":"2025-01-01","interval":"1d"}
```

Intraday:

```json
{"symbols":["TSLA"],"range":"5d","interval":"15m"}
```

### Output (one candle)

Fields below are the real normalizer output:

```json
{
  "symbol": "AAPL",
  "currency": "USD",
  "exchange": "NMS",
  "date": "2026-07-10T13:30:00.000Z",
  "timestamp": 1783689000,
  "open": 213.5,
  "high": 215.02,
  "low": 212.88,
  "close": 214.29,
  "adjClose": 214.29,
  "volume": 41250000
}
```

### Why this actor

- **Multi-asset** — stocks, ETFs, crypto, forex and indices with the same clean schema.
- **Any interval & range** — intraday to monthly, fixed ranges or explicit date windows.
- **Adjusted close included** — split/dividend-adjusted prices, gap candles removed, retry/backoff.

### Pricing

Pay per result — **$1.00 per 1,000 results** (one result = one price candle). No subscription or platform fees.

### Related actors

- **TradingView Screener** — screen whole markets (snapshot) to pick symbols to pull history for.
- **CoinGecko Scraper** — crypto market data & history.
- **SEC EDGAR Scraper** — US public-company filings to pair with price data.

### Notes & limits

- Intraday intervals (`1m`, `5m`, …) are only available for short recent ranges (Yahoo's limit).
- Prices are as reported by Yahoo Finance and may be adjusted/restated; treat as informational.
- Independent tool built on Yahoo's public v8 chart endpoint; not affiliated with or endorsed by
  Yahoo. You are responsible for compliant use of the output.

# Actor input Schema

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

Tickers to fetch, e.g. \["AAPL","MSFT","BTC-USD","EURUSD=X","^GSPC"].

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

Time range (used when no explicit dates): 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.

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

Candle interval: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. (Intraday intervals only work for short ranges.)

## `period1` (type: `string`):

Explicit start date YYYY-MM-DD (or unix seconds). Overrides Range when both start and end are set.

## `period2` (type: `string`):

Explicit end date YYYY-MM-DD (or unix seconds).

## `events` (type: `string`):

Optionally include corporate events, e.g. "div,split".

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT"
  ],
  "range": "1mo",
  "interval": "1d"
}
```

# 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",
        "MSFT"
    ]
};

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

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "MSFT"
  ]
}' |
apify call ponderable_hydrometer/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ponderable_hydrometer/yahoo-finance-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/CKppbr6fbZh6Flfzm/builds/eZIGHoE9Big5FcXc0/openapi.json
