# Yahoo Finance API Scraper - Fundamentals and Analyst Data (`s-r/yahoo-finance-scraper`) Actor

Collect Yahoo Finance fundamentals for global tickers: valuation, profiles, margins, debt, analyst targets, earnings, ownership and annual or quarterly statements. One row per ticker, with free diagnostic rows for unavailable symbols.

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

## Pricing

from $1.50 / 1,000 tickers

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

This Yahoo Finance API scraper collects stock fundamentals, analyst targets, earnings and ownership for global tickers. Choose the blocks you need and optionally add annual or quarterly financial statements to each ticker row.

### What the Yahoo Finance API scraper collects

The actor is intended for watchlists, company comparisons, research datasets and applications that need a consistent view of a company's fundamentals. Each requested ticker has one dataset row. The latest regular-market price is always included when Yahoo provides it, alongside the company name, exchange, quote currency, market capitalization and the time that price applied.

You can select valuation ratios, company profiles, financial metrics, analyst recommendations, earnings information and holders. Annual and quarterly statements are optional. This keeps a small watchlist straightforward while allowing a more detailed company dataset with the same input format. Availability follows Yahoo's public data: an equity may have a full financial block, while an ETF, index or cryptocurrency may only have quote information and selected statistics.

### Input

Provide `tickers` as an array of Yahoo symbols or as text separated by commas, semicolons or newlines. Spaces around each entry are removed and symbols are normalized to uppercase. Empty entries are ignored. Duplicate tickers remain separate positions, so you receive a row for each position in your normalized list. A run accepts up to 500 ticker positions. `symbols` is an alternative name for the same input; an explicit `tickers` value takes precedence.

This input requests Apple's fundamentals and annual statements:

```json
{
  "tickers": ["AAPL"],
  "modules": ["key_stats", "profile", "financial_data", "analyst", "earnings", "holders"],
  "financials": "annual"
}
```

Use Yahoo's exchange suffixes for international listings: `ASML.AS` for Amsterdam, `SAP.DE` for Xetra, `SHEL.L` for London and `7203.T` for Tokyo. Share classes use a hyphen, such as `BRK-B`. Yahoo symbols for other instrument types are accepted too, including `SPY`, `^GSPC` and `BTC-USD`.

`modules` accepts `key_stats`, `profile`, `financial_data`, `analyst`, `earnings` and `holders`. When omitted, it selects key statistics, financial data and analyst information. An empty array requests just the quote. Unrequested blocks are null and do not generate warnings.

Set `financials` to `none`, `annual`, `quarterly` or `both`. Its default is `none`. `financial_fields` optionally narrows the statement fields. The supported selection includes TotalRevenue, GrossProfit, OperatingIncome, EBITDA, NetIncome, DilutedEPS, TotalAssets, TotalDebt, StockholdersEquity, CashAndCashEquivalents, OperatingCashFlow, CapitalExpenditure and FreeCashFlow. All thirteen are selected when the field is omitted.

`max_rating_changes` controls how many recent analyst rating changes to return, from zero through 100, with a default of 25. Zero disables this series. The newest available changes are returned first. Institutional holders, fund holders and insider holders are each limited to ten entries; company officers are limited to twenty.

For clients using section names, `dataTypes` accepts `quote`, `info`, `financials`, `holders`, `recommendations` and `earnings`. `info` selects profile, key statistics and financial data. `recommendations` selects analyst information. `financials` enables annual statements unless the explicit `financials` option specifies something else. Explicit `modules` takes precedence over this alternative selector.

### Output

The dataset contains one row per ticker position. `ticker` preserves the complete Yahoo symbol, while `symbol` removes an exchange suffix: ASML.AS becomes ASML. `input_index` identifies the position in the normalized input list. `found` is true only when a numeric regular-market price was retrieved. `source` identifies this actor and `fetched_at` records when the data was collected.

Price fields are numbers, never abbreviated display strings. Market capitalization is a full numeric amount. Quote prices and analyst targets use the major currency unit: a London quote in pence is converted to GBP. `quote_currency` preserves the original denomination, such as GBp. Market capitalization is already reported in the major unit and is not divided again. Financial statements and company financial metrics keep their reporting currency, which may differ from the quote currency.

The following selected values come from the captured AAPL response, whose regular-market quote applied at the close on 9 October 2026:

```json
{
  "ticker": "AAPL",
  "symbol": "AAPL",
  "found": true,
  "name": "Apple Inc.",
  "price": 336.64,
  "currency": "USD",
  "market_cap": 4912984883200
}
```

`key_stats` includes trailing and forward P/E, PEG, price-to-book, price-to-sales, enterprise value, EPS, dividend yield, beta, share counts and price ranges. `financial_data` includes margins, cash, debt, revenue, cash flow, analyst targets and recommendation information. `profile` contains the company's sector, industry, country, website, business description and available officers.

`analyst` contains recommendation trends, recent rating changes and earnings estimates. `earnings` contains reported quarterly EPS, financial charts and the available earnings and dividend calendar. `holders` contains ownership percentages and the available institution, fund and insider lists. `financials` groups the requested annual and quarterly statement values into rows by fiscal period end, sorted from oldest to newest.

Percentages are fractions: 0.01 means 1%. The exception is `financial_data.debt_to_equity`, which preserves Yahoo's percentage number. A value of 78.445 means 78.445%. Earnings surprise percentages are converted to fractions as well. Missing values are null; they are not treated as zero. If a requested module or statement series is unavailable, the row includes an English warning. A statement retrieval problem can leave the quote available while financials is null with a warning.

