# CoinGecko History API Documentation

<p><strong>CoinGecko History API Documentation</strong> Read a price, market cap and volume series for one coin id. Each point has an ISO-8601 timestamp and a price with currency. Pass a day count from 1 to 365. The free public series reaches back 365 days. A larger count returns 422. An unknown id or empty series costs no credit. Cost: 1 credit per successful request. Scrappa is an independent service and is not affiliated with or endorsed by CoinGecko.</p>

- **Documentation:** [https://scrappa.co/docs/coingecko-api/coingecko_history](https://scrappa.co/docs/coingecko-api/coingecko_history)
- **API group:** CoinGecko API
- **Endpoint:** `GET https://scrappa.co/api/coingecko/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 |
| --- | --- | --- | --- |
| `id` | string | Yes | Lowercase CoinGecko id, e.g. bitcoin. |
| `days` | integer | No | Number of days, 1 to 365, default 30. The free public series reaches back 365 days. |
| `currency` | string | No | Quote currency: USD (default), EUR, GBP or BTC. Other values return 422. |

## Example response

```json
{
    "data": {
        "id": "bitcoin",
        "days": 30,
        "points": 30,
        "history": [
            {
                "price": 67000.5,
                "volume": 28000000000,
                "currency": "USD",
                "timestamp": "2026-10-18T00:00:00Z",
                "market_cap": 1320000000000
            }
        ],
        "currency": "USD",
        "requested_days": 30
    },
    "meta": {
        "source": "coingecko",
        "credits": 1,
        "billable": true,
        "endpoint_family": "history"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | The upstream data is temporarily unavailable. This response is not billable. |

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