# Yahoo Finance Stock Quotes & Price History (`datalantern/yahoo-finance`) Actor

Get Yahoo Finance stock, ETF, index, currency and crypto quotes with company profile, valuation and analyst data, plus daily or intraday price history, as clean tables.

- **URL**: https://apify.com/datalantern/yahoo-finance.md
- **Developed by:** [Data Lantern](https://apify.com/datalantern) (community)
- **Categories:** Other, Automation, Developer tools
- **Stats:** 1 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?

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 Stock Quotes & Price History

**Yahoo Finance Stock Quotes & Price History** turns a list of tickers into clean tables: a **quote** row per symbol (price, day range, volume, market cap, P/E, dividend yield, 52-week range, analyst rating and price target, sector, industry, website, business summary) or a **price history** row per day or intraday bar (open, high, low, close, adjusted close, volume). It works for stocks, ETFs, indexes, currencies and crypto. Download as CSV, Excel or JSON, or pull it through the API for dashboards, spreadsheets, backtests and research.

### What can this tool do?

- Get a snapshot for any number of symbols: US and international stocks (`AAPL`, `SAP.DE`, `7203.T`), ETFs (`SPY`), indexes (`^GSPC`), currencies (`EURUSD=X`) and crypto (`BTC-USD`).
- Add valuation and company data to each stock: market cap, trailing and forward P/E, EPS, beta, dividend rate and yield, revenue, EBITDA, free cash flow, margins, employees.
- Include the analyst view: consensus rating, number of analysts and mean price target.
- Download price history for a range (`1d` to `max`) or for exact start and end dates, with intervals from 1 minute to 3 months.
- Paste tickers or Yahoo Finance links; unknown symbols are reported in the log and not charged.

### What data does it return?

**Quotes** (one row per symbol). Example values from a real run:

| Field | Example |
|---|---|
| `symbol` | BRK-B |
| `companyName` | Berkshire Hathaway Inc. |
| `quoteType` | EQUITY |
| `exchange` | NYSE |
| `currency` | USD |
| `price` / `change` / `changePercent` | 500.27 / -2.08 / -0.4141 |
| `previousClose`, `open`, `dayLow`, `dayHigh` | 502.35, 501.43, 499.08, 502.12 |
| `volume` / `averageVolume` | 1356793 / 4279782 |
| `marketCap` | 1070932819968 |
| `fiftyTwoWeekLow` / `fiftyTwoWeekHigh` | 464.01 / 537.74 |
| `trailingPE` / `forwardPE` / `trailingEps` | 12.5728 / 22.5423 / 39.79 |
| `beta` | 0.603 |
| `dividendRate`, `dividendYieldPercent`, `exDividendDate` | null for Berkshire |
| `revenue`, `ebitda`, `freeCashflow` | 384687013888, 130683002880, 71975247872 |
| `profitMarginPercent`, `returnOnEquityPercent` | 22.296, 12.12 |
| `analystRating`, `analystCount`, `targetMeanPrice` | buy, 3, 547.6667 |
| `sector`, `industry` | Financial Services, Insurance - Diversified |
| `country`, `city`, `website`, `employees` | United States, Omaha, https://www.berkshirehathaway.com, 387800 |
| `businessSummary` | Berkshire Hathaway Inc., together with its subsidiaries… |
| `priceAsOf` | 2026-09-30T15:54:26.000Z |
| `url` | https://finance.yahoo.com/quote/BRK-B/ |

**Price history** (one row per bar): `symbol`, `currency`, `interval`, `date` (exchange-local date; date and time for intraday bars), `timestamp` (UTC), `open`, `high`, `low`, `close`, `adjClose`, `volume`.

- Missing values are `null`, so every row of a table has the same fields. ETFs, indexes, currencies and crypto have fewer fields than stocks (for example no P/E or sector).
- Prices are what Yahoo Finance shows and can be delayed by up to 15 minutes depending on the exchange. In price history, `close`, `open`, `high`, `low` and `volume` are adjusted for stock splits (Tesla's 2020 prices are divided by 3), and `adjClose` is also adjusted for dividends. `changePercent` and the margin, yield and return fields are percentages (2.7 means 2.7%).

### How to use it

1. Enter symbols, one per line (`AAPL`, `MSFT`, `^GSPC`, `BTC-USD`) or paste Yahoo Finance links.
2. Choose **Quotes** or **Price history**. For history, pick a range or start and end dates, and the bar size.
3. Click **Start**, then download the data as CSV, Excel or JSON, or read it through the API. Run the tool twice to get both tables.

### Pricing

Pay per result: **$1.00 per 1,000 quotes** or **$0.30 per 1,000 price bars**, plus $0.005 per run. You only pay for rows you receive. Set a maximum cost per run in the run options.

### Use it through the API, AI agents, and integrations

Schedule it to refresh a watchlist every morning, call it from your code with the Apify API, or connect it to Make, Zapier, n8n, Google Sheets or an AI agent through Apify's MCP server.

### Is it legal?

This tool reads publicly visible market data from Yahoo Finance pages without logging in or bypassing access controls. It outputs data about securities and companies only. No personal data is collected; the names of company officers shown on Yahoo pages are ignored. Yahoo Finance's data is for personal and informational use and is not investment advice; check Yahoo's terms and your exchange's data rules before redistributing it. You are responsible for how you use the data.

### FAQ

**Why did a symbol return no data?** The ticker may not exist on Yahoo Finance. Check it on finance.yahoo.com; international tickers need their suffix (`SAP.DE`, `HSBA.L`, `7203.T`).

**Why do minute bars fail for old dates?** Yahoo only keeps 1-minute bars for about the last 7 days and other intraday bars for about 60 days.

**Are prices real-time?** No. They match Yahoo Finance's public pages and are delayed for many exchanges.

### Feedback

Found a bug or need a field added? Open an issue on the **Issues** tab. We usually respond within 24 hours.

# Actor input Schema

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

One per line: a ticker such as AAPL, BRK-B, ^GSPC (S\&P 500), EURUSD=X or BTC-USD, or a finance.yahoo.com/quote link.

## `dataType` (type: `string`):

Quotes: one row per symbol with price, valuation and company profile. History: one row per price bar (run twice to get both).

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

How far back the price history goes. Ignored when a start date is set. Intraday intervals (1m to 90m) only work for recent ranges (1d to 1mo).

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

Size of each price bar.

## `startDate` (type: `string`):

Optional, YYYY-MM-DD. Overrides the range.

## `endDate` (type: `string`):

Optional, YYYY-MM-DD. Defaults to today.

## `maxBarsPerSymbol` (type: `integer`):

0 means all bars in the range.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "TSLA"
  ],
  "dataType": "quotes",
  "range": "1mo",
  "interval": "1d",
  "maxBarsPerSymbol": 0
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("datalantern/yahoo-finance").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",
        "TSLA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("datalantern/yahoo-finance").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",
    "MSFT",
    "TSLA"
  ]
}' |
apify call datalantern/yahoo-finance --silent --output-dataset

```

## MCP server setup

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

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/NyPofsD2a7mmMIA5j/builds/Sedfg5L6fiPKJSUfT/openapi.json
