# Yahoo Finance - Full stock info, news, cheapest, real-time (`architjn/yahoo-finance`) Actor

🟢 $0.90/1000 results 🟢 Effortlessly fetch comprehensive financial data, historical prices, news, and analytics for any stock ticker from Yahoo Finance. Perfect for investors, analysts, and developers seeking fast, reliable, and detailed market insights in one click!

- **URL**: https://apify.com/architjn/yahoo-finance.md
- **Developed by:** [Archit Jain](https://apify.com/architjn) (community)
- **Categories:** Integrations, Other, News
- **Stats:** 779 total users, 79 monthly users, 99.9% runs succeeded, 26 bookmarks
- **User rating**: 4.22 out of 5 stars

## Pricing

from $0.90 / 1,000 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?

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

Fetch comprehensive financial data for one or more ticker symbols from Yahoo Finance. This Apify actor provides detailed stock information, historical prices, financials, dividends, splits, news, recommendations, holders, options, and earnings—all in a single run.

### Features

- Retrieve data for multiple tickers in one run
- Get current price, company info, and market stats
- Download historical price data (custom date range supported)
- Access financial statements, dividends, splits, and earnings
- See latest news, analyst recommendations, and institutional holders
- Fetch options chain and expirations
- Output is structured and ready for analysis or automation

### How It Works

1. **Input**: Provide an array of ticker symbols (e.g., `["AAPL", "GOOG"]`). Optionally, specify `start_date` and `end_date` (YYYY-MM-DD) to limit the historical data range.
2. **Processing**: The actor fetches all available data for each ticker from Yahoo Finance.
3. **Output**: Results are saved to the default dataset. Each item contains all data for one ticker.

***

### Input Example

```json
{
  "tickers": ["AAPL", "GOOG"],
  "start_date": "2025-01-01",
  "end_date": "2025-06-18"
}
```

- `tickers` (array, required): List of ticker symbols (e.g., `AAPL`, `GOOG`, `MSFT`)
- `start_date` (string, optional): Start date for historical data (YYYY-MM-DD)
- `end_date` (string, optional): End date for historical data (YYYY-MM-DD)

***

### Output Example

Each output item contains all data for a single ticker. Example (truncated for clarity):

```json
{
  "ticker": "AAPL",
  "stock_info": {
    "symbol": "AAPL",
    "name": "Apple Inc.",
    "sector": "Technology",
    "industry": "Consumer Electronics",
    "market_cap": 2922039738368,
    "current_price": 195.64,
    ...
  },
  "price_info": {
    "symbol": "AAPL",
    "current_price": 195.64,
    "previous_close": 198.42,
    "change": -2.78,
    "change_percent": -1.40,
    "timestamp": "2025-06-18T16:53:59.355380"
  },
  "history": {
    "symbol": "AAPL",
    "period": "1y",
    "interval": "1d",
    "start": "2025-01-01",
    "end": "2025-06-18",
    "data": [
      {"date": "2025-01-02", "open": 248.33, "high": 248.5, ...},
      ...
    ]
  },
  ...
}
```

The output includes:

- `stock_info`: Company and market stats
- `price_info`: Current price and change
- `history`: Historical OHLCV data
- `financials`: Income statement, balance sheet, cash flow
- `dividends`, `splits`, `news`, `recommendations`, `holders`, `options`, `earnings`

***

### Usage Notes

- You can run this actor directly on the Apify platform or via API.
- For large numbers of tickers, consider splitting into batches for best performance.
- All results are available in the Apify dataset tab as JSON, CSV, or Excel.

# Actor input Schema

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

Array of ticker symbols (e.g., \["AAPL", "GOOG"]).

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

(Optional) Start date for historical data in YYYY-MM-DD format.

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

(Optional) End date for historical data in YYYY-MM-DD format.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "GOOG",
    "MSFT"
  ]
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("architjn/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 = { "tickers": [
        "AAPL",
        "GOOG",
        "MSFT",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("architjn/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 '{
  "tickers": [
    "AAPL",
    "GOOG",
    "MSFT"
  ]
}' |
apify call architjn/yahoo-finance --silent --output-dataset

```

## MCP server setup

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