# Get Historical Prices

Get historical OHLCV candles for a symbol with a chosen range and interval. Each candle carries an ISO date and a Unix timestamp. Dividends, stock splits and capital gains are returned as separate dated event lists. Weekly and monthly intervals are grouped from daily candles; the date is the first trading day of the period, volume is summed and close is the last daily close.

- **Documentation:** [https://scrappa.co/docs/yahoo-finance-api/yahoo_finance_history](https://scrappa.co/docs/yahoo-finance-api/yahoo_finance_history)
- **API group:** Yahoo Finance API
- **Endpoint:** `GET https://scrappa.co/api/yahoo-finance/history`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | Ticker symbol, e.g. AAPL. |
| `range` | string | No | One of 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd or max. Default 1y. |
| `interval` | string | No | One of 1d, 1wk or 1mo. Default 1d. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yahoo-finance/history?symbol=AAPL&range=1mo&interval=1d"
```

## Example response

```json
{
    "symbol": "AAPL",
    "currency": "USD",
    "range": "1mo",
    "interval": "1d",
    "candles": [
        {
            "date": "2026-10-16",
            "timestamp": 1792108800,
            "open": 197.4,
            "high": 199.6,
            "low": 196.1,
            "close": 198.4,
            "volume": 48234567,
            "adjusted_close": 198.1
        }
    ],
    "events": {
        "dividends": [],
        "splits": [],
        "capital_gains": []
    },
    "source": "yahoo_finance"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Not found | No history was returned for the symbol. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
