# Yahoo Finance Stock Market Data - Prices (`pink_comic/yahoo-finance-stock-data`) Actor

Stock data and market data from Yahoo Finance. Historical OHLCV prices, real-time quotes, 52-week ranges, dividends, and company financials for any ticker. Multiple symbols per run, configurable date ranges. Structured JSON for fintech apps and trading analysis. No API key required. Pay per result.

- **URL**: https://apify.com/pink\_comic/yahoo-finance-stock-data.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 7 total users, 4 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Data - Historical Prices, OHLCV, Market Data for Any Ticker

Get historical stock price data from Yahoo Finance for any publicly traded company, ETF, index, cryptocurrency, or forex pair. Enter ticker symbols and get structured OHLCV (Open, High, Low, Close, Volume) data with configurable date ranges and intervals.

Covers all markets available on Yahoo Finance: NYSE, NASDAQ, international exchanges, cryptocurrencies (BTC-USD), forex (EURUSD=X), commodities (GC=F), ETFs, mutual funds, and market indices (^SPX, ^DJI).

### What data do you get?

| Field | Description | Coverage |
|-------|-------------|----------|
| Symbol | Ticker symbol | 100% |
| Company name | Short and long company name | 100% |
| Currency | Trading currency (USD, EUR, GBP, etc.) | 100% |
| Exchange | Exchange name (NMS, NYQ, etc.) | 100% |
| Current price | Regular market price | 100% |
| Previous close | Previous trading day close | 100% |
| 52-week high/low | Yearly price range | 100% |
| Date | Trading date/time for each data point | 100% |
| Open | Opening price | 100% |
| High | Highest price | 100% |
| Low | Lowest price | 100% |
| Close | Closing price | 100% |
| Volume | Trading volume | 100% |

### Use cases

- **Investment research** -- Analyze price trends, volatility, and trading patterns for any stock
- **Quantitative analysis** -- Feed OHLCV data into algorithmic trading models and backtesting systems
- **Portfolio tracking** -- Monitor multiple stocks, ETFs, and crypto positions
- **Financial reporting** -- Historical price data for valuations, audits, and compliance
- **Academic research** -- Bulk price data for finance and economics research
- **Market screening** -- Compare price performance across sectors and indices

### How to use

1. Enter one or more ticker symbols (e.g., AAPL, MSFT, BTC-USD)
2. Choose a date range (1 day to max history) and data interval (1 minute to 3 months)
3. Run the actor and get structured JSON with full OHLCV price history

No API key needed. No proxies required.

### Pricing

**Free to try** -- every Apify account includes $5/month in free platform credits.

$0.002 per result. Example costs:

| Results | Cost |
|---------|------|
| 10 stocks | $0.07 |
| 50 stocks | $0.15 |
| 100 stocks | $0.25 |
| 500 stocks | $1.05 |

You only pay per symbol returned, regardless of how many data points are in the history. No monthly fees, no minimums.

### Input examples

#### Get daily prices for major tech stocks

```json
{
    "symbols": ["AAPL", "MSFT", "GOOGL", "AMZN", "NVDA"],
    "dateRange": "3mo",
    "interval": "1d"
}
````

#### Get 5-year weekly data for an ETF

```json
{
    "symbols": ["SPY"],
    "dateRange": "5y",
    "interval": "1wk"
}
```

#### Cryptocurrency daily prices

```json
{
    "symbols": ["BTC-USD", "ETH-USD", "SOL-USD"],
    "dateRange": "1y",
    "interval": "1d"
}
```

#### Intraday data (5-minute bars)

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

#### Market indices

```json
{
    "symbols": ["^GSPC", "^DJI", "^IXIC", "^RUT"],
    "dateRange": "1mo",
    "interval": "1d"
}
```

### Output example

```json
{
    "symbol": "AAPL",
    "shortName": "Apple Inc.",
    "currency": "USD",
    "exchange": "NMS",
    "exchangeName": "NasdaqGS",
    "instrumentType": "EQUITY",
    "regularMarketPrice": 246.63,
    "previousClose": 247.10,
    "fiftyTwoWeekHigh": 260.10,
    "fiftyTwoWeekLow": 169.21,
    "dataGranularity": "1d",
    "dateRange": "1mo",
    "timezone": "America/New_York",
    "totalDataPoints": 21,
    "priceHistory": [
        {
            "date": "2026-03-02",
            "open": 243.07,
            "high": 248.21,
            "low": 241.88,
            "close": 247.10,
            "volume": 42150600
        }
    ]
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `symbols` | string\[] | `[]` | Ticker symbols to fetch. Supports stocks (AAPL), ETFs (SPY), crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC), commodities (GC=F). |
| `dateRange` | string | `"1mo"` | Date range for historical data. Options: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. |
| `interval` | string | `"1d"` | Data point interval. Options: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Intraday intervals only work with short date ranges (1d-5d). |
| `maxResults` | integer | `50` | Maximum number of symbols to process. |

### Supported date range and interval combinations

| Date Range | Compatible Intervals |
|------------|---------------------|
| 1d, 5d | 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d |
| 1mo | 5m, 15m, 30m, 60m, 90m, 1h, 1d, 1wk |
| 3mo, 6mo | 1d, 5d, 1wk, 1mo |
| 1y, 2y, 5y, 10y, ytd, max | 1d, 5d, 1wk, 1mo, 3mo |

### Pricing

This actor uses pay-per-result pricing on the Apify platform:

- **Per result:** $0.002 per symbol (includes full price history for that symbol)
- **Platform fee:** $0.05 per actor start

