# Yahoo Finance Options Scraper: Chains, Greeks, IV (`automation_craft/yahoo-finance-options-scraper`) Actor

Scrape Yahoo Finance option chains for any US ticker, no login or API key: one row per contract with strike, bid, ask, volume, open interest, implied volatility and greeks. Every expiry or the ones you pick; filters run before billing. Contract lookups and option screeners.

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

## Pricing

from $0.38 / 1,000 option contracts

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 Options Scraper: Chains, Greeks, IV

**Yahoo Finance options chain data as one row per contract**: every expiry or the ones you pick, calls and puts, strike, bid, ask, last price, volume, open interest and implied volatility, with the greeks computed for you and filters applied before anything is charged. No login, no API key, no browser.

Give it tickers (AAPL, SPY, ^SPX), company names or ISINs, a symbol search, Yahoo's stock screeners, Yahoo's own option screeners (most active options, gainers, losers, highest open interest, highest implied volatility) or exact contract symbols. Pick the expiries (nearest N, exact dates, a days to expiry window, or every listed expiry) and the contracts (calls or puts, strike range or a window around the price, in or out of the money, minimum volume, open interest or implied volatility). Every contract that passes is delivered once and charged once.

#### What makes it different

- **Filters before billing.** A contract that does not pass your filters is never charged. Misses (an unknown symbol, a listing without options, an expired contract, an expiry date Yahoo does not list) are free rows that say what happened.
- **Greeks with their inputs on every row.** Delta, gamma, theta, vega, rho and the probability of expiring in the money, from the Black-Scholes-Merton model with the implied volatility solved from the bid and ask (else Yahoo's own, else the last trade's price, named on the row), the 13 week US Treasury bill rate and the carry the expiry's own prices imply. You can recompute every figure.
- **Every expiry in one run.** SPY's 32 expiries (9,377 contracts) were read and delivered in 10 seconds on the platform; ^SPX's 52 expiries (19,262 contracts, chain layout) in 25 seconds (2026-11-03, the default 256 MB).
- **Caps that keep the right contracts.** When a cap cuts an expiry, the contracts nearest the underlying price are kept, calls and puts in turn (contracts from option screeners and contract symbols keep the screener's order or your list's order). A run that stops early, or with a part Yahoo did not answer, gives a continuation token so the next run goes on where it stopped and never charges a contract twice.
- **Each contract charged once per run**, even when two sources bring it (a chain and an option screener): the second sighting is a free row flagged `repeatedInRun`.

### Quick start

1. Open the Actor and keep the example input (AAPL and SPY, nearest expiry, strikes within 5 percent of the price, at most 40 contracts), or put your own tickers.
2. Pick the expiries and filters you need (see Input below). Leave a filter empty to keep every contract.
3. Click **Start**. Rows appear in the dataset as each expiry is read.
4. Download the dataset as CSV, Excel or JSON, or read it through the API. The **Greeks** and **Value and break even** views show those columns side by side.

### What you get

One row per contract (layout `contracts`, the default), or one row per underlying and expiry with calls and puts as two lists (layout `chains`). The price is the same per contract in both layouts.

