# VivaReal Parse Filters API Documentation

Scrappa's `GET /api/vivareal/parse-filters` turns free text such as "apartamento em Pinheiros, Sao Paulo" into a resolved location (`location_id`, coordinates, address parts), `listing_type` and `unit_types`. Use the result as the filters of a search request. A valid answer is billed, including an empty page. Failures never consume credits.

- **Documentation:** [https://scrappa.co/docs/vivareal-api/vivareal_parse_filters](https://scrappa.co/docs/vivareal-api/vivareal_parse_filters)
- **API group:** VivaReal & ZAP Imoveis API
- **Endpoint:** `GET https://scrappa.co/api/vivareal/parse-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 |
| --- | --- | --- | --- |
| `portal` | string | No | ZAP (default) for ZAP Imoveis or VIVAREAL for VivaReal. Both use the same fields and filters. |
| `q` | string | Yes | Free text to parse. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/vivareal/parse-filters?portal=ZAP&q=apartamento+em+Pinheiros%2C+Sao+Paulo"
```

## Example response

```json
{
    "success": true,
    "query": "apartamento em Pinheiros, Sao Paulo",
    "filters": {
        "addresses": [
            {
                "location_id": "BR>Sao Paulo>NULL>Sao Paulo>Zona Oeste>Pinheiros",
                "street": null,
                "neighborhood": "Pinheiros",
                "zone": "Zona Oeste",
                "city": "Sao Paulo",
                "state": "Sao Paulo",
                "state_code": null,
                "lat": -23.563579,
                "lon": -46.691607
            }
        ],
        "listing_type": "USED",
        "unit_types": [
            "APARTMENT"
        ],
        "unit_sub_types": [
            "PENTHOUSE",
            "FLAT",
            "LOFT",
            "STUDIO",
            "KITNET"
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "parse-filters",
        "portal": "ZAP",
        "attempts": 1
    }
}
```

## Frequently asked questions

### Is this the official VivaReal or ZAP API?

No. Scrappa is an independent service and is not affiliated with VivaReal, ZAP Imoveis or their owners. Neither portal publishes a developer API.

### Are failed requests charged?

A valid answer is billed, including an empty page. Failures never consume credits.

## Related endpoints

- [Property Search](https://scrappa.co/docs/vivareal-api/vivareal_search)

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