# Geizhals Price History API Documentation

Scrappa's `GET /api/geizhals/price-history` endpoint returns historical price data for a known Geizhals product id as structured JSON. Use a product id from a Geizhals product URL such as `...-a2194110.html`, then request a history window with `days` and a market with `loc`.

This endpoint is scoped to price history only. It does not search Geizhals, discover product ids, fetch current offer rows, merchants, categories, specs, or reviews.

- **Documentation:** [https://scrappa.co/docs/geizhals-api/geizhals_price_history](https://scrappa.co/docs/geizhals-api/geizhals_price_history)
- **API group:** Geizhals API
- **Endpoint:** `GET https://scrappa.co/api/geizhals/price-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 |
| --- | --- | --- | --- |
| `product_id` | integer | Yes | Known Geizhals product id from product URLs such as ...-a2194110.html. |
| `days` | integer | No | History window in days. Defaults to 31. Maximum 3650. |
| `loc` | string | No | Market code: de, at, eu, pl, or uk. Defaults to de. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/geizhals/price-history?product_id=2194110&days=31&loc=de"
```

## Example response

```json
{
    "success": true,
    "product_id": 2194110,
    "loc": "de",
    "days": 31,
    "current_best": 49.9,
    "min": 31.43,
    "max": 129,
    "first_timestamp": 1575849600,
    "last_timestamp": 1784419199,
    "last_formatted": "18.07.2026",
    "history": [
        {
            "timestamp_ms": 1781654400000,
            "timestamp": 1781654400,
            "price": 49.9,
            "marker": 1
        }
    ],
    "meta": {
        "duration_ms": 543,
        "history_count": 1
    }
}
```

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