# Aqarmap Location Statistics API Documentation

Scrappa's `GET /api/aqarmap/location-stats` returns Aqarmap's market figures for one location and property type: `average_price`, `price_growth_percent`, `demand_heat` and area `ratings` (overall, neighborhood, education, location, transportation, population, life style, healthcare, each 0 to 10). `ratings` is `null` when Aqarmap has none for the location.

- **Documentation:** [https://scrappa.co/docs/aqarmap-api/aqarmap_location_stats](https://scrappa.co/docs/aqarmap-api/aqarmap_location_stats)
- **API group:** Aqarmap API
- **Endpoint:** `GET https://scrappa.co/api/aqarmap/location-stats`

## 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 |
| --- | --- | --- | --- |
| `location` | integer | Yes | Location id from the locations endpoint, for example 36. |
| `property_type` | integer | No | Property type id (default 1, apartments). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/aqarmap/location-stats?location=36&property_type=1"
```

## Example response

```json
{
    "success": true,
    "data": {
        "stats": {
            "location_id": 36,
            "property_type": 1,
            "location_name": "Maadi",
            "average_price": 27300,
            "price_growth_percent": 33.52,
            "demand_heat": 44,
            "ratings": {
                "overall": 9.6,
                "neighborhood": 9,
                "education": 7.3,
                "location": 8.6,
                "transportation": 9,
                "population": 4,
                "life_style": 9.7,
                "healthcare": 9.3
            }
        }
    },
    "meta": {
        "endpoint_family": "location_stats",
        "billable": true,
        "duration_ms": 450
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Nothing exists with that identifier on Aqarmap (`NOT_FOUND`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Aqarmap could not be reached after retries, refused the request or answered with a body this API cannot read safely (`UPSTREAM_UNAVAILABLE`). Never billed. Retry when `meta.retryable` is true. |

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