# Get zipcode boundary by zipcode and country code

> **Casafari is the AI agent-native real estate data intelligence platform.** The most complete property index in Europe: a deduplicated, cleaned property graph of residential and commercial property, for sale and for rent, in 16 countries. Every property is one record with its full price and market history. [How the property graph is built](/docs/property-graph).

`POST https://api.casafari.com/v1/references/zipcode-boundary`

[Existing Casafari API](/docs/existing-api-customers) · [API v1](/docs/existing-api-customers/v1) · References. Send `Authorization: Token $CASAFARI_TOKEN` with your existing API token; see [where to get it](/docs/existing-api-customers#where-to-get-your-existing-token).

The same path under `/api`, signed in with a bearer token, is in the REST API reference: [`POST /api/v1/references/zipcode-boundary`](/docs/rest/references/get-zipcode-boundary-by-zipcode-and-country-code-v1).

## Description

Get zipcode boundary by zipcode and country code.

## Request body

Content type `application/json`. Optional. Type: `object`.

- `zip_code` (string, required): Zipcode.
- `country_code` (string, required): Country code following the ISO 3166-1 alpha-2 rules. Values: `ES`, `FR`, `DE`, `RE`, `GP`, `MQ`, `GY`, `YT`, `AD`, `MC`.

## Example request

Placeholders only: replace the token and the values with your own.

```bash
curl -X POST "https://api.casafari.com/v1/references/zipcode-boundary" \
  -H "Authorization: Token $CASAFARI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "zip_code": "36116",
  "country_code": "ES"
}'
```

## Responses

### 200

Type: `object`.

- `zip_code` (string, required): Zipcode.
- `boundary` (object[][], required): Zipcode boundary.
  - `latitude` (number, required): Latitude. -90–90.
  - `longitude` (number, required): Longitude. -180–180.

Example from the API description (long arrays shortened):

```json
{
  "zip_code": "36116",
  "boundary": [
    [
      {
        "latitude": 42.59448,
        "longitude": -8.3877
      },
      {
        "latitude": 42.58795,
        "longitude": -8.38622
      }
    ]
  ]
}
```

### 401 Unauthorized

Type: `object`.

- `detail` (string, optional): Description of the error encountered.

### 403 Forbidden

Type: `object`.

- `detail` (string, optional): Description of the error encountered.

## Related pages

- [Get agencies (GET /v1/references/agencies)](/docs/existing-api-customers/v1/get-agencies)
- [Get agents (GET /v1/references/agents)](/docs/existing-api-customers/v1/get-agents)
- [Get conditions (GET /v1/references/conditions)](/docs/existing-api-customers/v1/get-conditions)
- [Get features (GET /v1/references/features)](/docs/existing-api-customers/v1/get-features)
- [The same path in the REST API reference (POST /api/v1/references/zipcode-boundary)](/docs/rest/references/get-zipcode-boundary-by-zipcode-and-country-code-v1)
- [Existing Casafari API v1: all operations](/docs/existing-api-customers/v1)
- [Existing API customers: token and documentation](/docs/existing-api-customers)
