{
  "openapi": "3.0.1",
  "info": {
    "title": "Trade Me NZ Residential Listings Scraper",
    "description": "Search Trade Me Property for homes for sale or rent across any New Zealand region, filtered by price, bedrooms, bathrooms and property type, or refresh a list of listing URLs you already track.",
    "version": "1.1",
    "x-build-id": "UpTA9hd0YmaaNvAQY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~trade-me-nz-residential-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-trade-me-nz-residential-listings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/vexaloom-labs~trade-me-nz-residential-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-trade-me-nz-residential-listings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/vexaloom-labs~trade-me-nz-residential-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-trade-me-nz-residential-listings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "searchForSale",
              "searchForRent",
              "byListingUrls"
            ],
            "type": "string",
            "description": "Search residential properties for sale, search rental listings, or refresh a list of property URLs you already track.",
            "default": "searchForSale"
          },
          "region": {
            "title": "Region",
            "enum": [
              "Northland",
              "Auckland",
              "Waikato",
              "Bay of Plenty",
              "Gisborne",
              "Hawke's Bay",
              "Taranaki",
              "Manawatu / Whanganui",
              "Wellington",
              "Nelson / Tasman",
              "Marlborough",
              "West Coast",
              "Canterbury",
              "Otago",
              "Southland",
              "All New Zealand"
            ],
            "type": "string",
            "description": "New Zealand region to search. Choose All New Zealand to search nationwide.",
            "default": "Auckland"
          },
          "district": {
            "title": "District (optional)",
            "type": "string",
            "description": "Narrow the search to one district, for example Auckland City or Christchurch City. Enter a district name or Trade Me district ID."
          },
          "suburb": {
            "title": "Suburb (optional)",
            "type": "string",
            "description": "Narrow the search to one suburb, for example Ponsonby or Riccarton. Enter a suburb name or Trade Me suburb ID."
          },
          "searchString": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Only return listings whose title or description matches this keyword, for example villa, waterfront or garage."
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "",
              "house",
              "apartment",
              "townhouse",
              "unit",
              "section",
              "dwelling",
              "bareland",
              "lifestyle",
              "rural",
              "newdevelopment",
              "carpark"
            ],
            "type": "string",
            "description": "Limit results to one type of property.",
            "default": ""
          },
          "minPrice": {
            "title": "Minimum price or weekly rent (NZD)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Lowest asking price for sale listings, or lowest weekly rent for rental listings."
          },
          "maxPrice": {
            "title": "Maximum price or weekly rent (NZD)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Highest asking price for sale listings, or highest weekly rent for rental listings."
          },
          "minBedrooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Smallest number of bedrooms to include. Use 0 to include studios."
          },
          "maxBedrooms": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Largest number of bedrooms to include."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Smallest number of bathrooms to include."
          },
          "maxBathrooms": {
            "title": "Maximum bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Largest number of bathrooms to include."
          },
          "minLandArea": {
            "title": "Minimum land area (m²)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Smallest land area in square metres."
          },
          "maxLandArea": {
            "title": "Maximum land area (m²)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Largest land area in square metres."
          },
          "minFloorArea": {
            "title": "Minimum floor area (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Smallest floor area in square metres."
          },
          "maxFloorArea": {
            "title": "Maximum floor area (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Largest floor area in square metres."
          },
          "minParking": {
            "title": "Minimum parking spaces",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Smallest number of garage, carport or off-street parking spaces."
          },
          "maxParking": {
            "title": "Maximum parking spaces",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Largest number of garage, carport or off-street parking spaces."
          },
          "minLounges": {
            "title": "Minimum living areas",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Smallest number of separate lounges or living areas."
          },
          "maxLounges": {
            "title": "Maximum living areas",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Largest number of separate lounges or living areas."
          },
          "salesMethod": {
            "title": "Sale method",
            "enum": [
              "",
              "auction",
              "negotiation",
              "tender",
              "deadlinesale",
              "pricedisplayed"
            ],
            "type": "string",
            "description": "Only return sale listings using this method. Ignored for rental searches.",
            "default": ""
          },
          "openHomesOnly": {
            "title": "Only listings with open homes",
            "type": "boolean",
            "description": "Return only properties that have an upcoming open home.",
            "default": false
          },
          "newHomesOnly": {
            "title": "Only new builds",
            "type": "boolean",
            "description": "Return only new-build properties.",
            "default": false
          },
          "homeIncomeOnly": {
            "title": "Only home and income",
            "type": "boolean",
            "description": "Return only home-and-income properties.",
            "default": false
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "Default",
              "PriceAsc",
              "PriceDesc",
              "ExpiryDesc",
              "EarliestOpenHome"
            ],
            "type": "string",
            "description": "Order of the search results.",
            "default": "Default"
          },
          "includeDetails": {
            "title": "Load full details for every search result",
            "type": "boolean",
            "description": "Fetch the full listing page data for each result. Adds the description, every photo, agent names and property features, at the cost of one extra request per listing.",
            "default": false
          },
          "listingUrls": {
            "title": "Listing URLs or IDs",
            "type": "array",
            "description": "Trade Me Property listing URLs or numeric listing IDs. Used when mode is Refresh specific listing URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of listings to save. Trade Me serves up to 50 per page; the actor walks pages until it reaches this limit or the source is exhausted.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}