# Bayleys — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover properties, agents, and offices across Bayleys NZ's real estate listings with customizable filters, while staying informed through their latest news and auction schedules. Access comprehensive property details, agent profiles with their listings, and office information to find exactly what you're looking for in the New Zealand real estate market.

**Category:** Real Estate | **Website:** [bayleys.co.nz/](https://bayleys.co.nz/) | **Docs:** [parse.bot/marketplace/50bc0375-1fdd-4afa-9d68-fa46d69661ad/bayleys-co-nz-api](https://parse.bot/marketplace/50bc0375-1fdd-4afa-9d68-fa46d69661ad/bayleys-co-nz-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_agent_listings

Retrieve current listings for a specific agent by their personnel ID. Returns paginated listing results across all property types that the agent is marketing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `agent_id` | integer | Yes | Agent personnel ID from search_people results (personnelId field). |
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_agent_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"<integer>","page":"<integer>","page_size":"<integer>"}'
```

### get_agent_profile

Get a full agent profile including bio, awards, current listings, and office details by their URL slug. Returns the agent's professional profile, branch associations, and current listing portfolio.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Agent URL slug path in format '/agents/{firstname}-{lastname}-{personnelId}', e.g. '/agents/alice-abraham-9285'. Get personnelId from search_people results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_agent_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_magazines

Get Bayleys magazines and publications. Returns paginated results with issue date, title, description, cover image, and publication URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_magazines \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>"}'
```

### get_news

Get Bayleys news articles and market reports. Returns paginated results with article title, description, image, publication URL, and published date. Supports filtering by tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |
| `tags` | string | No | Filter by tag (e.g. 'Residential', 'Commercial'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>","tags":"<string>"}'
```

### get_office_listings

Retrieve current listings for a specific Bayleys office by its branch ID. Returns paginated listing results across all property types marketed by that office.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `office_id` | integer | Yes | Office branch ID from search_offices results (branchId field). |
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_office_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"office_id":"<integer>","page":"<integer>","page_size":"<integer>"}'
```

### get_office_profile

Get a full office profile including description, agents, and current listings by its URL slug. Returns the branch details, team members, and active listing portfolio.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Office URL slug path in format 'offices/{kebab-case-branch-name}-{branchId}', e.g. 'offices/akaroa-480'. Get branchId and branchName from search_offices results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_office_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_property_details

Get full details of a specific property listing by its slug path. Returns comprehensive listing data including description, agents, images, floor plans, open homes, sale/auction details, and property features. The slug must be the full listing path as found on the Bayleys website.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Full property listing URL path including all segments, e.g. '/listings/residential/auckland/north-shore/7a-matai-road-devonport-1470838'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_property_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_upcoming_auctions

Get upcoming auction properties across all property types. Returns paginated listings that have scheduled auctions, including auction date and event location for each.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/get_upcoming_auctions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>"}'
```

### search_offices

Search for Bayleys offices by name, location keyword, or region. Returns paginated results with office contact details, location, and listing counts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keywords` | string | No | Search by office name or location. |
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |
| `region_id` | integer | No | Region ID to filter by. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/search_offices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords":"<string>","page":"<integer>","page_size":"<integer>","region_id":"<integer>"}'
```

### search_people

Search for Bayleys agents and staff by name or region. Returns paginated results with agent contact details, branch information, and specialty. Results are sorted alphabetically by default.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keywords` | string | No | Search by agent name or keyword. |
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |
| `region_id` | integer | No | Region ID to filter by. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/search_people \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords":"<string>","page":"<integer>","page_size":"<integer>","region_id":"<integer>"}'
```

### search_properties

Search for property listings with filters including location, price range, bedrooms, and property type. Returns paginated results ordered by the specified sort. Supports all property types (Residential, Commercial, Rural, Lifestyle, Business) via comma-separated search_types. Each result includes address, sale info, images, icons (beds/baths/parking), and features.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bathrooms` | integer | No | Number of bathrooms. |
| `bedrooms` | integer | No | Minimum number of bedrooms. |
| `car_parks` | integer | No | Number of car parks. |
| `district_id` | integer | No | District ID to filter by. |
| `keywords` | string | No | Search keywords (e.g. location name, listing ID). |
| `max_price` | integer | No | Maximum price filter. |
| `min_price` | integer | No | Minimum price filter. |
| `order_type` | string | No | Sort order type. |
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |
| `region_id` | integer | No | Region ID to filter by. |
| `search_types` | string | No | Property type filter. Comma-separated for multiple. |
| `suburb_ids` | string | No | Suburb IDs to filter by. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/search_properties \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bathrooms":"<integer>","bedrooms":"<integer>","car_parks":"<integer>","district_id":"<integer>","keywords":"<string>","max_price":"<integer>","min_price":"<integer>","order_type":"<string>","page":"<integer>","page_size":"<integer>","region_id":"<integer>","search_types":"<string>","suburb_ids":"<string>"}'
```

### search_residential_properties

Shortcut to search residential properties only. Returns paginated listing results filtered to the Residential property type. Equivalent to search_properties with search_types=Residential.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bayleys-co-nz-api-50bc0375/search_residential_properties \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>"}'
```
