# Fotocasa Price Index

The official Fotocasa Research index. One request returns all 52 provinces with median sale price per square metre, median rent price per square metre, listing count and population. Municipal-level detail is not published on this surface.

- **Documentation:** [https://scrappa.co/docs/fotocasa-api/fotocasa_price_index](https://scrappa.co/docs/fotocasa-api/fotocasa_price_index)
- **API group:** Fotocasa API
- **Endpoint:** `GET https://scrappa.co/api/fotocasa/price-index`

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

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/fotocasa/price-index"
```

## Example response

```json
{
    "success": true,
    "data": {
        "province_count": 52,
        "provinces": [
            {
                "name": "Araba - \u00c1lava",
                "median_price_sqm": 2685.99,
                "median_rent_price_sqm": 12.81
            }
        ]
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing or location was not found. This response is not billable. |
| 422 | Validation Error | A public parameter is invalid, including an unknown property_type or transaction_type. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result from Fotocasa. 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)
