# Yaencontre Filters

Returns the live facet groups and price bands available for an operation, family and location, including the total item count for the combination. The origin refuses this path without a geography, so location is required. Use it to discover which filter values are available before running a search.

- **Documentation:** [https://scrappa.co/docs/yaencontre-api/yaencontre_filters](https://scrappa.co/docs/yaencontre-api/yaencontre_filters)
- **API group:** Yaencontre API
- **Endpoint:** `GET https://scrappa.co/api/yaencontre/filters`

## 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 |
| --- | --- | --- | --- |
| `operation` | string | No | BUY, RENT, or TRANSFER. Default BUY. |
| `family` | string | No | Property type. Default FLAT. |
| `location` | string | Yes | Location to scope the facet counts to, as a plain place name such as madrid. Required; the origin refuses this path without a geography. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yaencontre/filters?operation=BUY&family=FLAT&location=madrid"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total_items": 17912,
        "options": {
            "priceRange": [
                {
                    "min": 0,
                    "max": 100000
                },
                {
                    "min": 100000,
                    "max": 200000
                },
                {
                    "min": 200000,
                    "max": 400000
                }
            ],
            "rooms": [
                {
                    "value": 1,
                    "count": 3200
                },
                {
                    "value": 2,
                    "count": 5400
                },
                {
                    "value": 3,
                    "count": 4800
                }
            ],
            "family": [
                {
                    "value": "FLAT",
                    "count": 15000
                },
                {
                    "value": "HOUSE",
                    "count": 2912
                }
            ]
        }
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing reference does not exist. This response is not billable. |
| 422 | Validation Error | A public parameter is invalid, including rejected property types and transfer-only family pairings. This response is not billable and never reaches the origin. |
| 503 | Service Unavailable | The origin could not serve the request, or no usable network egress was available. This response is not billable; retry shortly. |

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