# Yahoo Finance Stock Data Scraper (`tindacloud/yahoo-finance-scraper`) Actor

- **URL**: https://apify.com/tindacloud/yahoo-finance-scraper.md
- **Developed by:** [Seungki Min](https://apify.com/tindacloud) (community)
- **Categories:** Business, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 records

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 Data Scraper

**Quotes, fundamentals, analyst targets and full price history** for stocks, ETFs, crypto, FX and indices — in one run, no API key, no rate-limit plan to buy.

Most finance Actors give you a price. This one gives you the numbers you actually screen on: margins, cash, debt, ROE, P/B, PEG, analyst targets and the next earnings date, in the same row as the price.

### What you can do with it

- **Screen a watchlist** — 50 tickers, one run, one table.
- **Let Yahoo pick the tickers** — run `day_gainers`, `most_actives` or `most_shorted_stocks` and get today's movers with full data attached.
- **Backtests and charts** — daily, weekly or monthly history with adjusted close, dividends and splits.
- **Only have company names?** Put them in `searchQueries` and they are resolved to tickers.

### Input

| Field | What it does |
|---|---|
| `tickers` | Symbols: `AAPL`, `BTC-USD`, `EURUSD=X`, `^GSPC`, `005930.KS` |
| `searchQueries` | Company names → tickers |
| `screeners` | Day gainers/losers, most active, growth tech, undervalued, most shorted… |
| `dataTypes` | `quote`, `fundamentals`, `profile`, `history` (combine freely) |
| `historyRange` / `historyInterval` | 5d…max, and 1d/1wk/1mo (intraday for recent ranges) |
| `maxResults` | Total limit |

### Output

`quote`, `fundamentals` and `profile` share **one row per ticker**. `history` adds **one row per candle** (`recordType: "price"`) plus `dividend` and `split` rows.

Real example from this Actor (quote + fundamentals + profile):

```json
{
  "recordType": "quote",
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "exchange": "NasdaqGS",
  "currency": "USD",
  "price": 336.13,
  "change": -0.869995,
  "changePercent": -0.258159,
  "volume": 86241049,
  "marketCap": 4905541566464,
  "peRatioTrailing": 38.502865,
  "epsTrailing": 8.73,
  "dividendYieldPercent": 0.32,
  "fiftyTwoWeekHigh": 344.57,
  "fiftyTwoWeekLow": 240.21,
  "marketState": "POSTPOST",
  "earningsDate": "2026-07-30T20:00:00.000Z",
  "revenue": 466822987776,
  "revenueGrowthPercent": 16.4,
  "profitMarginPercent": 27.6,
  "freeCashflow": 107721875456,
  "totalDebt": 84343996416,
  "returnOnEquityPercent": 148.8,
  "priceToBook": 45.669838,
  "beta": 1.085,
  "nextEarningsDate": "2026-10-29T20:00:00.000Z",
  "analystTargetPrice": 327.83743,
  "analystRecommendation": "buy",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "fullTimeEmployees": 150000,
  "website": "https://www.apple.com"
}
```

### Speed and cost

3 tickers with quotes took **4 seconds**; 4 tickers with quote + fundamentals + profile took **7 seconds**. A year of weekly history for one ticker is 58 rows. You are charged per row.

### Notes

- Non-equities return what applies to them: crypto and FX have prices but no revenue or sector.
- Unknown tickers are reported with a warning and **not charged**.
- Prices are Yahoo's delayed quotes, the same numbers the website shows.

# Actor input Schema

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

Symbols to fetch, e.g. AAPL, MSFT, TSLA, BTC-USD, EURUSD=X, ^GSPC. Stocks, ETFs, crypto, FX and indices all work.

## `searchQueries` (type: `array`):

Company names to resolve into tickers, e.g. “Samsung Electronics”. Useful when you only have names.

## `matchesPerSearch` (type: `integer`):

How many tickers to take for each company name.

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

Let Yahoo pick the tickers for you — today's movers, most active, and so on.

## `screenerCount` (type: `integer`):

How many tickers to take from each screener.

## `dataTypes` (type: `array`):

What to return. Quote and fundamentals share one row per ticker; history adds one row per day.

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

How far back to go when history is selected.

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

Candle size for history. Intraday intervals only work for recent ranges.

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

Total limit across everything.

## `proxy` (type: `object`):

Apify Proxy is used by default; Yahoo rate-limits single IPs quickly.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT",
    "NVDA"
  ],
  "matchesPerSearch": 1,
  "screenerCount": 25,
  "dataTypes": [
    "quote"
  ],
  "historyRange": "1mo",
  "historyInterval": "1d",
  "maxResults": 1000,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All results in a table view.

# 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",
        "NVDA"
    ]
};

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

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

```

## MCP server setup

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