# Yahoo Finance Scraper: Quotes, Fundamentals & History (`luzivanlt/yahoo-finance-scraper`) Actor

Yahoo Finance data for any ticker: quote, profile, key stats, analysts, holders, earnings. $0.50 per 1,000 symbols. Statements, price history, options, news.

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

## Pricing

from $0.35 / 1,000 symbols

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: Quotes, Fundamentals & History

One row per ticker symbol with everything Yahoo Finance shows for it: the live
quote, company profile and officers, key statistics, analyst ratings and
price targets, upgrades and downgrades, earnings, holders, insider trades, SEC
filings and, for funds, holdings and performance. Financial statements, price
history, option chains, news, similar symbols and insights are one switch
each. No account, login or API key needed.

Tested daily. Latest checks: 5 of 5 symbols (AAPL, MSFT, NVDA, SPY, BTC-USD)
with a month of daily prices and news in 13 seconds; 328 symbols from a
screener, two trending lists, a search and eight typed symbols (a German, a
Japanese, an Indian and a British stock, a fund, an index, a currency and a
future) in 4 minutes; 30 symbols with every section in 60 seconds; and the
whole daily price history of 30 symbols in 35 seconds.

### What does this Actor do?

You give it ticker symbols, or ask it to find them: from a Yahoo Finance
search, a region's trending list or one of Yahoo's ready-made screeners (day
gainers, most active, undervalued growth stocks, top ETFs and more). For each
symbol it saves one row with every section Yahoo Finance has for it. Stocks,
ETFs, mutual funds, indices, crypto, currencies and futures all work, on any
exchange Yahoo covers (`AAPL`, `7203.T`, `SAP.DE`, `BTC-USD`, `EURUSD=X`,
`^GSPC`, `GC=F`).

Each row comes with:

- the symbol, name, type, exchange, currency, market state, price, change,
  volume, market cap, sector, industry, country, website and employees
- the full quote: pre- and post-market prices, day and 52-week ranges,
  averages, dividend yield and dates, P/E, beta and more
- the company profile and its officers (title, age, pay)
- key statistics: enterprise value, margins, shares outstanding and short
  interest, insider and institutional holdings, splits
- financial data: revenue, cash, debt, growth, analysts' mean target and
  recommendation
- earnings: the next date and estimates, past quarters against estimates,
  revenue and EPS trends
- analysts: recommendation counts by month and every upgrade or downgrade
  Yahoo lists, with firm and price target
- holders: the breakdown, top institutions and funds, insiders and their
  trades, net share purchases
- SEC filings, Yahoo's ESG scores where it has them, and for funds the fund
  profile, top holdings, sector weights and performance

And, when you switch them on:

- **Financial statements:** about 100 line items of the income statement,
  balance sheet and cash flow, for the last four fiscal years, the last five
  quarters and the trailing twelve months
- **Price history:** open, high, low, close, adjusted close and volume for any
  range and interval, plus dividends, splits and capital gains
- **Option chains:** calls and puts for the nearest expirations, with bid,
  ask, volume, open interest and implied volatility
- **News:** the newest stories for the symbol, with publisher, link and time
- **Similar symbols:** the tickers Yahoo shows alongside it
- **Insights:** technical outlook, valuation, analysts' rating and research
  summaries

### Why use it?

- **The whole symbol in one row.** Quote, profile, statistics, analysts,
  holders and earnings come together, so one row answers most questions about
  a ticker.
- **Find symbols as well as read them.** Search by name, take a market's
  trending list or a screener, and every symbol found is read in full.
- **Options you can switch on.** Statements, history, option chains, news and
  insights only when you need them; a plain run stays fast.
- **Clean values.** Numbers are numbers, dates are `YYYY-MM-DD` and times are
  ISO 8601, ready for a spreadsheet or a database.
- **Use the data anywhere.** Download as JSON, CSV or Excel, or send it to
  your own tools through Apify's API and integrations.

### How to use it

1. Type ticker symbols into **Ticker symbols**, or fill **Search queries**,
   **Trending symbols in** or **Screeners**.
2. Optionally, switch on **Financial statements**, **Price history** (and set
   its range and interval), **Option expirations**, **News per symbol**,
   **Similar symbols** or **Insights**.
3. Click **Start**. When the run ends, open the **Output** tab to view the rows
   or download them.

Run it with no input to see a sample: five symbols with a month of daily
prices and five news stories each, charged as usual.

