# Yahoo Finance API: Stocks, Fundamentals, Technicals & Alerts (`pikoulas/yahoo-finance`) Actor

Yahoo Finance quotes for stocks, ETFs, crypto and indices with flat P/E, yields, margins, analyst upside and earnings dates; RSI, moving averages, returns and drawdown; screen by your own filters; and alerts on moves, new highs and analyst actions. History and financials too. No API key.

- **URL**: https://apify.com/pikoulas/yahoo-finance.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (community)
- **Categories:** Automation, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 symbols

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?

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 API: Stocks, Fundamentals, Technicals & Alerts

Yahoo Finance data as clean JSON for stocks, ETFs, funds, crypto, indices and currencies around the
world, with the numbers people look for in flat columns, ready for a sheet, a screen or an AI agent.

- **Fundamentals, flat:** P/E and forward P/E, PEG, price to book and sales, EV/EBITDA, dividend
  yield and payout, margins, return on equity, debt to equity, revenue and earnings growth, free
  cash flow yield, short interest, analyst target, upside and rating, and the next earnings date.
- **Technicals:** returns over a week, a month, 3, 6 and 12 months and year to date, 50- and 200-day
  averages with golden and death crosses, 30-day volatility, the year's largest drawdown and the
  14-day RSI.
- **Your own screen:** Yahoo's ready-made screeners (day gainers, most active, undervalued large
  caps and more) or your list, filtered by market cap, P/E, dividend yield and analyst upside;
  symbols that miss aren't charged.
- **Alerts:** with **Alerts: compare with the last run**, each symbol carries its change since the
  last run and the analyst upgrades, downgrades and target changes since. Signals name what stands
  out (a move past your threshold, a 52-week high or low, earnings this week, an overbought or
  oversold RSI, a cross), and **Only symbols with a signal** gives just those.
- **And the rest:** live quotes, key statistics, company profiles, price history with dividends and
  splits, and annual and quarterly financial statements.

Look symbols up as `AAPL`, `VOD.L`, `7203.T`, `SPY`, `BTC-USD`, `^GSPC` or `EURUSD=X`, or by
company name. No login and no API key needed. It costs **$1 per 1,000 symbols** on Apify's paid
plans ($2 on the free plan), with technicals, history and financial statements included.

### What people use it for

- **Watchlist alerts:** a daily run over your watchlist, with only the symbols that moved, hit a
  high or low, got an analyst action or report soon, into Slack or email through Apify's integrations.
- **Stock screening:** dividend payers under a P/E, or large caps analysts see 20% upside in.
- **Portfolio tracking:** prices, valuation and technicals on a schedule, in a sheet or a database.
- **Backtesting and models:** daily, weekly or monthly price history, adjusted closes, dividends and splits.
- **AI agents and dashboards:** market data on demand, through the API or an MCP tool.

### How to scrape Yahoo Finance

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter **symbols**, **company names** or pick a **screener**, and any filters.
3. Turn on **technicals**, **price history**, **financial statements** or **alerts** if you want them.
4. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through
   the API.

```json
{
  "symbols": ["AAPL", "MSFT", "KO", "BTC-USD"],
  "screeners": ["undervalued_large_caps"],
  "maxPerScreener": 50,
  "includeTechnicals": true,
  "maxPeRatio": 25,
  "minTargetUpside": 10,
  "trackChanges": true,
  "memory": "my-watchlist",
  "alertMovePercent": 5,
  "onlyAlerts": false
}
```

### Output

Every result has the flat figures below, then Yahoo's own sections (`quote`, `summary`,
`keyStatistics`, `financialData` and more, dozens of fields each); `history`, `dividends`, `splits`
and `financials` come when asked for. Margins, growth and yields are fractions (0.0032 is 0.32%);
returns, upside and changes are percent.

