# Sreality Price Graph API

Return the public market price graph for a property category and month range.

## Dates and categories

Both dates use the `YYYY-MM` format. The public price-per-square-metre series exists for flats (`property_type=1`) only; other categories may return an empty series or no series.

## Scope

This is an aggregate market time series, not a listing-level price history. It does not provide server-side price-per-square-metre listing filters or sorting.

- **Documentation:** [https://scrappa.co/docs/sreality-api/sreality_price_graph](https://scrappa.co/docs/sreality-api/sreality_price_graph)
- **API group:** Sreality API
- **Endpoint:** `GET https://scrappa.co/api/sreality/price-graph`

## 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 |
| --- | --- | --- | --- |
| `property_type` | integer | Yes | Property category identifier from 1 to 5; the public price-per-square-metre series is available for flats (1). |
| `date_from` | string | Yes | First month in YYYY-MM format, for example 2024-01. |
| `date_to` | string | Yes | Last month in YYYY-MM format, for example 2026-10. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/sreality/price-graph?property_type=1&date_from=2024-01&date_to=2026-10"
```

## Example response

```json
{
    "success": true,
    "data": {
        "result": {
            "graph_main": [
                {
                    "year": 2024,
                    "month": 1,
                    "avg_price_per_sqm": 106400
                },
                {
                    "year": 2024,
                    "month": 2,
                    "avg_price_per_sqm": 107100
                },
                {
                    "year": 2024,
                    "month": 3,
                    "avg_price_per_sqm": 108250
                }
            ]
        }
    },
    "meta": {
        "endpoint_family": "market_data",
        "billable": true,
        "retryable": false
    }
}
```

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