# /trademe/properties/search

`POST /api/trademe/properties/search`

Price: 10 credits

Search TradeMe property listings within a New Zealand location. Choose a channel (for sale, for rent, commercial, rural, retirement). Returns listing cards: id, url, address, price and sale method, rent per week, bedrooms/bathrooms/parking, floor area, property type, coordinates, images, open-home times, listing date and the marketing agency. Filter by price, bedrooms, bathrooms, parking, land/floor area, property type, sale method, property features, keywords and sort order.

## How to use it

Search TradeMe (New Zealand) property listings within a location. Provide location as a path (region, region/district or region/district/suburb, lowercase hyphenated, e.g. 'auckland/manukau-city') and a channel (sale/rent/commercial-sale/commercial-lease/rural/retirement). Each result has id (feed to trademe/properties for full detail), url, region/district/suburb, address, price_display, sale_method (asking_price/auction/tender/negotiation/deadline_sale) with sale_date, rent_per_week and available_date (rentals), property_type, bedrooms, bathrooms, parking, floor_area, latitude/longitude, image+images, has_video, is_featured, listed_at, member_id, open_homes (upcoming open-home times) and agency. Narrow with price_min/price_max (NZD; per week for rent), bedrooms_min/max, bathrooms_min, parking_min, living_areas_min, land_area_min/max, floor_area_min/max, property_types, sales_methods, property_features, keywords, open_homes_only, new_homes_only, home_income_only, pets_ok, available_now and sort.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `location` (string, required) — Location path: region, region/district or region/district/suburb (e.g. 'auckland', 'auckland/manukau-city', 'wellington/wellington-city/te-aro'). Use lowercase hyphenated names. (examples: "auckland", "canterbury/christchurch-city"; minLength: 1)
- `channel` (string) — Which property listing channel to search. (default: "sale"; one of: "sale", "rent", "commercial-sale", "commercial-lease", "rural", "retirement")
- `count` (integer, required) — Max number of results to return (min: 1)
- `price_min` (integer, nullable) — Minimum price (NZD; per week for rent). (min: 0)
- `price_max` (integer, nullable) — Maximum price (NZD; per week for rent). (min: 0)
- `bedrooms_min` (integer, nullable) — Minimum number of bedrooms. (min: 0)
- `bedrooms_max` (integer, nullable) — Maximum number of bedrooms. (min: 0)
- `bathrooms_min` (integer, nullable) — Minimum number of bathrooms. (min: 0)
- `parking_min` (integer, nullable) — Minimum number of car parks. (min: 0)
- `living_areas_min` (integer, nullable) — Minimum number of living areas. (min: 0)
- `land_area_min` (integer, nullable) — Minimum land area (square metres). (min: 0)
- `land_area_max` (integer, nullable) — Maximum land area (square metres). (min: 0)
- `floor_area_min` (integer, nullable) — Minimum floor area (square metres). (min: 0)
- `floor_area_max` (integer, nullable) — Maximum floor area (square metres). (min: 0)
- `property_types` (array, nullable) — Restrict results to one or more property types. (one of: "Apartment", "House", "Townhouse", "Unit", "Section", "BareLand", "Dwelling", "CarPark")
- `sales_methods` (array, nullable) — Restrict results to one or more sale methods. (one of: "PriceDisplayed", "Negotiation", "Auction", "Tender", "DeadlineSale")
- `property_features` (array, nullable) — Require one or more property features. (one of: "garage", "ensuite", "study", "toilet")
- `keywords` (string, nullable) — Free-text keywords to match in listings.
- `open_homes_only` (boolean, nullable) — Only listings with an upcoming open home.
- `new_homes_only` (boolean, nullable) — Only new-build listings.
- `home_income_only` (boolean, nullable) — Only home & income properties.
- `pets_ok` (boolean, nullable) — Only rentals that allow pets.
- `available_now` (boolean, nullable) — Only rentals available now.
- `sort` (string) — Result ordering. (default: "Default"; one of: "Default", "PriceAsc", "PriceDesc", "ExpiryDesc", "EarliestOpenHome")

## Response

### 200 — Successful Response

- `@type` (string) (default: "TrademeSearchListing")
- `id` (integer, required)
- `url` (string, nullable)
- `region` (string, nullable)
- `district` (string, nullable)
- `suburb` (string, nullable)
- `address` (string, nullable)
- `price_display` (string, nullable)
- `sale_method` (string, nullable)
- `sale_date` (string, nullable)
- `rent_per_week` (integer, nullable)
- `available_date` (string, nullable)
- `property_type` (string, nullable)
- `bedrooms` (integer, nullable)
- `bathrooms` (integer, nullable)
- `parking` (integer, nullable)
- `floor_area` (integer, nullable)
- `latitude` (number, nullable)
- `longitude` (number, nullable)
- `image` (string, nullable)
- `images` (array) (default: [])
- `has_video` (boolean, nullable)
- `is_featured` (boolean, nullable)
- `listed_at` (string, nullable)
- `member_id` (integer, nullable)
- `open_homes` (array) (default: [])
  - `@type` (string) (default: "TrademeOpenHome")
  - `start_at` (string, nullable)
  - `end_at` (string, nullable)
- `agency` (object, nullable)
  - `@type` (string) (default: "TrademeSearchAgency")
  - `id` (integer, required)
  - `name` (string, nullable)
  - `phone` (string, nullable)
  - `website` (string, nullable)
  - `image` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

Location not found or no listings matched

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