| Field | What it is |
|---|---|
| `contractSymbol` | The OCC symbol as Yahoo writes it (AAPL261218C00250000) |
| `underlyingSymbol`, `underlyingName`, `underlyingExchange`, `underlyingPrice`, `underlyingPriceTime`, `underlyingMarketState` | The stock, ETF or index, its price from the same answer as the chain |
| `optionType`, `strike`, `expirationDate`, `daysToExpiration`, `contractSize`, `currency` | The contract |
| `lastPrice`, `change`, `percentChange`, `lastTradeDate` | The last trade |
| `bid`, `ask`, `mid`, `spread`, `spreadPercent` | The quote (`mid` only when both sides are above zero) |
| `volume`, `openInterest` | Activity |
| `impliedVolatility`, `impliedVolatilityIsPlaceholder` | Yahoo's implied volatility, with its 0.00001 placeholder flagged |
| `inTheMoney`, `moneynessPercent`, `intrinsicValue`, `timeValue`, `breakEven`, `premiumBasis` | Value of the contract (premium = the mid, else the last price) |
| `delta`, `gamma`, `theta`, `vega`, `rho`, `probabilityInTheMoney` | The greeks (theta per calendar day, vega and rho per percentage point) |
| `greeksVolatility`, `greeksVolatilitySource`, `greeksRatePercent`, `greeksCarryPercent`, `greeksCarrySource`, `greeksNote` | The model's inputs, and why a figure is null when it is |
| `source`, `screener`, `screenerRank`, `position` | Where the row came from (every row is built from the option chain of its expiry) |
| `dayOpen`, `dayHigh`, `dayLow`, `previousClose`, `fiftyTwoWeekHigh`, `fiftyTwoWeekLow`, `firstTradeDate`, `exchangeDataDelayedBy` | Extra fields of contracts found by an option screener or by their symbol (`exchangeDataDelayedBy`: Yahoo's quote delay in minutes) |
| `repeatedInRun` | `true` on the free row of a contract a second source of the same run brought again |
| `sourceUrl`, `scrapedAt` | The contract's Yahoo Finance page, the time it was read |

#### How complete is the data?

Measured on Yahoo Finance's full option chains of ten underlyings (AAPL, SPY, TSLA, ^SPX, ^VIX, BRK-B, SOFI, GLD, TLT,
AMC: every expiry, 46,718 contracts), twice with US markets closed (2026-11-03 at 06:00 and 10:05 UTC), and on a run of
every SPY expiry (9,377 contracts, 10:10 UTC):

| Field | Ten underlyings (markets closed) | SPY every expiry |
|---|---|---|
| Contract symbol, strike, expiry, last price, change, bid, ask, implied volatility, in the money flag | 100% present | 100% present |
| Bid and ask both above 0 (so `mid` and `spread` are set) | 43.9% (mostly index chains) | 5.7% |
| Yahoo's implied volatility above its 0.00001 placeholder | 72.9% | 62.3% |
| Open interest above 0 | 3.4% | 4.3% |
| Volume | 94.0% (Yahoo leaves it out when the contract did not trade; it then counts as 0 for `minVolume`) | |
| Greeks | | 93.7% of contracts; volatility from Yahoo 58.2%, from the last trade 31.0%, from the mid 4.5% |

Outside US market hours Yahoo freezes most quotes at 0, so bid, ask and open interest are thin; the market hours
figures were not measured for this version. `greeksVolatilitySource` on every row says which volatility the greeks
used.

### How much does it cost to scrape Yahoo Finance options?

You pay per option contract delivered, plus a small start fee per run. Contracts that do not pass your filters, misses (unknown symbols, listings without options, expired contracts, unlisted expiry dates), repeats within a run and the free status rows cost nothing. Platform usage is included: there is no compute charge on top.

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Option contract, per 1,000 contracts | $0.53 | $0.49 | $0.44 | $0.38 |
| Actor start, per run (per GB of memory; the default 256 MB is one start) | $0.0020 | $0.0020 | $0.0020 | $0.0020 |

Platinum and Diamond plans pay the Gold price. The Actor start is the same on every plan (no discount).

The Store pricing card shows these same prices per 1,000 events: "$0.38 / 1,000" on the Option contract row means one contract costs 0.038 cents on the Gold plan (0.053 cents on Free).

What a run costs, start fee included (Free | Bronze | Silver | Gold):

| Run | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| The example input: AAPL and SPY, nearest expiry, strikes within 5 percent, 40 contracts | $0.0232 | $0.0216 | $0.0196 | $0.0172 |
| One underlying's nearest expiry, about 100 contracts | $0.0550 | $0.0510 | $0.0460 | $0.0400 |
| SPY, every listed expiry (9,377 contracts on 2026-11-03) | $4.9718 | $4.5967 | $4.1279 | $3.5653 |

