# Yahoo Finance Scraper — Quotes, Technical Analysis, Dividends (`ntriqpro/yahoo-finance-scraper`) Actor

Stock data that reads like a briefing. Tickers in, one flat dataset out: quotes, computed indicators (SMA/RSI/MACD), financials, dividends, analyst views, news, price history and cross-ticker rankings — every row with a plain-English headline. Unofficial yfinance wrapper.

- **URL**: https://apify.com/ntriqpro/yahoo-finance-scraper.md
- **Developed by:** [daehwan kim](https://apify.com/ntriqpro) (community)
- **Categories:** Developer tools, AI, 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/platform/actors/running/actors-in-store#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 Scraper — Quotes, Technical Analysis, Dividends

Stock data that **reads like a briefing, not a JSON dump**.

Give it tickers and get back one flat dataset where **every row carries a
plain-English `headline`** — a sentence a human can read and act on:

> `"AAPL trades 4.1% above its 50-day average ($198.12)"`
> `"AAPL RSI(14) at 71 — overbought territory (70+)"`
> `"3mo return: TSLA ranks #1/3 at +31.2% — #2 MSFT at +12.4%"`
> `"AAPL paid a $0.26 dividend on 2026-05-12 — 12 straight year(s) of rising annual payouts"`

Most Yahoo Finance scrapers return one deeply nested JSON blob per ticker —
unreadable in CSV/Excel and with zero computed insight. This Actor is the
opposite: **flat rows, computed indicators, cross-ticker rankings**, ready for
spreadsheets, dashboards, LLM pipelines and backtests as-is.

### What you get (8 row layers)

Each row has `ticker`, `rowType`, `asOf`, `headline` plus its layer's fields:

| rowType | What it answers | Rows per ticker (typical) |
|---|---|---|
| `ticker-summary` | How is this stock doing right now? Price, day change, 52-week position, market cap, P/E, dividend yield | 1 |
| `indicator-verdict` | The technical picture — **computed by this Actor**: SMA 20/50/200, RSI14, MACD, 20-day volatility, volume trend, 52-week position, golden/dead cross state, 1mo/3mo/YTD returns | ~12 |
| `financial-trend` | Is the business improving? Revenue, profits, margins, debt — with period-over-period change computed in | ~10 |
| `dividend-event` | Dividend & split history, with the consecutive-increase streak computed | ~8 (up to 20 extended) |
| `analyst-view` | Price-target consensus + recent rating changes | ~5 |
| `news-item` | Latest headlines (title, publisher, time, link) | ~5 |
| `history-bar` | Daily OHLCV bars with day change % and relative volume — backtest/chart ready | 63 (3mo) – 1,260 (5y) |
| `comparison` | With 2+ tickers: who leads on return, valuation, momentum, dividend yield, stability — ranked rows | 5 × tickers |

Works for stocks, ETFs, indices (`^GSPC`) and FX pairs (`EURUSD=X`) — any
symbol Yahoo Finance quotes. Layers that do not apply (e.g. financials for an
index) are simply skipped.

### Input

```json
{
    "tickers": ["AAPL", "MSFT", "TSLA"],
    "period": "3mo"
}
```

Every layer can be toggled off individually. `maxResults` is your cost
ceiling; `maxRunSecs` is your time ceiling. Up to 25 tickers per run.

### What a run costs

Pricing is per delivered row, so cost follows what you actually receive.
Typical scenarios:

| Scenario | Rows delivered | Total |
|---|---|---|
| 1 ticker, defaults (3 months of bars) | ~105 | **≈ $0.05** |
| 10 tickers, defaults + comparison | ~1,100 | **≈ $0.55** |
| 1 ticker, all layers, 1 year of bars + 4 years of financials | ~330 | **≈ $0.10** |

Detailed per-event prices are listed on this page's pricing tab. The
`actor-start` event applies once per run. Rows that could not be produced for
a symbol appear as uncharged notice rows.

**Free plan**: runs fetch up to 3 tickers and return the 25 highest-value rows
(comparisons, summaries and computed indicators first), with a notice telling
you exactly what the full dataset contained.

### Output examples

`ticker-summary`:

```json
{
    "rowType": "ticker-summary",
    "ticker": "AAPL",
    "asOf": "2026-08-15",
    "price": 195.64,
    "dayChangePct": -1.42,
    "fiftyTwoWeekPositionPct": 78.0,
    "marketCap": 2980000000000,
    "trailingPE": 30.2,
    "dividendYieldPct": 0.53,
    "headline": "AAPL $195.64 ▼1.42% — sits at the 78% point of its 52-week range, trailing P/E 30.2, market cap $2.98T"
}
```

`comparison` (2+ tickers):

```json
{
    "rowType": "comparison",
    "ticker": "TSLA",
    "category": "3mo return",
    "value": 31.2,
    "rank": 1,
    "of": 3,
    "headline": "3mo return: TSLA ranks #1/3 at +31.20% — #2 MSFT at +12.40%"
}
```

### Honest limits — read before relying on this data

- **Unofficial.** This Actor wraps the open-source
  [yfinance](https://github.com/ranaroussi/yfinance) library (Apache-2.0). It
  is **not affiliated with, endorsed by, or vetted by Yahoo, Inc.** Yahoo's
  APIs and terms govern the underlying data; you are responsible for your own
  use of it.
- **Delayed, not real-time.** Yahoo quotes are typically delayed 15–20 minutes
  depending on the exchange. Do not use this for live trading decisions.
- **Not investment advice.** Indicator rows describe what the numbers are
  (e.g. "RSI 71 — overbought territory"); they are explanations of standard
  formulas, not recommendations to buy or sell anything.
- **Accuracy follows the source.** Fundamentals and analyst data are as good —
  and as occasionally patchy — as Yahoo's own pages. Missing fields are
  omitted rather than guessed.

### FAQ

**A ticker returned nothing?** Check the symbol on finance.yahoo.com first —
this Actor uses the same symbols (`BRK-B`, `^GSPC`, `005930.KS`, `EURUSD=X`).
Failed symbols produce an uncharged notice row explaining what happened.

**Why flat rows instead of one object per ticker?** Because flat rows survive
the trip to CSV, Excel, Google Sheets and SQL. Filter by `rowType` to get any
single layer; filter by `ticker` to get one symbol's briefing.

**Can I use this in an LLM/RAG pipeline?** Yes — the `headline` field was
built for exactly that: each row is a self-contained, citable statement.

# Actor input Schema

## `tickers` (type: `array`):

One or more Yahoo Finance symbols (stocks, ETFs, indices like ^GSPC, FX like EURUSD=X). With 2+ tickers you also get cross-ticker comparison rankings. Max 25 per run.

## `period` (type: `string`):

How far back the daily price bars go. Indicators (SMA200 etc.) always use a full year of data internally.

## `includeIndicators` (type: `boolean`):

SMA 20/50/200, RSI14, MACD, volatility, volume trend, 52-week position, golden/dead cross state and period returns — each as its own row with a plain-English explanation.

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

Revenue, profits, margins and debt from the latest reports, with period-over-period change computed in.

## `includeDividends` (type: `boolean`):

Recent dividend payments and stock splits, one row each, including the consecutive-increase streak.

## `includeAnalyst` (type: `boolean`):

Price-target consensus and the most recent analyst rating changes.

## `includeNews` (type: `boolean`):

The latest headlines for each ticker (title, publisher, time, link).

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

One OHLCV row per trading day of the selected period, with day change and relative volume computed in — ready for backtests and charts.

## `includeComparison` (type: `boolean`):

With 2+ tickers: ranking rows across return, valuation, momentum, dividend yield and stability, so you can see at a glance which ticker leads where.

## `extendedHistory` (type: `boolean`):

Off: latest quarter per financial item and the last 8 dividend events. On: 4 years of annual financials per item and the last 20 dividend events (more rows, billed per row).

## `maxRunSecs` (type: `integer`):

Stop fetching new tickers after this many seconds. Everything already fetched stays in the dataset. 60-3600.

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

Upper bound on billable result rows for this run — your cost ceiling. Free-plan runs return at most 25 rows regardless of this value.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT",
    "TSLA"
  ],
  "period": "3mo",
  "includeIndicators": true,
  "includeFinancials": true,
  "includeDividends": true,
  "includeAnalyst": true,
  "includeNews": true,
  "includeHistory": true,
  "includeComparison": true,
  "maxRunSecs": 240,
  "maxResults": 5000
}
```

# Actor output Schema

## `dataset` (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 = {
    "tickers": [
        "AAPL",
        "MSFT",
        "TSLA"
    ],
    "period": "3mo",
    "includeIndicators": true,
    "includeFinancials": true,
    "includeDividends": true,
    "includeAnalyst": true,
    "includeNews": true,
    "includeHistory": true,
    "includeComparison": true,
    "extendedHistory": false,
    "maxRunSecs": 240,
    "maxResults": 5000
};

// Run the Actor and wait for it to finish
const run = await client.actor("ntriqpro/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 = {
    "tickers": [
        "AAPL",
        "MSFT",
        "TSLA",
    ],
    "period": "3mo",
    "includeIndicators": True,
    "includeFinancials": True,
    "includeDividends": True,
    "includeAnalyst": True,
    "includeNews": True,
    "includeHistory": True,
    "includeComparison": True,
    "extendedHistory": False,
    "maxRunSecs": 240,
    "maxResults": 5000,
}

# Run the Actor and wait for it to finish
run = client.actor("ntriqpro/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 '{
  "tickers": [
    "AAPL",
    "MSFT",
    "TSLA"
  ],
  "period": "3mo",
  "includeIndicators": true,
  "includeFinancials": true,
  "includeDividends": true,
  "includeAnalyst": true,
  "includeNews": true,
  "includeHistory": true,
  "includeComparison": true,
  "extendedHistory": false,
  "maxRunSecs": 240,
  "maxResults": 5000
}' |
apify call ntriqpro/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

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