# Yahoo Finance Quote Scraper (`devilscrapes/yahoo-finance-quote-scraper`) Actor

Pull Yahoo Finance quote snapshots and historical OHLCV candles for any list of tickers — equities, ETFs, indices, crypto, FX. We handle the retries, fingerprint rotation, and proxy routing so the data lands. One typed row per symbol, JSON or CSV export.

- **URL**: https://apify.com/devilscrapes/yahoo-finance-quote-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Yahoo Finance Quote Scraper

**💰 $6.20 / 1 000 symbols**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Pull Yahoo Finance quote snapshots and historical OHLCV candles for any list of tickers — equities, ETFs, indices, crypto, FX. We handle the retries, fingerprint rotation, and proxy routing so the data lands. One typed row per symbol, JSON or CSV export.

</div>

***

### 🎯 What this scrapes

Give it a list of Yahoo Finance tickers — equities, ETFs, indices (`^GSPC`), crypto (`BTC-USD`), or FX pairs (`EURUSD=X`) — and it returns one coherent record per symbol: a current quote snapshot (price, previous close, 52-week range, exchange, timezone) plus recent OHLCV candle history for the range and interval you choose. It's a snapshot/polling Actor, not a live streaming feed, built for the quote + chart JSON surface Yahoo Finance itself serves. Three Apify Store rivals already run this same data cluster at real volume (776, 321, and 137 users) — this Actor targets the same demand with per-symbol fault isolation so one bad ticker never sinks your whole batch.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes on every request, standing policy regardless of how clean a target looks today.
- 🔁 **Retries with exponential backoff** on `429` / `5xx` / network errors — up to 5 attempts per symbol, `Retry-After` honoured.
- 🌐 **Apify Proxy routing** wired on every run — pick `RESIDENTIAL` if you want it, default groups suffice today.
- 🧩 **Per-symbol fault isolation** — one bad ticker (typo, delisted, no candles) never sinks the rest of your batch; the run only fails if every symbol comes back empty.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, one coherent quote + history object per symbol.
- 💰 **Pay-Per-Event pricing** — you pay only for symbols that return data. No data, no charge beyond the flat warm-up fee.

### 💡 Use cases

- **Portfolio dashboards** — pull current price + recent history for your whole watch list in one run.
- **Screening / backtesting** — bulk-fetch OHLCV candles across a symbol universe (equities, ETFs, crypto, FX) for a strategy backtest.
- **Alerting** — schedule a daily run, diff successive snapshots, alert when price crosses a threshold.
- **Cross-asset dashboards** — mix equities, indices, crypto, and FX pairs in a single call; Yahoo's ticker syntax covers all four.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `symbols` | `array` | **yes** | \['AAPL', '^GSPC', 'BTC-USD'] | Yahoo Finance ticker symbols. Equities/ETFs as-is (AAPL), indices ^-prefixed (^GSPC), crypto -USD-suffixed (BTC-USD),… |
| `range` | `string` | no | '1mo' | How far back to pull candle history. |
| `interval` | `string` | no | '1d' | Candle granularity within the requested range. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True} | Apify Proxy routing. Default groups suffice against this target; RESIDENTIAL stays selectable if you need it. |

#### Example input

