# VivaReal Map Pins API Documentation

Scrappa's `GET /api/vivareal/map-pins` returns clustered map pins for a filter set: `count` of listings per cluster, approximate `lat` and `lon`, `radius_m`, the cluster `bounds` and, for single listings, `listing_id` and `price`. It accepts the same filters as the search endpoint and covers the whole filtered set, so there is no viewport parameter. Coordinates are approximate by design. A valid answer is billed, including an empty page. Failures never consume credits.

- **Documentation:** [https://scrappa.co/docs/vivareal-api/vivareal_map_pins](https://scrappa.co/docs/vivareal-api/vivareal_map_pins)
- **API group:** VivaReal & ZAP Imoveis API
- **Endpoint:** `GET https://scrappa.co/api/vivareal/map-pins`

## 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. |
| `business` | string | Yes | RENTAL (aluguel) or SALE (venda). |
| `location_id` | string | No | Location id from location-autocomplete, for example BR>Sao Paulo>NULL>Sao Paulo>Zona Oeste>Pinheiros. The only working location filter. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/vivareal/map-pins?portal=ZAP&business=RENTAL&location_id=BR%3ESao+Paulo%3ENULL%3ESao+Paulo%3EZona+Oeste%3EPinheiros"
```

## Example response

```json
{
    "success": true,
    "total": 13811,
    "total_is_approximate": true,
    "bounds": {
        "top_left": {
            "lat": -23.417,
            "lon": -46.783
        },
        "bottom_right": {
            "lat": -23.777,
            "lon": -46.374
        }
    },
    "pins": [
        {
            "listing_id": "2729342130",
            "price": 304000,
            "count": 13806,
            "lat": -23.564,
            "lon": -46.688,
            "radius_m": 9600,
            "approximate": true,
            "cluster_bounds": {
                "top_left": {
                    "lat": -23.417,
                    "lon": -46.783
                },
                "bottom_right": {
                    "lat": -23.777,
                    "lon": -46.374
                }
            }
        }
    ],
    "meta": {
        "billable": true,
        "endpoint_family": "map-pins",
        "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)