```json
{
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "type": "EQUITY",
  "exchange": "NasdaqGS",
  "currency": "USD",
  "price": 342.56,
  "marketCap": 4978144444416,
  "sector": "Technology",
  "peRatio": 38.15,
  "forwardPE": 32.4,
  "pegRatio": 2.82,
  "priceToBook": 44.41,
  "priceToSales": 10.4,
  "evToEbitda": 29.25,
  "dividendYield": 0.0032,
  "payoutRatio": 0.118,
  "beta": 1.089,
  "grossMargin": 0.48786,
  "operatingMargin": 0.3301,
  "profitMargin": 0.27604,
  "returnOnEquity": 1.42257,
  "debtToEquity": 84.286,
  "revenueGrowth": 0.117,
  "earningsGrowth": 0.141,
  "freeCashflowYield": 0.0212,
  "shortPercentOfFloat": 0.01,
  "fiftyTwoWeekHigh": 360.83,
  "fiftyTwoWeekLow": 243.42,
  "fromFiftyTwoWeekHighPercent": -5.06,
  "analystTarget": 345.63,
  "targetUpsidePercent": 0.9,
  "recommendation": "buy",
  "analystCount": 39,
  "buyRatings": 26,
  "sellRatings": 6,
  "nextEarningsDate": "2027-01-28",
  "daysToEarnings": 68,
  "return1w": -3.85,
  "return1m": -1.55,
  "return3m": 10.47,
  "return6m": 11.11,
  "return1y": 26.62,
  "returnYtd": 26.45,
  "sma50": 341.585,
  "sma200": 302.7858,
  "recentCross": null,
  "volatility30d": 23.85,
  "maxDrawdown1y": -13.8,
  "rsi14": 46.6,
  "priceLastRun": 342.56,
  "changeSinceLastRun": 0.0,
  "lastCheckedAt": "2026-11-21T13:46:19.690086+00:00",
  "newAnalystActions": [],
  "signals": [],
  "url": "https://finance.yahoo.com/quote/AAPL/"
}
```

The technicals come with **Include technicals**, and `priceLastRun` to `newAnalystActions` with
alerts. A signal reads like `"52-week high"`, `"earnings in 3 days"`, `"RSI 15.0: oversold"`,
`"golden cross"`, `"down 7.4% since the last run"` or `"Bernstein: main to Buy, target 380.0"`.

The rest of a result, shortened:

```json
{
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "type": "EQUITY",
  "exchange": "NasdaqGS",
  "currency": "USD",
  "price": 349.51,
  "change": 17.61,
  "changePercent": 0.0530582,
  "open": 333.5,
  "dayHigh": 351.2,
  "dayLow": 332.8,
  "previousClose": 331.9,
  "volume": 91234567,
  "marketCap": 5150000000000,
  "marketState": "POST",
  "priceTime": "2026-11-04T21:00:01Z",
  "delayMinutes": 0,
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "website": "https://www.apple.com",
  "url": "https://finance.yahoo.com/quote/AAPL/",
  "profile": {"city": "Cupertino", "country": "United States", "longBusinessSummary": "Apple Inc. designs, manufactures..."},
  "keyStatistics": {"forwardPE": 32.82, "profitMargins": 0.27604, "floatShares": 14507263515},
  "financialData": {"targetMeanPrice": 333.28, "recommendationKey": "buy", "numberOfAnalystOpinions": 38},
  "recommendationTrend": {"trend": [{"period": "0m", "strongBuy": 6, "buy": 18, "hold": 13, "sell": 3, "strongSell": 3}]},
  "history": [{"date": "2026-11-04", "open": 333.5, "high": 351.2, "low": 332.8, "close": 349.51, "adjClose": 349.51, "volume": 91234567}],
  "dividends": [{"date": "2026-08-11", "amount": 0.27}],
  "splits": [],
  "financials": {
    "annual": [{"date": "2026-09-30", "currency": "USD", "totalRevenue": 435000000000, "netIncome": 112000000000, "freeCashFlow": 105000000000}],
    "quarterly": [{"date": "2026-09-30", "currency": "USD", "totalRevenue": 102000000000, "netIncome": 27000000000}]
  }
}
```

ETFs and funds also have `fundProfile`, `fundPerformance` and `topHoldings`. A symbol Yahoo doesn't
have comes back with an `error` and is free.

### Use it as an API

Apify's API starts a run and returns its dataset as JSON; its Python and JavaScript clients, and
its Make, Zapier and n8n integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/pikoulas~yahoo-finance/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"symbols": ["AAPL", "MSFT"], "includeTechnicals": true, "maxPeRatio": 40}'
```

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/yahoo-finance`.

### How much does it cost to scrape Yahoo Finance?

**$0.001 per symbol** on Apify's paid plans, which is $1 per 1,000, and $0.002 on the free plan,
technicals, history and financial statements included. Symbols left out by a filter or by **Only
symbols with a signal** aren't charged. There is no proxy charge and no monthly fee. The run stops
at the spending limit you set.

### Good to know

- Prices can be delayed by the exchange: `delayMinutes` says by how much.
- Which sections a result has depends on the symbol: an index or a currency has no financial statements.
- Technicals use a year of daily prices, adjusted for dividends and splits; a symbol listed for less
  has only the returns its history covers.