```json
{
  "symbols": [
    "AAPL",
    "^GSPC",
    "BTC-USD"
  ],
  "range": "1mo",
  "interval": "1d",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `symbol` | `string` | Yahoo Finance ticker symbol (meta.symbol). |
| `currency` | `['string', 'null']` | Quote currency (meta.currency). |
| `exchange_name` | `['string', 'null']` | Exchange code (meta.exchangeName). |
| `instrument_type` | `['string', 'null']` | Instrument type, e.g. EQUITY, INDEX, CRYPTOCURRENCY (meta.instrumentType). |
| `regular_market_price` | `['number', 'null']` | Current/last regular market price. |
| `previous_close` | `['number', 'null']` | Previous session close. |
| `regular_market_time` | `['string', 'null']` | ISO-8601 UTC timestamp of the last regular market price. |
| `fifty_two_week_high` | `['number', 'null']` | 52-week high. |
| `fifty_two_week_low` | `['number', 'null']` | 52-week low. |
| `timezone` | `['string', 'null']` | Exchange timezone code. |
| `requested_range` | `string` | Echo of the requested range input. |
| `requested_interval` | `string` | Echo of the requested interval input. |
| `candle_count` | `integer` | Number of candles returned; 0 when the symbol is valid but has no candles for the requested range/interval. |
| `candles` | `array` | OHLCV candle history (timestamp, open, high, low, close, volume). May be empty. |

#### Example output

```json
{
  "symbol": "AAPL",
  "currency": "USD",
  "exchange_name": "NMS",
  "instrument_type": "EQUITY",
  "regular_market_price": 227.52,
  "previous_close": 226.01,
  "regular_market_time": "2026-09-10T20:00:00Z",
  "fifty_two_week_high": 260.1,
  "fifty_two_week_low": 164.08,
  "timezone": "EST",
  "requested_range": "1mo",
  "requested_interval": "1d",
  "candle_count": 2,
  "candles": [
    {
      "timestamp": "2026-09-09T13:30:00Z",
      "open": 224.1,
      "high": 227.9,
      "low": 223.55,
      "close": 226.01,
      "volume": 51234000
    },
    {
      "timestamp": "2026-09-10T13:30:00Z",
      "open": 226.2,
      "high": 228.4,
      "low": 225.6,
      "close": 227.52,
      "volume": 47821000
    }
  ]
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result` | $0.006 | Per dataset item |

Example: 1 000 symbols at the rates above ≈ **$6.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- No options chains, financials/earnings, analyst estimates, news, or screener data — quote + chart only.
- Snapshot/polling only, not a real-time streaming feed.
- No symbol search/autocomplete — supply exact Yahoo ticker syntax.
- Currency is passed through as reported by Yahoo, not cross-symbol normalized.

### ❓ FAQ

**Is this real-time streaming?**

No — this is a REST snapshot: current quote plus recent OHLCV history for the range/interval you choose. For tick-by-tick data, use a WebSocket feed instead.

**What ticker syntax does it expect?**

Yahoo's own syntax: equities/ETFs as-is (AAPL), indices ^-prefixed (^GSPC), crypto -USD-suffixed (BTC-USD), FX =X-suffixed (EURUSD=X).

**What happens if I typo a symbol or it's delisted?**

That one symbol is skipped with a logged reason and the rest of your batch still returns. The run only fails if every requested symbol comes back empty.

**Do you cover options, financials, or news?**

Not in this Actor — quote and chart data only. Options chains, financials/earnings, analyst estimates, news, and screener endpoints are out of scope.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

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

Yahoo Finance ticker symbols. Equities/ETFs as-is (<code>AAPL</code>), indices <code>^</code>-prefixed (<code>^GSPC</code>), crypto <code>-USD</code>-suffixed (<code>BTC-USD</code>), FX <code>=X</code>-suffixed (<code>EURUSD=X</code>).

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

How far back to pull candle history.

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

Candle granularity within the requested range.

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

Apify Proxy routing. Default groups suffice against this target; RESIDENTIAL stays selectable if you need it.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "^GSPC",
    "BTC-USD"
  ],
  "range": "1mo",
  "interval": "1d",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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",
        "^GSPC",
        "BTC-USD"
    ],
    "range": "1mo",
    "interval": "1d",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/yahoo-finance-quote-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",
        "^GSPC",
        "BTC-USD",
    ],
    "range": "1mo",
    "interval": "1d",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/yahoo-finance-quote-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 '{
  "symbols": [
    "AAPL",
    "^GSPC",
    "BTC-USD"
  ],
  "range": "1mo",
  "interval": "1d",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call devilscrapes/yahoo-finance-quote-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/yahoo-finance-quote-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/H6Ks2Ga9b5ObVRDI3/builds/1vZjQB2luvZosfOoJ/openapi.json