### Use cases

- **Watchlist monitoring:** refresh valuation, margins, debt and analyst targets for a list of tickers on a schedule and compare runs over time.
- **Screening and research datasets:** build a table of fundamentals for a set of companies, with annual or quarterly statements per fiscal period.
- **Fintech and portfolio apps:** feed a product with one consistent row per instrument instead of stitching several sources together.
- **Analyst follow-up:** track recommendation trends, price targets, rating changes and earnings surprises.
- **Ownership checks:** look at institutional, fund and insider holders next to the valuation of the same company.

### Yahoo Finance API alternatives compared

Yahoo does not offer a supported public API with a key and a contract. People usually choose between an open-source library they run themselves, a paid market-data API, or an Apify actor.

- **Self-hosted libraries** are free, but you maintain the code, handle failures when Yahoo changes something, and run it somewhere.
- **Paid market-data APIs** come with contracts and licensing, which suits redistribution, but they cost a monthly plan even for a small watchlist.
- **This actor** needs no setup: you pay per delivered ticker row, results arrive as a dataset or through the Apify API, and unavailable symbols come back as free diagnostic rows instead of failing the run.

Other Yahoo Finance actors in the Store mostly focus on quotes, news or price history. This one is built for fundamentals: one row per ticker with valuation, margins, debt, analyst targets and optional statements. For OHLCV candles, use a price-history tool instead.

### Pricing

Usage is measured per delivered ticker row with `found: true`, plus the run-start event shown in the actor's current pricing panel. Requested module selection and statement selection are included in the ticker result. Diagnostic rows with `found: false` do not incur a ticker-result charge. If every ticker is unavailable, the ticker-result count is zero; the run-start event still applies. Consult the pricing panel for the active event prices before running a large list.

Free-plan users receive at most ten ticker rows per run. This cap includes diagnostic rows and preserves the order of the input list. Larger lists for paying users are collected automatically in successive pages. A continuation within the same actor run does not incur another run-start event. Duplicate input tickers represent separate requested results and are counted separately when found.

### FAQ

#### Does this include historical OHLCV, news or options?

This actor focuses on fundamentals and financial statements. It does not collect historical candle series, news, options chains or screener searches. The quote fields describe the latest regular-market price available from the source.

#### How much financial statement history is available?

The public statement source generally supplies approximately four annual periods and five quarterly periods. The exact periods and fields vary by company. Asking for an earlier date does not create older data. ETFs, indexes and cryptocurrencies can have no company statement history; the actor reports that through warnings.

#### Why does a valid ticker have null modules?

Yahoo's coverage differs across exchanges and instrument types. Some European equities have no rating-change history or insider list. An ETF may have a valid quote without company financialData. Requested unavailable modules are identified in `warnings`; unrequested blocks are simply null. Check both `found` and the warnings when deciding whether a row meets your downstream requirements.

#### What happens when a ticker is invalid?

The row remains in the dataset with `found: false`, an error code and an English message. For example, a nonexistent ticker can return `not_found`, and a share class written as BRK.B may need Yahoo's BRK-B notation. These diagnostic rows keep your input positions traceable and do not incur a ticker-result charge.

#### Can I export the results?

Apify provides JSON and CSV dataset exports. JSON preserves nested module objects and financial statement arrays. For a comparison table, use ticker plus exchange as instrument identity and keep quote currency separate from reporting currency. `as_of` describes the quote's source time, while `fetched_at` describes collection time; these can differ when the market is closed.

# Actor input Schema

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

Yahoo symbols, including exchange suffixes. Array or comma, semicolon or newline separated text. Empty entries are removed; duplicates are preserved. Up to 500 positions.

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

Alias for tickers. Explicit tickers takes precedence when both are provided.

## `modules` (type: `array`):

Optional fundamental blocks; price is always included. Defaults to key_stats, financial_data and analyst. An empty array requests only the price.

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

Alternative module selector when modules is omitted. info selects key_stats, profile and financial_data; recommendations selects analyst; financials enables annual statements unless financials is specified. quote selects only price.

## `financials` (type: `string`):

none (default), annual, quarterly or both. The source supplies approximately four fiscal years and five quarters; availability varies. dataTypes financials enables annual when this field is omitted.

## `financial_fields` (type: `array`):

Statement fields to request. Defaults to all 13 supported fields. Uses financial-reporting currency, not necessarily quote currency.

## `max_rating_changes` (type: `integer`):

Latest analyst rating changes to retain; zero disables that series.

## `cursor` (type: `integer`):

Start at this normalized ticker position. Default zero. Resubmit original input with next_cursor until null. Apify follows pages automatically.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "ASML.AS",
    "MSFT"
  ],
  "modules": [
    "key_stats",
    "financial_data",
    "analyst"
  ],
  "financials": "none",
  "max_rating_changes": 25,
  "cursor": 0
}
```

# Actor output Schema

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

One row per ticker.

## `summary` (type: `string`):

Delivery counts and completion.

# 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",
        "ASML.AS",
        "MSFT"
    ],
    "modules": [
        "key_stats",
        "financial_data",
        "analyst"
    ],
    "financials": "none"
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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",
        "ASML.AS",
        "MSFT",
    ],
    "modules": [
        "key_stats",
        "financial_data",
        "analyst",
    ],
    "financials": "none",
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/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",
    "ASML.AS",
    "MSFT"
  ],
  "modules": [
    "key_stats",
    "financial_data",
    "analyst"
  ],
  "financials": "none"
}' |
apify call s-r/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

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