Set a charge limit on the run (Apify's "Max cost per run") and the Actor stops before it: it never delivers a contract the limit cannot pay, and the run summary gives a continuation token to go on later.

### Input

| Setting | What it does |
|---|---|
| `tickers` | Underlyings as Yahoo writes them: AAPL, SPY, BRK-B, ^SPX, ^VIX (up to 500). Yahoo has option chains for US listings only. |
| `companyNamesOrIsins` | Names or ISINs, resolved through Yahoo's own search; used only when exactly one US listed stock, ETF or index comes back, otherwise a free row lists the candidates. |
| `symbolSearches`, `maxSearchResults` | Free words; every US listed match (up to the maximum) becomes an underlying. |
| `underlyingScreeners`, `maxTickersPerScreener` | Yahoo's predefined stock screeners and the US trending list as underlyings. |
| `optionScreeners`, `maxRowsPerOptionScreener` | Yahoo's option screeners: most active, gainers, losers, highest open interest, highest implied volatility. |
| `contractSymbols` | Exact contracts by symbol (up to 1,000). |
| `expirationDates`, `maxExpirations`, `minDaysToExpiration`, `maxDaysToExpiration` | Which expiries of each underlying: exact dates, nearest N (0 = all), a days to expiry window. Left empty: the nearest expiry. |
| `contractType`, `minStrike`, `maxStrike`, `strikeRangePercent`, `moneyness`, `minVolume`, `minOpenInterest`, `minImpliedVolatility` | Contract filters, applied before any charge, to every source. |
| `maxContractsPerTicker`, `maxItems` | Caps per underlying and per run (the contracts nearest the price are kept when a cap cuts an expiry). A run delivers at most 200,000 contracts; the run summary then gives a continuation token for the rest. |
| `outputFormat` | `contracts` (one row per contract) or `chains` (one row per expiry). |
| `includeGreeks` | On by default, no extra charge. |
| `compactOutput` | About 25 core fields per contract, for AI agents and narrow sheets. |
| `continuationToken` | Go on with a run that stopped early: paste the token from its run summary, keep every other setting the same (valid 7 days). |
| `proxyConfiguration` | Optional; without it the run asks Yahoo from its own address and retries through Apify's datacenter proxy. |

A setting that cannot be read (a word where a number belongs, an unknown setting name) stops the run before anything is fetched: only the run's start fee is charged, and a free row says what to change. An unusable entry in a list (a symbol with a typo next to good ones) is a free row naming its position; the rest runs.

### Output example

A real row (AAPL, read on the platform; contracts and prices change every day):

```json
{
  "type": "contract",
  "contractSymbol": "AAPL261104C00337500",
  "underlyingSymbol": "AAPL",
  "optionType": "call",
  "expirationDate": "2026-11-04",
  "daysToExpiration": 1,
  "strike": 337.5,
  "currency": "USD",
  "contractSize": "REGULAR",
  "lastPrice": 8.1,
  "change": 0,
  "percentChange": 0,
  "lastTradeDate": "2026-11-02T20:59:45.000Z",
  "bid": 0,
  "ask": 0,
  "mid": null,
  "spread": null,
  "spreadPercent": null,
  "volume": 4312,
  "openInterest": 0,
  "impliedVolatility": 1.0000000000000003e-05,
  "impliedVolatilityIsPlaceholder": true,
  "inTheMoney": true,
  "moneynessPercent": -0.2424,
  "intrinsicValue": 0.82,
  "timeValue": 7.28,
  "breakEven": 345.6,
  "premiumBasis": "last",
  "underlyingPrice": 338.32,
  "underlyingPriceTime": "2026-11-02T21:00:01.000Z",
  "underlyingMarketState": "PRE",
  "underlyingName": "Apple Inc.",
  "underlyingExchange": "NasdaqGS",
  "delta": 0.529484,
  "gamma": 0.02070528,
  "theta": -2.644831,
  "vega": 0.085004,
  "rho": 0.006821,
  "probabilityInTheMoney": 0.5069,
  "greeksVolatility": 0.899343,
  "greeksVolatilitySource": "lastPrice",
  "greeksRatePercent": 4.0578,
  "greeksCarryPercent": 0,
  "greeksCarrySource": "dividendYield",
  "greeksNote": null,
  "source": "chain",
  "sourceUrl": "https://finance.yahoo.com/quote/AAPL261104C00337500",
  "scrapedAt": "2026-11-03T10:03:48.617Z"
}
```

Every run ends with one `summary` row: what was read, what was delivered and charged, what stopped the run (`stoppedBy`), the continuation token when work was left, and the free work allowance used.

### Use it from your code, an automation or an AI agent

- **API**: start a run and get the rows in one call with Apify's synchronous endpoint:

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~yahoo-finance-options-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"tickers": ["SPY"], "maxExpirations": 3, "strikeRangePercent": 5, "contractType": "puts"}'
```

- **Node.js** (`apify-client`):

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation_craft/yahoo-finance-options-scraper').call({ tickers: ['AAPL'], maxExpirations: 0, minOpenInterest: 100 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

- **Python** (`apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automation_craft/yahoo-finance-options-scraper").call(run_input={"tickers": ["TSLA"], "expirationDates": ["2026-12-18"]})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["contractSymbol"], row["bid"], row["ask"], row["delta"])
```

- **AI agents**: the Actor is a tool in Apify's MCP server (`https://mcp.apify.com`); `compactOutput: true` keeps the answer short.
- **Schedules and integrations**: run it on an Apify schedule and send the dataset to Google Sheets, Make, Zapier or n8n.

