# Yahoo Finance Scraper | Stock Prices & Financial Data (`apinator/yahoo-finance-scraper`) Actor

Extract Yahoo Finance stock prices, historical market data, financial statements, options, analyst estimates, news and screeners. Structured JSON via API.

- **URL**: https://apify.com/apinator/yahoo-finance-scraper.md
- **Developed by:** [Apinator](https://apify.com/apinator) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 successful results

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 Scraper | Stock Prices & Financial Data

Extract stock prices, historical market data, financial statements,
options chains, analyst estimates, financial news and more from Yahoo Finance.

Access 13 operations through a single Apify Actor, with structured JSON
output, API integration and batch processing of up to 1,000 ticker entries.

### Features

- 13 available data operations.
- Single ticker and multi-ticker requests.
- Batch processing of up to 1,000 ticker entries.
- Configurable concurrency.
- Flat and grouped dataset output.
- Structured JSON results.
- Individual error reporting for batch requests.
- Dataset Views for convenient inspection and export.

### Available Operations

| Operation | Description | Main input |
|---|---|---|
| quotes | Current stock quote and market information | ticker |
| historical | Historical price and trading data | ticker, interval, period |
| fundamentals | Financial statements | ticker, type |
| analysis | Analyst estimates and recommendations | ticker |
| options | Options chains, calls and puts | ticker, expiration |
| news | Financial news articles | query, limit |
| search | Search financial instruments and companies | query, limit |
| screener | Predefined market screeners | screenerId, count |
| holders | Institutional and major holders | ticker |
| insiders | Insider transactions and activity | ticker |
| calendar | Company event calendar | ticker |
| profile | Company profile and business information | ticker |
| transcripts | Public earnings call transcripts | url |

### Getting Started

Select an operation in the Actor input form and provide its required parameters.

#### Single ticker

Retrieve Apple's quote:

```json
{
  "operation": "quotes",
  "ticker": "AAPL"
}
```

#### Multiple tickers

Batch operations accept up to 1,000 ticker entries, including duplicates.

```json
{
  "operation": "quotes",
  "tickers": [
    "AAPL",
    "MSFT",
    "NVDA",
    "AMZN",
    "GOOGL"
  ],
  "concurrency": 3
}
```

Repeated symbols are removed before processing.

#### Historical data

```json
{
  "operation": "historical",
  "ticker": "AAPL",
  "interval": "1d",
  "period": "1y",
  "includePrePost": false
}
```

Available intervals:

- `1m`, `2m`, `5m`, `15m`, `30m`
- `60m`, `90m`, `1h`
- `1d`, `5d`, `1wk`, `1mo`, `3mo`

Available periods:

- `1d`, `5d`, `1mo`, `3mo`, `6mo`
- `1y`, `2y`, `5y`, `10y`, `ytd`, `max`

Availability depends on the selected interval and period.

#### Financial statements

```json
{
  "operation": "fundamentals",
  "ticker": "AAPL",
  "type": "financials"
}
```

Supported types:

- `financials`
- `balance-sheet`
- `cash-flow`

#### Options

```json
{
  "operation": "options",
  "ticker": "AAPL",
  "expiration": "2026-12-18"
}
```

The expiration parameter is optional.

#### News and search

Search financial news:

```json
{
  "operation": "news",
  "query": "Apple",
  "limit": 10
}
```

Search financial instruments and companies:

```json
{
  "operation": "search",
  "query": "Apple",
  "limit": 10
}
```

Both operations accept limits from 1 to 100, with a default of 10.

#### Market screener

```json
{
  "operation": "screener",
  "screenerId": "day_gainers",
  "count": 100
}
```

Select a predefined screener from the available options.

The result count ranges from 1 to 250, with a default of 100.

#### Holders and insider activity

Retrieve major holders:

```json
{
  "operation": "holders",
  "ticker": "AAPL"
}
```

Retrieve insider activity:

```json
{
  "operation": "insiders",
  "ticker": "AAPL"
}
```

#### Company calendar

```json
{
  "operation": "calendar",
  "ticker": "AAPL"
}
```

#### Company profile

```json
{
  "operation": "profile",
  "ticker": "AAPL"
}
```

#### Earnings call transcripts

Retrieve a supported public earnings call transcript:

```json
{
  "operation": "transcripts",
  "url": "https://www.fool.com/earnings/call-transcripts/..."
}
```

The URL must use HTTPS and the `www.fool.com` domain.

### Batch Processing

Batch processing is available for ticker-based operations:

- Quotes
- Historical data
- Fundamentals
- Analysis
- Options
- Holders
- Insiders
- Calendar
- Profile

#### Concurrency

The `concurrency` parameter controls how many tickers are processed simultaneously.

| Parameter | Value |
|---|---:|
| Default | 3 |
| Minimum | 1 |
| Maximum | 10 |

Higher concurrency can reduce execution time, subject to source availability and request limitations.

### Output Formats

Batch requests support two output modes.

#### Flat output

The default mode. Each ticker is saved as an individual Dataset item.

Example:

```json
{
  "requestedTicker": "AAPL",
  "ticker": "AAPL",
  "name": "Apple Inc.",
  "price": 342.56,
  "currency": "USD"
}
```

Use `outputMode: "flat"` when you want individual records directly in the Dataset.

The `flat` Dataset View provides a convenient table for inspection and export.

#### Grouped output

Grouped mode stores multiple ticker results inside each Dataset item.

Example input:

```json
{
  "operation": "quotes",
  "tickers": ["AAPL", "MSFT", "NVDA"],
  "outputMode": "grouped",
  "groupSize": 100
}
```

Example Dataset item:

```json
{
  "results": [
    {
      "requestedTicker": "AAPL",
      "ticker": "AAPL",
      "price": 342.56
    },
    {
      "requestedTicker": "MSFT",
      "ticker": "MSFT",
      "price": 500.00
    }
  ]
}
```

Grouped mode is useful for large batches where reducing the number of physical Dataset items is desirable.

#### Group size

| Parameter | Value |
|---|---:|
| Default | 100 |
| Minimum | 1 |
| Maximum | 10,000 |

The last group can contain fewer records.

Large groups may exceed Dataset item size limits. Reduce `groupSize` when processing operations with larger outputs.

#### Dataset Views

Two views are available:

| View | Purpose |
|---|---|
| `flat` | Displays individual ticker records |
| `overview` | Expands grouped results into individual ticker rows |

In grouped mode, the physical Dataset contains groups; the `overview` view expands those groups into rows. Both views show quote-oriented fields; other operations return different fields in the original JSON.

The underlying data remains available in its original format for API access and export.

### Results and Error Handling

Batch results include `requestedTicker`, preserving the original requested symbol even when the returned instrument uses an alternative ticker.

If an individual ticker cannot be processed, its result can contain an `error` field. Other successfully processed tickers remain available.

Optional financial fields may be `null` or unavailable depending on the source response.

### Limitations

- Data availability depends on Yahoo Finance.
- Source responses, supported instruments and available fields may change.
- Historical intervals and periods are subject to source restrictions.
- Some instruments may have incomplete financial or market information.
- Large grouped records may require a smaller `groupSize`.
- This Actor does not guarantee uninterrupted availability of the underlying data source.

### Data and support

Data can be delayed or incomplete. This Actor is not affiliated with Yahoo or The Motley Fool and is not investment advice. Check the source providers’ terms and licensing requirements before use or redistribution. Inputs and results are stored according to your Apify account settings and retention policies. Avoid including sensitive information in public issue reports. Use the Actor’s Issues tab for support.

### Pricing

Planned pricing is $0.001 per run plus $0.0004 for each successful ticker, news or search query, screener run, or recovered transcript. Failed results are not charged. Flat and grouped output use the same unit. Check the Actor’s Pricing tab for the actual live charges before running it.

# Actor input Schema

## `operation` (type: `string`):

Select the data to retrieve.

## `ticker` (type: `string`):

For quotes, historical, fundamentals, analysis, options, holders, insiders, calendar and profile. Use ticker or tickers. Example: AAPL.

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

Up to 1000 ticker entries for ticker-based operations. Use instead of ticker; duplicates are removed. Each batch result includes requestedTicker, and errors include error.

## `concurrency` (type: `integer`):

Maximum number of tickers processed at once in a batch.

## `outputMode` (type: `string`):

For tickers batches, flat writes one dataset item per ticker; grouped writes objects containing a results array. Grouped requires tickers.

## `groupSize` (type: `integer`):

Maximum results per dataset item in grouped mode. Large groups may exceed dataset item size limits.

## `query` (type: `string`):

Required for news and search. Example: Apple.

## `url` (type: `string`):

Required for transcripts. Enter the full URL of a supported earnings call transcript.

## `expiration` (type: `string`):

Optional options expiration date (YYYY-MM-DD).

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

Historical data interval.

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

Historical data range.

## `includePrePost` (type: `boolean`):

Include trading outside regular hours in historical data.

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

Used by fundamentals. Select income statement, balance sheet or cash flow.

## `limit` (type: `integer`):

Maximum number of results for news or search.

## `screenerId` (type: `string`):

Used by screener. Select a predefined Yahoo Finance screener.

## `count` (type: `integer`):

Maximum number of results for screener.

## Actor input object example

```json
{
  "concurrency": 3,
  "outputMode": "flat",
  "groupSize": 100,
  "interval": "1d",
  "period": "5d",
  "includePrePost": false,
  "type": "financials",
  "limit": 10,
  "screenerId": "day_gainers",
  "count": 100
}
```

# Actor output Schema

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

Default dataset containing the selected operation's results in JSON.

# 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 = {};

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

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

```

## MCP server setup

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