# Yahoo Finance Historical prices API (yahoo_finance.history)

- Canonical page: https://everyinfra.com/en/yahoo-finance-api/history
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yahoo_finance", "action": "history", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- 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=history

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies a single Yahoo Finance ticker symbol (e.g., AAPL) with required exchange suffixes retained. It does not perform full-text company name searches. The history, financials, news, analyst, and options actions process one ticker per request to retrieve historical market data, financial statements, news items, analyst coverage, or options chains. |
| interval | not declared | no | not declared | Defines the candlestick time step for the Yahoo Finance history action, defaulting to 1d. Allowed values include minute intervals (1m, 2m, 5m, 15m, 30m, 60m, 90m), hourly (1h), daily (1d, 5d), weekly (1wk), and monthly (1mo, 3mo). Note that 1m represents one minute, not one month, and sub-daily intervals paired with long periods may be subject to historical lookback limits. |
| period | not declared | no | not declared | Sets the historical lookback duration for the Yahoo Finance history action, defaulting to 1mo. Supported values include days (1d, 5d), months (1mo, 3mo, 6mo), years (1y, 2y, 5y, 10y), year-to-date (ytd), and maximum available history (max). Selecting max does not guarantee a complete dataset dating back to an asset's initial public offering. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| symbol | platform-native meaning |
| date | platform-native meaning |
| open | platform-native meaning |
| high | platform-native meaning |
| low | platform-native meaning |
| close | platform-native meaning |
| volume | platform-native meaning |
| dividends | platform-native meaning |
| stock_splits | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example 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": "history",
  "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": "history",
        "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; the list keeps the first 2 of 22. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "yahoo_finance",
  "action": "history",
  "results": [
    {
      "symbol": "AAPL",
      "date": "2026-08-26T00:00:00-04:00",
      "open": 310.3,
      "high": 315.43,
      "low": 308.8,
      "close": 313.45,
      "volume": 34024500,
      "stock_splits": 0,
      "platform": "yahoo_finance"
    },
    {
      "symbol": "AAPL",
      "date": "2026-08-27T00:00:00-04:00",
      "open": 310.55,
      "high": 315.4,
      "low": 309.4,
      "close": 314.58,
      "volume": 32419200,
      "stock_splits": 0,
      "platform": "yahoo_finance"
    }
  ],
  "count": 22,
  "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
