{
  "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 number, with price, beds, baths, agents, photos and price-change signals. Optional detail enrichment and a cross-run price monitor are included.",
    "version": "0.2",
    "x-build-id": "LbHgDX7o0PHAorDyU"
  },
  "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 (for example Toronto, Vancouver, Calgary). Common markets use a built-in map area; other cities are located with a public map lookup. 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. Many numbers are fetched together in one batch, which keeps small runs cheap. One row each when found; numbers that do not exist return nothing.",
            "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": "Order of results for city and map searches.",
            "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."
          },
          "minSqft": {
            "title": "Minimum size (sq ft)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings at least this big. Applied to the saved rows, so small matches are skipped and not billed."
          },
          "postedSince": {
            "title": "Posted since (date)",
            "type": "string",
            "description": "Keep only listings first posted on or after this date, format YYYY-MM-DD. Skipped listings are not billed."
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Optional keyword filter passed to PropertySearch (address fragment, condo name, etc.)."
          },
          "maxResults": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum listings to save (1-10000). Default 20. Free plan runs are capped at 10. Each listing is one billed event; full detail adds a second event per listing.",
            "default": 20
          },
          "enrichDetails": {
            "title": "Enrich listing details",
            "type": "boolean",
            "description": "Fetch the full listing page data: description (public remarks), rooms, features, fees and taxes, extra photos and price history when shown. Adds one 'listing-detail-enriched' event per enriched listing. Without it, publicRemarks is empty because the search results do not contain descriptions.",
            "default": false
          },
          "includeAgentContact": {
            "title": "Include agent contact",
            "type": "boolean",
            "description": "Adds the listing agent's name, business phone and brokerage, as shown publicly on the listing for buyers and sellers to contact the agent. No emails are collected. Turn off if you do not need agent details. Use only for legitimate real-estate purposes and follow Canadian privacy and anti-spam rules.",
            "default": true
          },
          "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"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}