# Imovelweb Polygon API Documentation

<p><strong>Imovelweb Polygon API</strong> returns the GeoJSON outline (MultiPolygon, longitude then latitude) of a neighborhood, city or state. Use it to draw a search area on a map. Pass a <code>location</code> id from the autocomplete route. An unknown id returns 404 and is not billed.</p>

- **Documentation:** [https://scrappa.co/docs/imovelweb-api/imovelweb_polygon](https://scrappa.co/docs/imovelweb-api/imovelweb_polygon)
- **API group:** Imovelweb API
- **Endpoint:** `GET https://scrappa.co/api/imovelweb/polygon`

## 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` | string | Yes | Location id from the autocomplete route. Example: V1-Z-52. |

## Example response

```json
{
    "data": {
        "type": "zone",
        "geometry": {
            "type": "MultiPolygon",
            "coordinates": [
                [
                    [
                        [
                            -46.69113979499997,
                            -23.546079476999974
                        ],
                        [
                            -46.68939270299995,
                            -23.547561754999947
                        ],
                        [
                            -46.682607287999986,
                            -23.553396801999952
                        ]
                    ]
                ]
            ]
        },
        "location": "V1-Z-52"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "polygon"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or outside its allowed values. This response is not billable. |
| 404 | Not Found | The location has no outline. This response is not billable. |
| 503 | Upstream Unavailable | Imovelweb could not be reached, or returned data that does not match the expected shape. Retry shortly. This response is not billable. |

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