{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor.ca Property Scraper — Canada · Market KPIs",
    "description": "Scrape Realtor.ca listings nationwide — sale + rent, by city/province, postal code, coordinates, polygon, or URL. Built-in market KPIs (CAD), property lookup with agents, history, mortgage links. Independent tool — not affiliated with Realtor.ca or CREA.",
    "version": "1.0",
    "x-build-id": "A0uLeb0jFMI66DbpR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~realtor-ca-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-realtor-ca-property-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/sian.agency~realtor-ca-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-realtor-ca-property-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/sian.agency~realtor-ca-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-realtor-ca-property-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "location",
              "postalCode",
              "coordinates",
              "polygon",
              "url",
              "lookup"
            ],
            "type": "string",
            "description": "How to specify the search.\n\n• **location** — by city + province (e.g. 'Toronto, ON')\n• **postalCode** — by Canadian postal code (A1A 1A1)\n• **coordinates** — by lat/lon center + radius (km)\n• **polygon** — by polygon boundary\n• **url** — by Realtor.ca search URL\n• **lookup** — single property by ID, address, or URL (returns full details with agents, history, mortgage links)",
            "default": "location"
          },
          "listingType": {
            "title": "🏷 Listing Type",
            "enum": [
              "both",
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Filter by transaction type. Realtor.ca returns sale + rent in one feed; this filter is applied client-side on the response.\n\n• **both** — keep every listing (default)\n• **sale** — only 'For sale' listings\n• **rent** — only 'For rent' listings",
            "default": "both"
          },
          "maxResults": {
            "title": "📊 Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on listings returned per query. Auto-paginates until the cap is reached or the search is fully drained. FREE tier is always capped at 25 listings per run.",
            "default": 50
          },
          "location": {
            "title": "📍 Location  (used when Search Mode = location)",
            "type": "string",
            "description": "City + province, e.g. 'Toronto, ON', 'Vancouver, BC', 'Montréal, QC'."
          },
          "locations": {
            "title": "📋 Bulk Locations  (PAID, location mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of 'City, Province' strings. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "postalCode": {
            "title": "📮 Postal Code  (used when Search Mode = postalCode)",
            "type": "string",
            "description": "Canadian postal code, e.g. 'M5V 2H1' or 'L4L2P3' (with or without space)."
          },
          "postalCodes": {
            "title": "📋 Bulk Postal Codes  (PAID, postalCode mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of Canadian postal codes. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "🧭 Latitude  (used when Search Mode = coordinates)",
            "type": "string",
            "description": "Latitude in decimal degrees, e.g. 43.6532 (Toronto)."
          },
          "longitude": {
            "title": "🧭 Longitude",
            "type": "string",
            "description": "Longitude in decimal degrees, e.g. -79.3832 (Toronto)."
          },
          "radius": {
            "title": "📏 Radius (km)",
            "type": "string",
            "description": "Optional search radius in kilometres (0.1–80). Defaults to provider default."
          },
          "polygon": {
            "title": "📐 Polygon  (used when Search Mode = polygon)",
            "type": "string",
            "description": "Polygon boundary as 'lon lat,lon lat,...'. Min 3 points. Example: '-79.45 43.65,-79.40 43.65,-79.40 43.70,-79.45 43.70,-79.45 43.65'."
          },
          "realtorUrl": {
            "title": "🔗 Realtor.ca URL  (url or lookup mode)",
            "type": "string",
            "description": "Realtor.ca search URL (for url mode) or property URL (for lookup mode)."
          },
          "realtorUrls": {
            "title": "📋 Bulk URLs  (PAID, url mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of Realtor.ca URLs. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "lookupBy": {
            "title": "🔎 Lookup By  (used when Search Mode = lookup)",
            "enum": [
              "propertyId",
              "address",
              "url"
            ],
            "type": "string",
            "description": "How to identify the property to look up.\n\n• **propertyId** — Realtor.ca numeric property ID\n• **address** — full street address\n• **url** — Realtor.ca property URL",
            "default": "propertyId"
          },
          "propertyId": {
            "title": "🆔 Property ID  (lookup mode, lookupBy=propertyId)",
            "type": "string",
            "description": "Realtor.ca numeric property ID, e.g. '29768213'."
          },
          "propertyIds": {
            "title": "📋 Bulk Property IDs  (PAID, lookup mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of Realtor.ca property IDs for bulk lookup. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "address": {
            "title": "🏠 Address  (lookup mode, lookupBy=address)",
            "type": "string",
            "description": "Full street address, e.g. '44 Wallace Street, Vaughan, ON'."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}