### Input

| Field                                                        | What it does                                                 | Default |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------- |
| **Ticker symbols** (`symbols`)                               | Symbols to read, up to 500                                   | —       |
| **Search queries** (`searchQueries`)                         | Names to look up; each symbol found is read                  | —       |
| **Trending symbols in** (`trendingRegions`)                  | Markets whose trending list to read                          | —       |
| **Screeners** (`screeners`)                                  | Yahoo's ready-made screeners to read                         | —       |
| **Max symbols per list** (`maxSymbolsPerList`)               | Stop each search, trending list and screener after this many | 25      |
| **Financial statements** (`includeFinancials`)               | Income statement, balance sheet and cash flow                | off     |
| **Price history** (`includeHistory`)                         | Price bars, dividends, splits and capital gains              | off     |
| **History range** (`historyRange`)                           | `1d` to `max`                                                | `1y`    |
| **History interval** (`historyInterval`)                     | `1m` to `3mo`                                                | `1d`    |
| **History from / to** (`historyStartDate`, `historyEndDate`) | A date window instead of the range, `YYYY-MM-DD`             | —       |
| **Option expirations** (`optionExpirations`)                 | Option chains for this many expirations, nearest first (0–3) | 0       |
| **News per symbol** (`maxNewsPerSymbol`)                     | Up to this many news stories (0–40)                          | 0       |
| **Similar symbols** (`includeSimilarSymbols`)                | The symbols Yahoo shows alongside                            | off     |
| **Insights** (`includeInsights`)                             | Technical outlook, valuation, research summaries             | off     |

Example input:

```json
{
  "symbols": ["AAPL", "7203.T", "BTC-USD"],
  "screeners": ["day_gainers"],
  "maxSymbolsPerList": 50,
  "includeFinancials": true,
  "includeHistory": true,
  "historyRange": "1y",
  "historyInterval": "1d",
  "optionExpirations": 1,
  "maxNewsPerSymbol": 10
}
```

### Output

One row per symbol. An example, with made-up values and most sections cut:

```json
{
  "symbol": "EXMPL",
  "name": "Example Corp.",
  "short_name": "Example",
  "asset_type": "EQUITY",
  "exchange": "NasdaqGS",
  "exchange_code": "NMS",
  "currency": "USD",
  "market_state": "REGULAR",
  "regular_market_price": 123.45,
  "regular_market_change": 1.2,
  "regular_market_change_percent": 0.0098,
  "regular_market_volume": 4567890,
  "regular_market_time": "2026-10-21T20:00:00Z",
  "market_cap": 98765000000,
  "sector": "Technology",
  "industry": "Software",
  "country": "United States",
  "website": "https://example.com",
  "employees": 12000,
  "url": "https://finance.yahoo.com/quote/EXMPL/",
  "source": "symbols",
  "source_value": "EXMPL",
  "source_position": 1,
  "summary_detail": {
    "previous_close": 122.25,
    "dividend_yield": 0.004,
    "ex_dividend_date": "2026-08-10",
    "trailing_pe": 30.5,
    "...": "…"
  },
  "calendar_events": {
    "earnings": { "earnings_date": ["2026-11-02"], "earnings_average": 1.98 },
    "...": "…"
  },
  "price_history": [
    {
      "date": "2026-10-20",
      "open": 121.0,
      "high": 124.1,
      "low": 120.5,
      "close": 122.25,
      "adj_close": 122.25,
      "volume": 3456789
    }
  ],
  "news": [
    {
      "id": "…",
      "title": "Example Corp. beats estimates",
      "publisher": "Example Wire",
      "url": "https://…",
      "published_at": "2026-10-21T12:00:00Z",
      "...": "…"
    }
  ],
  "...": "the other sections below"
}
```

The sections, each `null` when the symbol has none or you did not ask for it:

