# Trade Me Property Localities API Documentation

List every New Zealand region with its districts and suburbs and their numeric ids. Pass the ids as region, district and suburb to the search endpoints. The list is large and changes rarely, so Scrappa serves it from a 24 hour cache.

- **Documentation:** [https://scrappa.co/docs/trademe-property-api/trademe_property_localities](https://scrappa.co/docs/trademe-property-api/trademe_property_localities)
- **API group:** Trade Me Property API
- **Endpoint:** `GET https://scrappa.co/api/trademe_property/localities`

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

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/trademe_property/localities"
```

## Example response

```json
{
    "success": true,
    "data": {
        "regions": [
            {
                "id": 9,
                "name": "Northland",
                "districts": [
                    {
                        "id": 1,
                        "name": "Far North",
                        "suburbs": [
                            {
                                "id": 2129,
                                "name": "Ahipara"
                            },
                            {
                                "id": 1590,
                                "name": "Awanui"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "localities",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Error | The listing was not found or has expired. Not billed. |
|  | Error | Trade Me could not be reached. Not billed. |
|  | Error | Trade Me rejected the request. Not billed. |
|  | Error | The upstream service is temporarily unavailable. Please retry shortly. |
|  | Error | Trade Me returned an unexpected payload shape. Not billed. |
|  | Error | Trade Me rejected the request parameters. Not billed. |

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