**Example:** Fetching 3-month daily data for 10 stocks costs approximately $0.07 (10 results x $0.002 + $0.05 start fee).

### Data source

Data comes from Yahoo Finance. Covers all publicly traded securities on global exchanges. Historical data availability varies by security type:

- US stocks: typically back to 1980s
- International stocks: varies by exchange
- Crypto: from listing date
- ETFs: from inception date

### FAQ

**Is this legal?**
Yes. Yahoo Finance data is publicly available on the web. This actor accesses the same data available to any browser visitor.

**Do I need an API key?**
No. No authentication required.

**How fast is it?**
A single stock with 1 year of daily data completes in under 2 seconds. Multiple symbols are processed with rate limiting for reliability.

**Can I get real-time data?**
The actor returns the most recent price in the `regularMarketPrice` field. For intraday data, use a short date range (1d) with minute intervals (1m, 5m).

**What about after-hours data?**
Pre/post-market data is not included. Only regular market session data.

**Can I get fundamental data (P/E, revenue, etc.)?**
This actor focuses on price/volume data. For fundamental company data, use our [SEC EDGAR Company Filings](https://apify.com/pink_comic/sec-edgar-company-filings) actor.

### Integrations

Export results to any downstream system:

- **Trading platforms** -- Feed OHLCV data into backtesting and analysis tools
- **Google Sheets / Excel** -- Direct export for financial modeling
- **Zapier / Make** -- Trigger workflows on price data
- **Webhooks** -- Push to your own API or database
- **Manual export** -- Download as CSV, JSON, or Excel from the Apify Console

### Support

Found a bug or have a feature request? Open an issue on the actor page or contact us through the Apify platform.

### More Public Data Tools

This actor is part of a collection of 59 public data scrapers. All on Apify:

- [SEC EDGAR Company Filings](https://apify.com/pink_comic/sec-edgar-company-filings) -- 10-K, 10-Q, 8-K, insider trading for all public companies
- [SEC Insider Trading Tracker](https://apify.com/pink_comic/sec-insider-trading-tracker) -- Form 4 filings, insider buys/sells
- [FEC Campaign Finance](https://apify.com/pink_comic/fec-campaign-finance-search) -- 50M+ individual donations, PACs, candidate fundraising
- [WHOIS Domain Lookup](https://apify.com/pink_comic/whois-domain-lookup) -- Domain registration, expiry, registrar info
- [YellowPages Scraper](https://apify.com/pink_comic/yellowpages-scraper) -- US business leads with emails

**[See all 59 actors](https://apify.com/pink_comic)**

# Actor input Schema

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

Stock ticker symbols to fetch. Supports stocks (AAPL), ETFs (SPY), crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC), commodities (GC=F).

## `dateRange` (type: `string`):

How far back to get data. Options: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.

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

Time between data points. Intraday intervals (1m-1h) only work with short date ranges (1d-5d).

## `maxResults` (type: `integer`):

Maximum number of symbols to process.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "GOOGL"
  ],
  "dateRange": "3mo",
  "interval": "1d",
  "maxResults": 50
}
```

# 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",
        "GOOGL"
    ],
    "dateRange": "3mo",
    "interval": "1d",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/yahoo-finance-stock-data").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",
        "GOOGL",
    ],
    "dateRange": "3mo",
    "interval": "1d",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/yahoo-finance-stock-data").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",
    "GOOGL"
  ],
  "dateRange": "3mo",
  "interval": "1d",
  "maxResults": 50
}' |
apify call pink_comic/yahoo-finance-stock-data --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yahoo Finance Stock Market Data - Prices",
        "description": "Stock data and market data from Yahoo Finance. Historical OHLCV prices, real-time quotes, 52-week ranges, dividends, and company financials for any ticker. Multiple symbols per run, configurable date ranges. Structured JSON for fintech apps and trading analysis. No API key required. Pay per result.",
        "version": "0.1",
        "x-build-id": "AI6AqMNhmfLAlL98B"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pink_comic~yahoo-finance-stock-data/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pink_comic-yahoo-finance-stock-data",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/pink_comic~yahoo-finance-stock-data/runs": {
            "post": {
                "operationId": "runs-sync-pink_comic-yahoo-finance-stock-data",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/pink_comic~yahoo-finance-stock-data/run-sync": {
            "post": {
                "operationId": "run-sync-pink_comic-yahoo-finance-stock-data",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "symbols": {
                        "title": "Ticker Symbols",
                        "type": "array",
                        "description": "Stock ticker symbols to fetch. Supports stocks (AAPL), ETFs (SPY), crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC), commodities (GC=F).",
                        "default": [
                            "AAPL"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "dateRange": {
                        "title": "Date Range",
                        "enum": [
                            "1d",
                            "5d",
                            "1mo",
                            "3mo",
                            "6mo",
                            "1y",
                            "2y",
                            "5y",
                            "10y",
                            "ytd",
                            "max"
                        ],
                        "type": "string",
                        "description": "How far back to get data. Options: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.",
                        "default": "1mo"
                    },
                    "interval": {
                        "title": "Data Interval",
                        "enum": [
                            "1m",
                            "5m",
                            "15m",
                            "30m",
                            "1h",
                            "1d",
                            "1wk",
                            "1mo"
                        ],
                        "type": "string",
                        "description": "Time between data points. Intraday intervals (1m-1h) only work with short date ranges (1d-5d).",
                        "default": "1d"
                    },
                    "maxResults": {
                        "title": "Max Symbols",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of symbols to process.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