- **Always:** `asset_profile`, `summary_profile`, `summary_detail`, `price`,
  `quote_type`, `financial_data`, `default_key_statistics`,
  `calendar_events`, `earnings`, `earnings_trend`, `earnings_history`,
  `recommendation_trend`, `upgrade_downgrade_history`,
  `major_holders_breakdown`, `institution_ownership`, `fund_ownership`,
  `insider_holders`, `insider_transactions`, `net_share_purchase_activity`,
  `income_statement_history`, `income_statement_history_quarterly`,
  `balance_sheet_history`, `balance_sheet_history_quarterly`,
  `cashflow_statement_history`, `cashflow_statement_history_quarterly`,
  `sec_filings`, `index_trend`, `industry_trend`, `sector_trend`,
  `esg_scores`, `fund_profile`, `fund_performance`, `top_holdings`,
  `page_views`, `components`; and `quote` (Yahoo's quote summary) for a
  symbol from a screener or with option chains
- **Financial statements:** `financials` (`annual`, `quarterly`, `trailing`:
  one record per period, each line item a field)
- **Price history:** `price_history`, `dividends`, `splits`,
  `capital_gains`, `history_meta` (the exchange's time zone, trading hours
  and the symbol's first trade date)
- **Option expirations:** `options` (`expiration_dates`, `strikes`, and
  `chains` with `calls` and `puts`)
- **News:** `news`; **Similar symbols:** `similar_symbols`;
  **Insights:** `insights`

Every field name is `snake_case`. A ratio is a fraction (`0.0098` is
0.98%).

### How much does it cost?

No surcharges and no paid options; an item that fails is not charged.

This Actor is priced per symbol saved:

- **$0.50 per 1,000 symbols** ($0.0005 a symbol), with every section you
  switched on. Each symbol is charged once per run.
- No start fee, and nothing per list, per section or per news story.

So 1,000 symbols cost $0.50. If you set a maximum cost for a run, the Actor
stops when it reaches it and keeps every symbol saved so far.

### How long does a run take?

About 10 seconds for the sample's five symbols with their history and news,
about 4 minutes for 328 symbols, about a minute for 30 symbols with every
section switched on (statements, a year of daily prices, two option
expirations, 10 news stories, similar symbols and insights), and about 35
seconds for 30 symbols' whole daily price history.

### Good to know

- **Prices are Yahoo Finance's own**, as its pages show them; some exchanges
  are delayed there, and the row's `price` section says by how much.
- **A symbol Yahoo does not know is skipped** and not charged; the rest of
  the run carries on.
- **A symbol two lists name is saved and charged once**, under the list that
  reached it first.
- **Yahoo's search returns only a handful of symbols per query**, the
  trending lists up to 100, and screeners as many as they hold; Max symbols
  per list caps each one.
- **Intraday price history is short-lived at Yahoo:** 1-minute bars for the
  last 30 days, 2 to 90-minute bars for the last 60 and hourly bars for the
  last 2 years. The Actor refuses a range Yahoo cannot answer before the run
  starts.
- **Option chains cover up to the three nearest expirations;** every
  expiration date and strike is listed either way. Past expirations are not
  available.
- **This Actor reads public Yahoo Finance data only.** It does not read
  Yahoo's premium research, portfolios or watchlists.

### More Actors from us

- [AliExpress Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/aliexpress-products-scraper): Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- [Amazon Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/amazon-products-scraper): Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- [App Store Reviews Scraper: All Reviews, Not 500](https://apify.com/luzivanlt/app-store-reviews-scraper): Every written App Store review of an app, not just the newest 500.
- [Career Site Jobs Scraper: Workday, Greenhouse, Lever](https://apify.com/luzivanlt/career-site-jobs-scraper): Every job on Greenhouse, Lever, Ashby, SmartRecruiters and Workday boards, checked against each board's count.
- [Facebook Ads Library Scraper: Meta Ads by Keyword or Page](https://apify.com/luzivanlt/facebook-ads-library-scraper): Meta Ad Library ads by keyword, Page or Ad Library link, with text, images, videos and dates.
- [Facebook Comments Scraper: With Replies](https://apify.com/luzivanlt/facebook-comments-scraper): Comments and replies from public Facebook posts, reels and videos, with reactions by type.

### Use it from an AI agent or the API

One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with `POST /v2/acts/…/runs` and read its dataset):

```text
POST https://api.apify.com/v2/acts/luzivanlt~yahoo-finance-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

With the sample input as its JSON body:

```json
{
  "symbols": ["AAPL", "MSFT", "NVDA", "SPY", "BTC-USD"],
  "maxSymbolsPerList": 25,
  "includeFinancials": false,
  "includeHistory": true,
  "historyRange": "1mo",
  "historyInterval": "1d",
  "optionExpirations": 0,
  "maxNewsPerSymbol": 5,
  "includeSimilarSymbols": false,
  "includeInsights": false
}
```

Its inputs, in the order of the input form:

| Input                                      | What it takes                                                                                                                                                                                                          | Default |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `symbols` (Ticker symbols)                 | Ticker symbols as Yahoo Finance writes them, one per line, up to 500 per run: stocks, ETFs, funds, indices, crypto, currencies and futures from any exchange Yahoo covers.                                             | —       |
| `searchQueries` (Search queries)           | Company or fund names to look up, one per line.                                                                                                                                                                        | —       |
| `trendingRegions` (Trending symbols in)    | Markets whose trending tickers to read: each region's list as Yahoo Finance shows it now, up to 100 symbols, each one a full row like a symbol you typed.                                                              | —       |
| `screeners` (Screeners)                    | Yahoo Finance's ready-made screeners (day gainers, most active, undervalued growth stocks, top ETFs and more): every symbol on each one becomes a full row, in the screener's order, up to Max symbols per list.       | —       |
| `maxSymbolsPerList` (Max symbols per list) | Stop each search query, trending list and screener after this many symbols, in the list's own order, from 1 to 1,000 (25 by default).                                                                                  | `25`    |
| `includeFinancials` (Financial statements) | Adds each symbol's income statement, balance sheet and cash flow: about 100 line items per period, for the last four fiscal years, the last five quarters and the trailing twelve months, as Yahoo Finance shows them. | `false` |
| `includeHistory` (Price history)           | Adds each symbol's price bars (open, high, low, close, adjusted close, volume) plus its dividends, splits and capital gains, for the range and interval below.                                                         | `false` |
| `historyRange` (History range)             | How far back the price history goes, counted from today: one day up to the symbol's whole history (max).                                                                                                               | `"1y"`  |
| `historyInterval` (History interval)       | The length of one price bar.                                                                                                                                                                                           | `"1d"`  |
| `historyStartDate` (History from)          | The first day of price history, written YYYY-MM-DD.                                                                                                                                                                    | —       |
| `historyEndDate` (History to)              | The last day of price history, written YYYY-MM-DD, that day included.                                                                                                                                                  | —       |
| `optionExpirations` (Option expirations)   | Adds each symbol's option chains, calls and puts with bid, ask, volume, open interest and implied volatility, for this many expiration dates, nearest first (0 to 3; 0 = none, the default).                           | `0`     |
| `maxNewsPerSymbol` (News per symbol)       | Adds up to this many of each symbol's newest news stories from Yahoo Finance (0 to 40; 0 = none, the default): title, publisher, link, publish time, thumbnail and the other tickers it names.                         | `0`     |
| `includeSimilarSymbols` (Similar symbols)  | Adds the symbols Yahoo Finance recommends alongside each one ("people also watch"), with Yahoo's own score for each.                                                                                                   | `false` |
| `includeInsights` (Insights)               | Adds Yahoo Finance's insights for each symbol: short, mid and long-term technical outlook, valuation, the analysts' rating and target, research report summaries, significant developments and SEC report notes.       | `false` |

Apify's MCP server, `https://mcp.apify.com`, lists it as `luzivanlt/yahoo-finance-scraper`. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=luzivanlt/yahoo-finance-scraper"
    }
  }
}
```

The client signs in with OAuth, or add `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`.

Charged per symbol delivered; the sample input above costs at most $0.07.

### FAQ

**Which symbols work?** Any symbol Yahoo Finance has a quote page for: US and
international stocks (`SAP.DE`, `7203.T`, `RELIANCE.NS`), ETFs, mutual funds,
indices (`^GSPC`), crypto (`BTC-USD`), currencies (`EURUSD=X`) and futures
(`GC=F`).

**Can I get only the price?** Every row carries the whole quote; switch off
the sections you do not need and use the Overview view or the fields you
want.

**How often is the data updated?** Each run reads what Yahoo Finance shows at
that moment. Schedule the Actor on Apify to keep a record over time.

# Changelog

This Actor's version history is a separate document: https://apify.com/luzivanlt/yahoo-finance-scraper/changelog.md

# Actor input Schema

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

Ticker symbols as Yahoo Finance writes them, one per line, up to 500 per run: stocks, ETFs, funds, indices, crypto, currencies and futures from any exchange Yahoo covers. A Yahoo Finance quote link works too. Each symbol is one row. Example: AAPL, 7203.T, BTC-USD, EURUSD=X, ^GSPC

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

Company or fund names to look up, one per line. Each query is read as Yahoo Finance's own search box answers it, and every symbol it finds becomes a row, up to Max symbols per list (Yahoo itself returns only a handful per query). Example: nvidia

## `trendingRegions` (type: `array`):

Markets whose trending tickers to read: each region's list as Yahoo Finance shows it now, up to 100 symbols, each one a full row like a symbol you typed. Pick none to skip. Example: \["US", "GB"]

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

Yahoo Finance's ready-made screeners (day gainers, most active, undervalued growth stocks, top ETFs and more): every symbol on each one becomes a full row, in the screener's order, up to Max symbols per list. Example: \["day_gainers", "most_actives"]

## `maxSymbolsPerList` (type: `integer`):

Stop each search query, trending list and screener after this many symbols, in the list's own order, from 1 to 1,000 (25 by default). It does not limit the symbols you type yourself. Each symbol saved is charged once.

## `includeFinancials` (type: `boolean`):

Adds each symbol's income statement, balance sheet and cash flow: about 100 line items per period, for the last four fiscal years, the last five quarters and the trailing twelve months, as Yahoo Finance shows them. One more request per symbol. Off by default.

## `includeHistory` (type: `boolean`):

Adds each symbol's price bars (open, high, low, close, adjusted close, volume) plus its dividends, splits and capital gains, for the range and interval below. One more request per symbol, and the bars ride on the symbol's own row. Off by default.

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

How far back the price history goes, counted from today: one day up to the symbol's whole history (max). A start date below overrides it. Used only with Price history on. Example: 1y

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

The length of one price bar. Yahoo keeps 1-minute bars for the last 30 days (up to 7 days per run), 2 to 90-minute bars for the last 60 days and hourly bars for the last 2 years; daily, weekly and monthly bars go back to the start. Example: 1d

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

The first day of price history, written YYYY-MM-DD. When set, it replaces History range, and the history runs to History to (or today). Leave empty to use History range. Used only with Price history on. Example: 2024-01-01

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

The last day of price history, written YYYY-MM-DD, that day included. Needs History from. Leave empty to run the history up to today. Used only with Price history on. Example: 2024-12-31

## `optionExpirations` (type: `integer`):

Adds each symbol's option chains, calls and puts with bid, ask, volume, open interest and implied volatility, for this many expiration dates, nearest first (0 to 3; 0 = none, the default). Every expiration date and strike is listed either way. One more request per expiration.

## `maxNewsPerSymbol` (type: `integer`):

Adds up to this many of each symbol's newest news stories from Yahoo Finance (0 to 40; 0 = none, the default): title, publisher, link, publish time, thumbnail and the other tickers it names. One more request per symbol.

## `includeSimilarSymbols` (type: `boolean`):

Adds the symbols Yahoo Finance recommends alongside each one ("people also watch"), with Yahoo's own score for each. One more small request per symbol. The similar symbols are listed on the row, not read as rows of their own. Off by default.

## `includeInsights` (type: `boolean`):

Adds Yahoo Finance's insights for each symbol: short, mid and long-term technical outlook, valuation, the analysts' rating and target, research report summaries, significant developments and SEC report notes. One more request per symbol. Off by default.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "NVDA",
    "SPY",
    "BTC-USD"
  ],
  "maxSymbolsPerList": 25,
  "includeFinancials": false,
  "includeHistory": true,
  "historyRange": "1mo",
  "historyInterval": "1d",
  "optionExpirations": 0,
  "maxNewsPerSymbol": 5,
  "includeSimilarSymbols": false,
  "includeInsights": false
}
```

# Actor output Schema

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

Every symbol the run saved, one row per symbol.

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

The same rows with every field.

# 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 = {
    "symbols": [
        "AAPL",
        "MSFT",
        "NVDA",
        "SPY",
        "BTC-USD"
    ],
    "includeHistory": true,
    "historyRange": "1mo",
    "maxNewsPerSymbol": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("luzivanlt/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 = {
    "symbols": [
        "AAPL",
        "MSFT",
        "NVDA",
        "SPY",
        "BTC-USD",
    ],
    "includeHistory": True,
    "historyRange": "1mo",
    "maxNewsPerSymbol": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("luzivanlt/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 '{
  "symbols": [
    "AAPL",
    "MSFT",
    "NVDA",
    "SPY",
    "BTC-USD"
  ],
  "includeHistory": true,
  "historyRange": "1mo",
  "maxNewsPerSymbol": 5
}' |
apify call luzivanlt/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

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