- An analyst action is `up`, `down`, `main` (rating kept, often with a new target), `init` or `reit`,
  as Yahoo names them; the firms are the brokers' names.
- Options chains and news aren't included.
- If Yahoo shows a verification, consent or sign-in page, the run stops, keeps what it already has and
  says so in the log. It doesn't try to get past these pages.

### FAQ

#### Is it legal to scrape Yahoo Finance?

It reads only pages and data that Yahoo Finance publishes for anyone, without logging in. [Yahoo's terms](https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html) prohibit this, and your use of it is your own responsibility. Market data generally belongs to the exchanges and data
providers that license it, so using it commercially or republishing it may need their permission. If
you're unsure, ask a lawyer; Apify's [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)
is a good start.

#### Is this investment advice?

No. The data comes as Yahoo Finance shows it, and may be delayed or wrong; don't rely on it alone for
a financial decision.

Not affiliated with Yahoo; its name is a trademark of its owner.

#### How do I get stock price alerts?

Give your watchlist as symbols, turn on **Alerts: compare with the last run** with a memory name and
**Only symbols with a signal**, and schedule the run daily. Each run gives only the symbols that moved
by your **Alert move** or more, hit a 52-week high or low, report earnings soon, or got an analyst
action, each with its signals.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

If it does what you need, a review on the **Reviews** tab helps others find it.

# Actor input Schema

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

Yahoo Finance symbols: AAPL for a stock, VOD.L or 7203.T abroad, SPY for an ETF, BTC-USD for crypto, ^GSPC for an index, EURUSD=X for a currency.

## `companyNames` (type: `array`):

Names to look up when you don't have the symbol: each gives Yahoo's first match.

## `screeners` (type: `array`):

Yahoo's ready-made lists: every stock on them, as with a symbol.

## `maxPerScreener` (type: `integer`):

Stocks from each screener.

## `includeTechnicals` (type: `boolean`):

Returns over a week to a year and year to date, 50- and 200-day averages and their crossings, 30-day volatility, the year's largest drawdown and the 14-day RSI, from a year of daily prices. No extra charge.

## `minMarketCap` (type: `integer`):

Leaves out (and doesn't charge) symbols below it, in their own currency.

## `maxPeRatio` (type: `number`):

Leaves out symbols with a higher trailing P/E, or none.

## `minDividendYield` (type: `number`):

Leaves out symbols yielding less, in percent: 3 for 3%.

## `minTargetUpside` (type: `number`):

Leaves out symbols whose mean analyst target is less than this far above the price, in percent.

## `includeHistory` (type: `boolean`):

Daily, weekly or monthly prices, with dividends and splits, in each result. No extra charge.

## `historyRange` (type: `string`):

How far back the history goes.

## `historyInterval` (type: `string`):

One row of the history per day, week or month.

## `includeFinancials` (type: `boolean`):

Annual and quarterly income statement, balance sheet and cash flow lines in each result. No extra charge.

## `trackChanges` (type: `boolean`):

Adds each symbol's price at the last run under the same memory, its change since, and the analyst upgrades, downgrades and target changes since; moves of at least the alert move become signals. Schedule it daily for a watchlist.

## `memory` (type: `string`):

Keep one per watchlist. A symbol is forgotten after 90 days unseen.

## `alertMovePercent` (type: `integer`):

A price change since the last run at least this big, up or down, is a signal.

## `earningsWithinDays` (type: `integer`):

Earnings this many days away or fewer are a signal.

## `onlyAlerts` (type: `boolean`):

Gives only symbols with a signal (a 52-week high or low, earnings soon, RSI over 70 or under 30 with technicals, a 50/200-day cross, and with alerts a move or an analyst action); the rest aren't charged.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "BTC-USD"
  ],
  "maxPerScreener": 20,
  "includeTechnicals": true,
  "includeHistory": false,
  "historyRange": "1y",
  "historyInterval": "1d",
  "includeFinancials": false,
  "trackChanges": false,
  "memory": "default",
  "alertMovePercent": 5,
  "earningsWithinDays": 7,
  "onlyAlerts": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `screen` (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",
        "BTC-USD"
    ],
    "maxPerScreener": 20,
    "includeTechnicals": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("pikoulas/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",
        "BTC-USD",
    ],
    "maxPerScreener": 20,
    "includeTechnicals": True,
}

# Run the Actor and wait for it to finish
run = client.actor("pikoulas/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",
    "BTC-USD"
  ],
  "maxPerScreener": 20,
  "includeTechnicals": true
}' |
apify call pikoulas/yahoo-finance --silent --output-dataset

```

## MCP server setup

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