### What this Actor does NOT do

- **Expired or historical chains.** Yahoo keeps no expired contract (it answers "No data found, symbol may be delisted"), so a past chain cannot be read; schedule a run to keep your own history.
- **Options outside US listings.** Yahoo lists no option chain for listings outside the United States (VOD.L, SAP.DE, RELIANCE.NS, 7203.T, RY.TO and others had none); their US listings (RY, INFY) work.
- **Real time quotes.** Yahoo shows option quotes with a delay (15 to 20 minutes); outside US market hours most contracts show a bid and ask of 0 and Yahoo's placeholder implied volatility. The data is Yahoo Finance's public delayed data, not for trading.
- **A live endpoint kept running between calls.** Each call is an Actor run (a few seconds to start); use the synchronous API endpoint or Apify's MCP server.
- **AI written commentary** about contracts.
- **Monitoring or alerts.** Each run reads the chains as they are now; nothing is remembered between runs (the continuation token is yours to carry).
- **Language or region settings.** Yahoo serves one option chain whatever the language or region.
- **Contracts without a chain.** Every row is built from the option chain of its expiry: a contract an option screener or your list names whose chain Yahoo's options endpoint does not serve (an underlying it does not know there, an expiry it does not list) is a free row, not a contract.

### FAQ

#### How do I get options chain data from Yahoo Finance?

Put the ticker in `tickers` and run: the nearest expiry comes back as one row per contract. Set `maxExpirations` to 0 for every listed expiry, or give exact `expirationDates`.

#### Can I get all expiration dates of an option chain?

Yes. `maxExpirations: 0` reads every expiry Yahoo lists for the underlying (32 for SPY, 52 for ^SPX on 2026-11-03), and `minDaysToExpiration` and `maxDaysToExpiration` keep a window.

#### Why do Yahoo Finance options show a bid and ask of 0?

Outside US market hours Yahoo shows a bid and ask of 0 for most contracts and an implied volatility of 0.00001 (a placeholder, flagged as `impliedVolatilityIsPlaceholder`). The `mid` is then null, and the greeks use Yahoo's real implied volatility or the last trade's price; `greeksVolatilitySource` says which.

#### Why can't I replicate Yahoo's implied volatility?

Yahoo does not publish its model or inputs. This Actor solves its own implied volatility from the bid and ask with the Black-Scholes-Merton model and puts every input on the row (`greeksVolatility`, `greeksRatePercent`, `greeksCarryPercent`, time to 16:00 New York on the expiry date), so you can check it.

#### Can I export the options chain to Excel or CSV?

Yes. With the default layout every contract is a flat row: download the dataset as CSV or Excel from the run, or through the API with `format=csv`.

#### Why does this Actor run with limited permissions?

It needs nothing beyond its own run storage (the dataset and a small marker that tells a restarted run from a new one), so it runs with Apify's least privilege setting. It cannot read or change anything else in your account.

