{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor.ca Listings & Price Changes Scraper",
    "description": "Scrape public Realtor.ca Canadian MLS listings by city, map bounds, listing URL, or MLS#. Returns price, beds, baths, agents, photos, and price-change signals. Optional detail enrich and cross-run price monitor. Cookieless to the user. MCP-ready.",
    "version": "0.1",
    "x-build-id": "bRooWCJUUCLipYpRk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~realtor-ca-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-realtor-ca-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/khadinakbar~realtor-ca-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-realtor-ca-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/khadinakbar~realtor-ca-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-realtor-ca-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",
        "properties": {
          "mapBoundingBox": {
            "title": "Map bounding box",
            "type": "object",
            "description": "Exact Realtor.ca map extent: LatitudeMin/Max, LongitudeMin/Max, optional ZoomLevel. Prefill is downtown Toronto. Use when you already have map coordinates from a Realtor.ca map URL hash."
          },
          "city": {
            "title": "City (Canada)",
            "type": "string",
            "description": "Canadian city name (e.g. Toronto, Vancouver, Calgary). Uses a built-in bbox for common markets, otherwise Nominatim geocode. Not for US cities."
          },
          "startUrls": {
            "title": "Realtor.ca URLs",
            "type": "array",
            "description": "Map search URLs (with LatitudeMin/Max in hash/query) or listing URLs (/real-estate/{id}). Non-realtor.ca URLs are rejected. Paste one URL per line.",
            "items": {
              "type": "string"
            }
          },
          "mlsNumbers": {
            "title": "MLS numbers",
            "type": "array",
            "description": "Canadian MLS / Realtor.ca reference numbers to fetch as detail lookups (one row each when found).",
            "items": {
              "type": "string"
            }
          },
          "transactionType": {
            "title": "Transaction type",
            "enum": [
              "for-sale",
              "for-rent"
            ],
            "type": "string",
            "description": "for-sale (buy) or for-rent (lease). Applied to map/city searches.",
            "default": "for-sale"
          },
          "propertyGroup": {
            "title": "Property group",
            "enum": [
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Residential or commercial inventory group on Realtor.ca.",
            "default": "residential"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "date-desc",
              "date-asc",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "Sort for map/city PropertySearch results.",
            "default": "date-desc"
          },
          "minPrice": {
            "title": "Minimum price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest list price in CAD for map/city search. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest list price in CAD for map/city search. Leave empty for no maximum."
          },
          "minBeds": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum bedroom count filter (Realtor.ca BedRange). 0 or empty = no filter."
          },
          "minBaths": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum bathroom count filter (Realtor.ca BathRange). 0 or empty = no filter."
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Optional keyword filter passed to PropertySearch (address fragment, condo name, etc.)."
          },
          "maxResults": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on dataset rows (1–2000). Each row charges listing-scraped ($0.005). Prefill 5 for a cheap quality sample.",
            "default": 20
          },
          "enrichDetails": {
            "title": "Enrich listing details",
            "type": "boolean",
            "description": "Call PropertyDetails for each listing (remarks, extra photos, public price history when Realtor.ca exposes it). Adds listing-detail-enriched ($0.008) per enriched row.",
            "default": false
          },
          "monitorMode": {
            "title": "Cross-run price monitor",
            "type": "boolean",
            "description": "Compare current prices to a named KV snapshot from prior runs. Sets previousPrice, priceChangeDetected, and monitorDiff. Does not invent historical prices.",
            "default": false
          },
          "onlyPriceChanges": {
            "title": "Only price changes",
            "type": "boolean",
            "description": "When monitorMode is on, push only rows where priceChangeDetected is true (public change label or monitorDiff drop/increase).",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named Apify key-value store for the price snapshot (key SNAPSHOT). Used only when monitorMode is true.",
            "default": "realtor-ca-price-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. RESIDENTIAL is required to clear Realtor.ca Imperva; datacenter is typically blocked.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CA"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}