# Yahoo Finance Stock & Crypto Prices Scraper (`scrapers_lat/yahoo-finance-scraper`) Actor

Extract Yahoo Finance stock and crypto market data by symbol: price, change, market cap, PE, EPS, 52-week range, volume, supply and OHLCV history. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/yahoo-finance-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Automation, Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.23 / 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.
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?

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 Stock & Crypto Scraper](https://scrapers.lat/banners/yahoo-finance-scraper.png)](https://console.apify.com/actors/Z3F7rwN3h9cfU6Rke/input)

## Yahoo Finance Stock & Crypto Scraper

Here is one real result, with every field the actor returns (the `businessSummary` is trimmed here for readability; the actor returns the full text):

```json
{
  "imageUrl": null,
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "type": "equity",
  "quoteType": "Equity",
  "currency": "USD",
  "exchange": "NasdaqGS",
  "marketState": "CLOSED",
  "price": 305.93,
  "change": 0.669983,
  "changePercent": 0.22,
  "previousClose": 305.26,
  "open": 306.028,
  "dayHigh": 307.49,
  "dayLow": 304.3,
  "volume": 26072932,
  "marketCap": 4464797286400,
  "fiftyTwoWeekHigh": 344.57,
  "fiftyTwoWeekLow": 223.78,
  "fiftyTwoWeekChangePercent": 32.5,
  "fiftyDayAverage": 309.1908,
  "twoHundredDayAverage": 280.48364,
  "trailingPE": 35.083714,
  "forwardPE": 32.17704,
  "epsTrailingTwelveMonths": 8.72,
  "dividendYield": 0.35,
  "sharesOutstanding": 14594180000,
  "bookValue": 7.36,
  "priceToBook": 41.566574,
  "averageAnalystRating": "2.1 - Buy",
  "postMarketPrice": 305.7705,
  "postMarketChange": -0.15948486,
  "postMarketChangePercent": -0.05,
  "circulatingSupply": null,
  "maxSupply": null,
  "volume24Hr": null,
  "marketTime": "2026-08-14T20:00:01.000Z",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "website": "https://www.apple.com/",
  "phone": "(408) 996-1010",
  "address": "One Apple Park Way",
  "city": "Cupertino",
  "state": "CA",
  "zip": "95014",
  "country": "United States",
  "employees": 150000,
  "ceo": "Mr. Timothy D. Cook",
  "businessSummary": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide. The company offers iPhone, a line of smartphones; Mac, a line of personal computers…",
  "revenue": 466822987776,
  "ebitda": 167959003136,
  "grossProfits": 227123003392,
  "freeCashflow": 107721875456,
  "operatingCashflow": 146723995648,
  "totalCash": 62399000576,
  "totalDebt": 84343996416,
  "debtToEquity": 78.445,
  "profitMargins": 0.27618998,
  "grossMargins": 0.48653,
  "operatingMargins": 0.32623002,
  "returnOnEquity": 1.4875101,
  "revenueGrowth": 0.164,
  "earningsGrowth": 0.287,
  "revenuePerShare": 31.707,
  "targetMeanPrice": 322.2844,
  "targetHighPrice": 400,
  "targetLowPrice": 215,
  "recommendationKey": "buy",
  "numberOfAnalystOpinions": 41,
  "enterpriseValue": 4486742409216,
  "pegRatio": 2.49,
  "beta": 1.086,
  "heldPercentInstitutions": 0.66814005,
  "dividendRate": 1.08,
  "nextEarningsDate": "2026-10-29T20:00:00.000Z",
  "exDividendDate": "2026-08-10T00:00:00.000Z",
  "dividendDate": "2026-08-13T00:00:00.000Z",
  "observedAt": "2026-08-15T14:04:38.250Z",
  "error": null
}
```

The most complete Yahoo Finance scraper available. It returns every field the Yahoo Finance quote and profile expose for each symbol - live price, 52-week and moving-average stats, valuation and analyst targets, full financials (revenue, EBITDA, margins, cash flow), company profile and contacts, and crypto supply metrics - and can attach an OHLCV price-history series over any range. Works for stocks, ETFs, crypto, indices and currency pairs.

**📥 [Input](https://apify.com/scrapers_lat/yahoo-finance-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/yahoo-finance-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/yahoo-finance-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/yahoo-finance-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Global-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor looks up each ticker symbol you pass on Yahoo Finance, merges the live quote, the valuation and financial statistics, and the company profile into one normalized record, and writes one record per symbol to the run's dataset. When a `range` is set, it also attaches an OHLCV `history` array (open, high, low, close, adjusted close, volume per candle) over that range and interval.

Symbols work for stocks and ETFs (`AAPL`, `SPY`), crypto (`BTC-USD`), indices (`^GSPC`) and currency pairs (`EURUSD=X`). Fields that do not apply to an instrument (for example `trailingPE` on crypto, or `circulatingSupply` on a stock) are returned as `null`, never invented.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns live quotes for four symbols.

```json
{
  "symbols": ["AAPL", "MSFT", "BTC-USD", "ETH-USD"],
  "maxQuotes": 10
}
```

Leave `range` empty for the live quote only (faster). Set it (for example `5d`, `1y`, `max`) to attach a price-history series to each record.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `symbols` | string\[] | yes | (none) | Ticker symbols to look up. Stocks/ETFs (`AAPL`, `SPY`), crypto (`BTC-USD`), indices (`^GSPC`), FX pairs (`EURUSD=X`). |
| `maxQuotes` | integer | no | `10` | Maximum number of symbols to process. Free Apify plans are capped at 10 per run. |
| `range` | enum | no | (empty) | Attach an OHLCV history array over this range: `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`. Empty means quote only. |
| `interval` | enum | no | `1d` | Candle interval for the history array: `1m`, `5m`, `15m`, `30m`, `1h`, `1d`, `1wk`, `1mo`. Intraday intervals work only for short ranges. |

### Output reference

One dataset item per symbol. Types: `string`, `number`, `integer`, `object[]`, or `null` when the value does not apply to the instrument. Selected fields:

| Field | Type | Description |
|---|---|---|
| `imageUrl` | string | Logo image (crypto), else `null`. |
| `symbol` | string | The ticker symbol. |
| `name` | string | Instrument or company name. |
| `type` / `quoteType` | string | Instrument type, for example `equity`/`Equity`, `crypto`/`Cryptocurrency`. |
| `currency` | string | Quote currency. |
| `exchange` | string | Exchange code, for example `NasdaqGS`, `CCC`. |
| `marketState` | string | `REGULAR`, `CLOSED`, `PRE`, `POST`. |
| `price` | number | Latest price. |
| `change` / `changePercent` | number | Absolute and percent change on the day. |
| `previousClose` / `open` / `dayHigh` / `dayLow` | number | Session price points. |
| `volume` | integer | Session volume. |
| `marketCap` | integer | Market capitalization. |
| `fiftyTwoWeekHigh` / `fiftyTwoWeekLow` / `fiftyTwoWeekChangePercent` | number | 52-week range and change. |
| `fiftyDayAverage` / `twoHundredDayAverage` | number | Moving averages. |
| `trailingPE` / `forwardPE` / `pegRatio` / `priceToBook` / `beta` | number | Valuation ratios (stocks). |
| `epsTrailingTwelveMonths` / `bookValue` / `revenuePerShare` | number | Per-share metrics. |
| `dividendYield` / `dividendRate` / `exDividendDate` / `dividendDate` | mixed | Dividend metrics and dates. |
| `sharesOutstanding` / `enterpriseValue` / `heldPercentInstitutions` | number | Ownership and size metrics. |
| `averageAnalystRating` / `recommendationKey` / `numberOfAnalystOpinions` | mixed | Analyst consensus. |
| `targetMeanPrice` / `targetHighPrice` / `targetLowPrice` | number | Analyst price targets. |
| `postMarketPrice` / `postMarketChange` / `postMarketChangePercent` | number | Post-market quote (stocks). |
| `circulatingSupply` / `maxSupply` / `volume24Hr` | number | Crypto supply and 24h volume. |
| `marketTime` | string | Timestamp of the quote (ISO 8601). |
| `sector` / `industry` | string | Company classification (stocks). |
| `website` / `phone` / `address` / `city` / `state` / `zip` / `country` | string | Company profile and contacts. |
| `employees` | integer | Full-time employees. |
| `ceo` | string | Chief executive name. |
| `businessSummary` | string | Full company description. |
| `revenue` / `ebitda` / `grossProfits` / `freeCashflow` / `operatingCashflow` / `totalCash` / `totalDebt` | integer | Financial statement figures. |
| `debtToEquity` / `profitMargins` / `grossMargins` / `operatingMargins` / `returnOnEquity` / `revenueGrowth` / `earningsGrowth` | number | Financial ratios. |
| `nextEarningsDate` | string | Next earnings date (ISO 8601). |
| `history` | object\[] | Present only when `range` is set. Each candle has `date`, `open`, `high`, `low`, `close`, `adjClose`, `volume`. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | `null` on success. A symbol that cannot be resolved is written with a populated `error` field. |

### Example output record

Real record from a live run (`BTC-USD`, crypto; `businessSummary` omitted where the source has none):

```json
{
  "imageUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/1.png",
  "symbol": "BTC-USD",
  "name": "Bitcoin USD",
  "type": "crypto",
  "quoteType": "Cryptocurrency",
  "currency": "USD",
  "exchange": "CCC",
  "marketState": "REGULAR",
  "price": 62964.66,
  "change": 425.28125,
  "changePercent": 0.68,
  "previousClose": 62977.613,
  "open": 62977.613,
  "dayHigh": 63086.355,
  "dayLow": 62855.867,
  "volume": 14407153664,
  "marketCap": 1264004497408,
  "fiftyTwoWeekHigh": 126198.07,
  "fiftyTwoWeekLow": 57747.766,
  "fiftyTwoWeekChangePercent": -46.4,
  "fiftyDayAverage": 63450.777,
  "twoHundredDayAverage": 69501.58,
  "trailingPE": null,
  "forwardPE": null,
  "circulatingSupply": 20070534,
  "maxSupply": 21000000,
  "volume24Hr": 14407153664,
  "marketTime": "2026-08-15T14:04:30.000Z",
  "sector": null,
  "industry": null,
  "website": "https://bitcoin.org/",
  "observedAt": "2026-08-15T14:04:30.000Z",
  "error": null
}
```

When a `range` is set, each record also carries a `history` array, for example one candle: `{"date":"2026-08-10T13:30:00.000Z","open":503.440002,"high":513.72998,"low":502.269989,"close":506.059998,"adjClose":506.059998,"volume":31206100}`.

### Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~yahoo-finance-scraper/run-sync-get-dataset-items?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"symbols":["AAPL","MSFT","TSLA"],"range":"1y","interval":"1d"}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~yahoo-finance-scraper/runs?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"symbols":["BTC-USD","ETH-USD"]}'
```

Apify CLI:

```bash
apify call scrapers_lat/yahoo-finance-scraper \
  --input '{"symbols":["^GSPC","EURUSD=X"]}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** You are charged per symbol record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/yahoo-finance-scraper/pricing) for the current per-result price.
- **No charge on failure.** A symbol that cannot be resolved is written with a populated `error` field and is not charged. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 records per run. Upgrade for higher `maxQuotes`.

### FAQ and troubleshooting

**A symbol came back with an `error`. Why?**
The ticker did not resolve on Yahoo Finance. Check the exact symbol format (crypto uses `-USD`, indices start with `^`, FX ends with `=X`). Records with an error are not charged.

**Why are so many fields null on crypto or an index?**
Valuation ratios, financials and company profile do not apply to crypto, indices or FX. They are returned as `null`, never invented; crypto instead carries `circulatingSupply`, `maxSupply` and `volume24Hr`.

**How do I get price history?**
Set `range` (for example `1y`) and optionally `interval`. Each record then includes a `history` array of OHLCV candles. Intraday intervals only work for short ranges.

**How many symbols can I look up at once?**
As many as you pass in `symbols`, up to `maxQuotes`. Free Apify plans are capped at 10 per run.

**Is this an official Yahoo tool?**
No. This actor is independent and has no affiliation with Yahoo. It reads only publicly available Yahoo Finance data.

### Related scrapers

- [World Bank Indicators Scraper](https://apify.com/scrapers_lat/world-bank-indicators-scraper): World Bank development indicators for every country and year.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Yahoo. Accesses only publicly available Yahoo Finance data.

# Actor input Schema

## `maxQuotes` (type: `integer`):

Maximum number of quotes (symbols) to process. Optional.

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

Ticker symbols to look up. Works for stocks and ETFs (AAPL, MSFT, TSLA, SPY), crypto (BTC-USD, ETH-USD), indices (^GSPC) and currency pairs (EURUSD=X).

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

Include an OHLCV price-history array for each symbol over this time range. Leave empty to fetch the live quote only (faster).

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

Candle interval for the price-history array (only used when a history range is selected). Intraday intervals (1m to 1h) are only available for short ranges.

## Actor input object example

```json
{
  "maxQuotes": 10,
  "symbols": [
    "AAPL",
    "MSFT",
    "BTC-USD",
    "ETH-USD"
  ],
  "range": "",
  "interval": "1d"
}
```

# 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 = {
    "maxQuotes": 10,
    "symbols": [
        "AAPL",
        "MSFT",
        "BTC-USD",
        "ETH-USD"
    ]
};

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

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

```

## MCP server setup

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