### Changelog

- 0.1 (2026-11): first version.

### More data tools by Automation Craft

- [Yahoo Finance Scraper: Quotes, History, Financials](https://apify.com/automation_craft/yahoo-finance-scraper)
- [SEC Form 4 Insider Trading Scraper: Buys & Sells](https://apify.com/automation_craft/sec-form-4-insider-trading-scraper)
- [SEC 13F Holdings Scraper: Hedge Fund Portfolios](https://apify.com/automation_craft/sec-13f-holdings-scraper)
- [SEC Financial Statements Scraper: XBRL by Ticker](https://apify.com/automation_craft/sec-xbrl-financials-scraper)
- [SEC Filings Scraper: 10-K, 8-K, Full-Text Search](https://apify.com/automation_craft/sec-filings-scraper)
- [SEC Form D Scraper: Offerings & Funding Leads](https://apify.com/automation_craft/sec-form-d-scraper)
- [Google News Scraper: Search, Topics, Decoded URLs](https://apify.com/automation_craft/google-news-scraper)

# Changelog

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

# Actor input Schema

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

US listed stocks, ETFs and indexes whose option chains you want, as Yahoo Finance writes them: AAPL, SPY, BRK-B, ^SPX, ^VIX. Up to 500. A Yahoo Finance quote link works too. Yahoo has no option chains for listings outside the United States (VOD.L, SAP.DE, RELIANCE.NS); use their US listing if they have one. A symbol Yahoo does not know is a free row with Yahoo's suggestions.

## `companyNamesOrIsins` (type: `array`):

Names (Tesla) or ISINs (US0378331005), up to 50. Each is resolved through Yahoo Finance's own search and used only when Yahoo gives exactly ONE US listed stock, ETF or index for it; otherwise a free row lists Yahoo's candidates so you can put the symbol you mean in Tickers. ISINs resolve exactly; common names often have several candidates.

## `symbolSearches` (type: `array`):

Free words (semiconductor, gold miners), up to 10. Every US listed stock, ETF or index Yahoo Finance's search returns for a word, up to Max search results, becomes an underlying.

## `maxSearchResults` (type: `integer`):

Underlyings taken from each symbol search (1 to 25). Default 5.

## `underlyingScreeners` (type: `array`):

Yahoo Finance's predefined stock screeners and the US trending list: their top symbols (up to Max tickers per screener) become underlyings. Funds and crypto rows have no options and come back as free rows.

## `maxTickersPerScreener` (type: `integer`):

Symbols taken from each stock screener, from the top (1 to 100). Default 10.

## `optionScreeners` (type: `array`):

Yahoo Finance's own option screeners: most active options, option gainers and losers, the highest open interest and the highest implied volatility. Their contracts are delivered as contract rows in the screener's order (screener and screenerRank on each row), with the same fields and greeks as a chain row. How many contracts a screener lists depends on the time of day (some are empty outside US market hours).

## `maxRowsPerOptionScreener` (type: `integer`):

Contracts read from each option screener, from the top (1 to 250). Default 25.

## `contractSymbols` (type: `array`):

Exact option contracts by their symbol (root, YYMMDD, C or P, strike times 1,000 in 8 digits), for example AAPL261218C00250000, up to 1,000. Each comes with the day's open, high, low and previous close and the contract's 52 week range on top of the chain fields. An expired contract is a free not found row (Yahoo keeps no expired contracts).

## `expirationDates` (type: `array`):

Only these expiry dates (YYYY-MM-DD), up to 60. A date Yahoo does not list for an underlying is a free row naming the nearest listed date. Without dates, the expiries are the nearest ones (see Max expiries).

## `maxExpirations` (type: `integer`):

The nearest N expiries of each underlying (after the dates and the days to expiry window are applied); 0 means every listed expiry. Left empty: the nearest one when no dates and no window are given, otherwise every expiry that matches them.

## `minDaysToExpiration` (type: `integer`):

Only expiries at least this many calendar days away, counted from the run's date in New York (0 to 3650).

## `maxDaysToExpiration` (type: `integer`):

Only expiries at most this many calendar days away, counted from the run's date in New York (0 to 3650).

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

Which side of each chain is delivered.

## `minStrike` (type: `number`):

Only strikes at or above this price.

## `maxStrike` (type: `number`):

Only strikes at or below this price.

## `strikeRangePercent` (type: `number`):

Only strikes within this many percent of the underlying price, for example 10 keeps strikes from 90 to 110 percent of the price. A contract whose underlying price Yahoo did not give fails this filter.

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

Yahoo Finance's own in the money flag of each contract.

## `minVolume` (type: `integer`):

Only contracts with at least this many contracts traded today. Yahoo leaves the volume out for a contract without trades today; that counts as 0.

## `minOpenInterest` (type: `integer`):

Only contracts with at least this open interest. Outside US market hours Yahoo shows an open interest of 0 for most contracts (3.4 percent of 46,718 contracts had one above 0 on 2026-11-03 at 06:00 UTC), so this filter is best used while the market is open.

## `minImpliedVolatility` (type: `number`):

Only contracts whose implied volatility from Yahoo Finance is at least this value, as a decimal (0.3 is 30 percent). A contract without one from Yahoo (contracts found by a screener or a symbol carry none when their chain does not list them) fails it.

## `maxContractsPerTicker` (type: `integer`):

At most this many contracts per underlying in the run, nearest expiry first; when an expiry does not fit whole, the contracts nearest the underlying price are kept (calls and puts in turn). Empty: no limit.

## `maxItems` (type: `integer`):

Stop after this many contracts in total (at most 200,000; a run delivers at most 200,000 contracts, and the run summary then carries a continuation token for the rest). When an expiry of an underlying does not fit whole, the contracts nearest the underlying price are kept; contracts from option screeners and contract symbols keep their list's order. Empty: up to 200,000 (the run's charge limit still applies).

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

Contracts: one row per contract, every field flat (best for CSV and Excel). Chains: one row per underlying and expiry, with calls and puts as two lists. The price is per contract in both.

## `includeGreeks` (type: `boolean`):

Delta, gamma, theta, vega, rho and the probability of expiring in the money from the Black-Scholes-Merton model, with the implied volatility solved from the bid and ask, the 13 week T-bill rate and the carry the expiry's own prices imply (inputs on every row). No extra charge.

## `compactOutput` (type: `boolean`):

Keep about 25 core fields per contract (fewer tokens for an AI agent, a narrower sheet).

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

To go on with a run that stopped early (Max contracts in the run, the charge limit, an abort) or left a part Yahoo did not answer: paste the continuationToken from its run summary and keep every other setting the same. It skips what ended, never charges a contract the earlier runs delivered, and is valid for 7 days. A chain of runs carries up to 1,000,000 delivered contracts in its token.

## `proxyConfiguration` (type: `object`):

Optional. Without it the run asks Yahoo Finance from its own address and retries through Apify's datacenter proxy. Your own proxy links, or Apify Proxy groups, replace that; a RESIDENTIAL group is replaced by the datacenter group (Yahoo answers it, and residential traffic would cost more than the rows).

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "SPY"
  ],
  "maxExpirations": 1,
  "contractType": "both",
  "strikeRangePercent": 5,
  "moneyness": "all",
  "maxItems": 40,
  "outputFormat": "contracts",
  "includeGreeks": true,
  "compactOutput": false
}
```

# Actor output Schema

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

No description

# 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",
        "SPY"
    ],
    "maxExpirations": 1,
    "strikeRangePercent": 5,
    "maxItems": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/yahoo-finance-options-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",
        "SPY",
    ],
    "maxExpirations": 1,
    "strikeRangePercent": 5,
    "maxItems": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/yahoo-finance-options-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",
    "SPY"
  ],
  "maxExpirations": 1,
  "strikeRangePercent": 5,
  "maxItems": 40
}' |
apify call automation_craft/yahoo-finance-options-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/yahoo-finance-options-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/nWo63wU3twHdS4ppU/builds/qDadGjt8nVSfa7jQs/openapi.json
