# Yahoo Finance 期权链 API (yahoo_finance.options)

- Canonical page: https://everyinfra.com/yahoo-finance-api/options
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yahoo_finance", "action": "options", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=yahoo_finance&action=options

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Yahoo Finance 标的代码，例如 AAPL；不是公司名全文搜索，市场后缀须保留。options 每次针对一个代码返回期权链。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| contract_symbol | 期权合约代码。 |
| strike | 行权价。 |
| last_price | 最新价。 |
| bid | 买一价。 |
| ask | 卖一价。 |
| volume | 成交量。 |
| open_interest | 未平仓合约数。 |
| implied_volatility | 隐含波动率。 |
| in_the_money | 是否为价内期权。 |
| expiration | 到期日。 |
| symbol | 股票代码。 |
| expiration_dates | 全部到期日。 |
| strikes | 全部行权价档位。 |
| calls | 看涨期权列表。 |
| puts | 看跌期权列表。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "yahoo_finance",
  "action": "options",
  "params": {
    "keyword": "AAPL"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "yahoo_finance",
        "action": "options",
        "params": {
            "keyword": "AAPL",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "yahoo_finance",
  "action": "options",
  "results": {
    "symbol": "AAPL",
    "expiration_dates": [
      "2026-09-28T00:00:00+00:00",
      "2026-09-30T00:00:00+00:00",
      "2026-10-02T00:00:00+00:00"
    ],
    "strikes": [
      250,
      255,
      265
    ],
    "calls": [
      {
        "contract_symbol": "AAPL260928C00250000",
        "strike": 250,
        "last_price": 89.85,
        "bid": 89.25,
        "ask": 92.7,
        "volume": 1,
        "open_interest": 1,
        "implied_volatility": 2.24365673461914,
        "in_the_money": true,
        "expiration": "2026-09-28T00:00:00+00:00"
      },
      {
        "contract_symbol": "AAPL260928C00265000",
        "strike": 265,
        "last_price": 72.52,
        "bid": 74.05,
        "ask": 77.75,
        "volume": 4,
        "open_interest": 5,
        "implied_volatility": 1.9111332568359376,
        "in_the_money": true,
        "expiration": "2026-09-28T00:00:00+00:00"
      },
      {
        "contract_symbol": "AAPL260928C00270000",
        "strike": 270,
        "last_price": 65.74,
        "bid": 69.05,
        "ask": 72.95,
        "volume": 2,
        "open_interest": 3,
        "implied_volatility": 1.84765701171875,
        "in_the_money": true,
        "expiration": "2026-09-28T00:00:00+00:00"
      }
    ],
    "puts": [
      {
        "contract_symbol": "AAPL260928P00250000",
        "strike": 250,
        "last_price": 0.01,
        "bid": 0,
        "ask": 0.01,
        "volume": 7,
        "open_interest": 4,
        "implied_volatility": 1.0625046875000002,
        "in_the_money": false,
        "expiration": "2026-09-28T00:00:00+00:00"
      },
      {
        "contract_symbol": "AAPL260928P00255000",
        "strike": 255,
        "last_price": 0.01,
        "bid": 0,
        "ask": 0.01,
        "volume": 2,
        "open_interest": 4,
        "implied_volatility": 1.000005,
        "in_the_money": false,
        "expiration": "2026-09-28T00:00:00+00:00"
      },
      {
        "contract_symbol": "AAPL260928P00265000",
        "strike": 265,
        "last_price": 0.05,
        "bid": 0,
        "ask": 0.01,
        "volume": 36,
        "open_interest": 12,
        "implied_volatility": 0.87500125,
        "in_the_money": false,
        "expiration": "2026-09-28T00:00:00+00:00"
      }
    ],
    "platform": "yahoo_finance"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=yahoo_finance
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
