# Yahoo Finance (`pintostudio/yahoo-finance`) Actor

This API retrieves data from yahoo finance, such as stocks, future and much more with detailed information.

- **URL**: https://apify.com/pintostudio/yahoo-finance.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 37 total users, 1 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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?

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

This Actor retrieves a real-time stock quote from Yahoo Finance for any ticker symbol — price, day range, 52-week range, market cap, valuation ratios, analyst rating, and earnings-date info in a single call.

### Features

- **Ticker Information Retrieval** - Obtain a comprehensive real-time quote for any ticker.
- **Price Tracking** - Regular market price, change, bid/ask, and intraday/52-week range.
- **Valuation Metrics** - Market cap, P/E (forward and trailing), EPS, book value, price-to-book.
- **Moving Averages** - 50-day and 200-day averages with change vs. current price.
- **Analyst & Earnings** - Average analyst rating and next earnings date (with estimate flag).
- **Dividends** - Trailing annual dividend rate and yield, where applicable.

### Input

| Field | Type | Description |
|---|---|---|
| `ticker` | String | The stock ticker symbol to look up, e.g. `TSLA`, `AAPL`, `MSFT`. |

```json
{
  "ticker": "TSLA"
}
```

### Output Format

Each run returns **one dataset item**: the full Yahoo Finance quote object for the requested ticker (around 80 fields). Key groups of fields:

- **Identity** — `symbol`, `shortName`, `longName`, `displayName`, `quoteType`, `exchange`, `fullExchangeName`, `currency`
- **Live pricing** — `regularMarketPrice`, `regularMarketChange`, `regularMarketChangePercent`, `regularMarketDayRange`, `bid`, `ask`, `bidSize`, `askSize`, `marketState`
- **Range & averages** — `fiftyTwoWeekRange`, `fiftyDayAverage`, `twoHundredDayAverage`
- **Volume** — `regularMarketVolume`, `averageDailyVolume3Month`, `averageDailyVolume10Day`
- **Valuation** — `marketCap`, `sharesOutstanding`, `bookValue`, `priceToBook`, `forwardPE`, `trailingPE`, `epsForward`, `epsTrailingTwelveMonths`
- **Analyst & earnings** — `averageAnalystRating`, `earningsTimestamp`, `isEarningsDateEstimate`
- **Dividends** — `trailingAnnualDividendRate`, `trailingAnnualDividendYield`
- **Corporate actions** — `corporateActions` (upcoming splits/dividends; usually an empty array)

Not every field is populated for every instrument — non-equity tickers (ETFs, indices, crypto) omit fields like `epsForward` or `averageAnalystRating` that don't apply to them.

### Output Example

Trimmed to the most useful fields from a real run on `TSLA` (the full item returns ~80 fields):

```json
{
  "symbol": "TSLA",
  "shortName": "Tesla, Inc.",
  "longName": "Tesla, Inc.",
  "quoteType": "EQUITY",
  "exchange": "NMS",
  "fullExchangeName": "NasdaqGS",
  "currency": "USD",
  "marketState": "REGULAR",
  "regularMarketPrice": 345.79,
  "regularMarketChange": -9.019989,
  "regularMarketChangePercent": -2.542217,
  "regularMarketDayRange": { "low": 345.2, "high": 358.8 },
  "regularMarketVolume": 23549856,
  "bid": 346.6,
  "ask": 347.88,
  "marketCap": 1365714010112,
  "sharesOutstanding": 3949547394,
  "bookValue": 21.995,
  "priceToBook": 15.7213,
  "epsTrailingTwelveMonths": 1.06,
  "epsForward": 2.15858,
  "forwardPE": 160.19327,
  "trailingPE": 326.217,
  "averageAnalystRating": "2.3 - Buy",
  "fiftyDayAverage": 361.4264,
  "twoHundredDayAverage": 401.41074,
  "fiftyTwoWeekRange": { "low": 297.38, "high": 498.83 },
  "averageDailyVolume3Month": 41471814,
  "trailingAnnualDividendYield": 0,
  "earningsTimestamp": "2026-07-22T20:00:00.000Z",
  "isEarningsDateEstimate": true
}
```

### How to Use

1. Provide the ticker symbol as input (see [Input](#input) above).
2. Run the Actor — it returns one dataset item containing the full quote.
3. Pull the fields you need from the [Output Format](#output-format) list above, or grab everything.

### Use Cases

- Building a lightweight stock-price dashboard or watchlist
- Feeding a portfolio tracker with live price and valuation data
- Screening tickers by valuation ratios (P/E, price-to-book) or analyst rating
- Monitoring upcoming earnings dates across a list of symbols

# Actor input Schema

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

The Stock to get Information from

## Actor input object example

```json
{
  "ticker": "TSLA"
}
```

# 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 = {
    "ticker": "TSLA"
};

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

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

```

## MCP server setup

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