# Sreality Search Facets API

Return the available facet groups for Czech property listings.

## Facet groups

Optionally narrow the groups by property type, deal type, and country. The response is the facet group array and can be used to build listing-search filters.

## Scope

This endpoint describes listing filter options. Use the search endpoint for listings and the separate project-facets endpoint for new-build project filters.

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

## 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 | No | Optional property category identifier from 1 to 5. |
| `deal_type` | integer | No | Optional transaction category identifier from 1 to 4. |
| `country_id` | integer | No | Optional positive country identifier; 112 is Czechia. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/sreality/facets?property_type=1&deal_type=1&country_id=112"
```

## Example response

```json
{
    "success": true,
    "data": {
        "result": [
            {
                "id_name": "category_main_cb",
                "values": [
                    {
                        "name": "Byty",
                        "value": 1
                    },
                    {
                        "name": "Domy",
                        "value": 2
                    }
                ]
            },
            {
                "id_name": "category_type_cb",
                "values": [
                    {
                        "name": "Prodej",
                        "value": 1
                    },
                    {
                        "name": "Pron\u00e1jem",
                        "value": 2
                    }
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "facets",
        "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)
