{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor.ca Scraper: Canada MLS Listings, Prices & Agents",
    "description": "Canadian property listings from REALTOR.ca MLS for sale or rent in major metros: price in CAD, address, beds, baths, property type, MLS number, photos, coordinates, listing agent and brokerage.",
    "version": "0.4",
    "x-build-id": "OFn5NjSRoAJCVu46E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~realtor-ca-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-realtor-ca-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/automatic~realtor-ca-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-realtor-ca-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/automatic~realtor-ca-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-realtor-ca-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": {
          "cities": {
            "title": "Search cities",
            "minItems": 1,
            "type": "array",
            "description": "Metro areas to search. Each entry is a seed key (toronto, vancouver, calgary, montreal, ottawa, edmonton, mississauga, winnipeg, hamilton, quebec-city) or a free-form 'label/province/latMin/lonMin/latMax/lonMax' bounding box. Example: [\"toronto\"]. If omitted, uses [\"toronto\"]. An explicitly empty cities list or blank city is invalid; supply a city or omit the field.",
            "items": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            }
          },
          "transactionType": {
            "title": "Transaction type",
            "enum": [
              "for-sale",
              "for-rent"
            ],
            "type": "string",
            "description": "Listings to search: for sale or for rent. Example: \"for-sale\". If left unset, uses \"for-sale\"."
          },
          "maxPages": {
            "title": "Maximum pages per city",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Result pages to fetch per city (up to 200 listings per page, 50 pages = 10,000 listings). Example: 1. If left unset, uses 1."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many listings across all cities. An empty API input runs the 5-listing sample. For other inputs, omitting this field uses 100."
          },
          "recordsPerPage": {
            "title": "Records per page",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Listings requested per result page. The empty API input sample requests 20. For other inputs, omitting this field uses 200."
          },
          "requestDelaySecs": {
            "title": "Delay between page requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Minimum 0.5 seconds. Example: 1.0. If left unset, uses 1.0."
          },
          "filters": {
            "title": "Filters",
            "type": "object",
            "description": "Optional search filters mapped to realtor.ca's native params: sort (price-asc|price-desc|newest|oldest|open-houses|photos|virtual-tour), minPrice/maxPrice, beds/baths/storeys/units as {min,max}, buildingType (house|duplex|triplex|row-townhouse|apartment|fourplex|garden-home|mobile-home|manufactured-home|commercial-apartment|residential-commercial-mix|special-purpose|other), ownershipType (freehold|condo-strata|timeshare-fractional|leasehold), constructionStyle (detached|semi-detached|attached|stacked|link), airCondition/pool/fireplace/garage/waterfront/acreage (booleans), openHouse (boolean, with openHouseStartDate/openHouseEndDate MM/DD/YYYY), keywords (text or list). Example: {\"minPrice\": 500000}. If left unset, uses {}."
          },
          "proxyUrl": {
            "title": "Custom proxy URL",
            "type": "string",
            "description": "Optional custom proxy URL (full URL with embedded credentials, or host:port with proxyUsername/proxyPassword). Leave empty to use the Actor's default connection. Example: \"http://user:password@proxy.example.com:8080\". Empty uses the existing default connection."
          },
          "proxyUsername": {
            "title": "Proxy username",
            "type": "string",
            "description": "Username for proxyUrl when the URL does not embed credentials. Example: \"your-username\". Empty supplies no separate username; credentials in the URL are still used."
          },
          "proxyPassword": {
            "title": "Proxy password",
            "type": "string",
            "description": "Password for proxyUrl when the URL does not embed credentials. Example: \"your-password\". Empty supplies no separate password; credentials in the URL are still used."
          },
          "proxyCountry": {
            "title": "Proxy country",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter ISO country code for the proxy connection. Defaults to MX. Example: \"mx\". If left unset, uses \"mx\"."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}