# Google Finance Historical Data API

Get historical price and volume data for a financial instrument. Supports various time ranges from 1 day to maximum available, or custom date ranges with daily, weekly, or monthly intervals. Use [Search Financial Instruments](/docs/google-finance-api/google_finance_search) to resolve a symbol and exchange, pair this with the [Google Finance quote API](/docs/google-finance-api/google_finance_quote) for current ticker details, or use [Intraday Graph Data](/docs/google-finance-api/google_finance_intraday) for minute-level charts.

- **Documentation:** [https://scrappa.co/docs/google-finance-api/google_finance_historical](https://scrappa.co/docs/google-finance-api/google_finance_historical)
- **API group:** Google Finance API
- **Endpoint:** `GET https://scrappa.co/api/google-finance/historical`

## 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 | Stock symbol (e.g., AAPL) |
| `exchange` | string | No | Exchange code (e.g., NASDAQ) |
| `range` | integer | No | Time range: 1=1d, 2=5d, 3=1m, 4=6m, 5=YTD, 6=1y, 7=5y, 8=max (default: 6) |
| `start_date` | string | No | Start date for custom range (YYYY-MM-DD) |
| `end_date` | string | No | End date for custom range (YYYY-MM-DD) |
| `interval` | string | No | Data interval: daily, weekly, monthly (default: daily) |
| `hl` | string | No | Language code (default: en) |
| `gl` | string | No | Country code (default: us) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/google-finance/historical?symbol=AAPL&exchange=NASDAQ&range=6"
```

## Example response

```json
{
    "symbol": "AAPL",
    "exchange": "NASDAQ",
    "currency": "USD",
    "previous_close": 275.5,
    "prices": [
        {
            "date": 1739480400,
            "close": 241.53,
            "change": 0,
            "percent_change": 0,
            "volume": 53614054
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Missing required symbol parameter |  |
|  | Google Finance request failed |  |

## 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)
