{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Distressed Property Scraper",
    "description": "Canadian tax-sale properties from taxsales.ca: tender and auction listings across 9 provinces with minimum bid, deadline or auction date, roll number, legal description and the municipality's notice, plus resume and incremental change tracking.",
    "version": "1.0",
    "x-build-id": "w8TfwV1PhMuFYGBlt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~distressed-ca-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-distressed-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/abotapi~distressed-ca-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-distressed-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/abotapi~distressed-ca-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-distressed-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "How to discover records. 'search' walks the selected provinces with your filters. 'url' reads only the links you paste into urls. Pasted links are ignored in search mode; the run log tells you when that happens.",
            "default": "search"
          },
          "provinces": {
            "title": "Provinces to walk",
            "type": "array",
            "description": "Which provincial lists to walk, in order. Leave empty to walk all 9 provinces the portal publishes (British Columbia and Newfoundland and Labrador often have no open listings).",
            "items": {
              "type": "string",
              "enum": [
                "ab",
                "bc",
                "mb",
                "nb",
                "nl",
                "ns",
                "on",
                "qc",
                "sk"
              ],
              "enumTitles": [
                "Alberta",
                "British Columbia",
                "Manitoba",
                "New Brunswick",
                "Newfoundland and Labrador",
                "Nova Scotia",
                "Ontario",
                "Quebec",
                "Saskatchewan"
              ]
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "deadline_passed",
              "cancelled",
              "results_pending",
              "sold",
              "no_tenders",
              "needs_review"
            ],
            "type": "string",
            "description": "Listing status filter. Leave empty for the site default (active listings)."
          },
          "type": {
            "title": "Property type",
            "enum": [
              "unknown",
              "vacant_land",
              "residential",
              "commercial",
              "waterfront",
              "mixed"
            ],
            "type": "string",
            "description": "Property type filter (search mode). Leave empty for any type."
          },
          "minTender": {
            "title": "Minimum tender amount",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with a minimum tender at or above this amount (CAD). Empty = no limit."
          },
          "maxTender": {
            "title": "Maximum tender amount",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with a minimum tender at or below this amount (CAD). Empty = no limit."
          },
          "closingIn": {
            "title": "Closing within (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Only listings closing within this many days. Empty = no limit."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "closing",
              "amount_asc",
              "amount_desc"
            ],
            "type": "string",
            "description": "Order of the walk. Newest first is the default and the only order that pages stably; other orders can shift between pages and miss listings on long provinces."
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pasted taxsales.ca links: province pages (/province/ontario/), municipality pages (/ontario/tiny/), search pages (/search/ with its province, status, type, tender, closing_in and sort filters and ?page=N, read from the page you paste) or listing pages (/listing/<slug>/). The site ignores free-text q= on search links (the link returns the unfiltered list and the run warns); use the province, status, type, tender and closing filters. Listing links emit one enriched record each. The site home and results pages are not listing sources and are skipped with a warning. Read in url mode only; left untouched it scrapes the example links.",
            "default": [
              "https://www.taxsales.ca/province/ontario/",
              "https://www.taxsales.ca/listing/alfred-and-plantagenet-0231010001105050000/",
              "https://www.taxsales.ca/search/",
              "https://www.taxsales.ca/search/?page=2",
              "https://www.taxsales.ca/search/?province=ontario&page=2",
              "https://www.taxsales.ca/search/?province=ontario&status=active&type=residential&sort=amount_asc",
              "https://www.taxsales.ca/ontario/tiny/"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch detail pages",
            "type": "boolean",
            "description": "Open each listing's own page for the full record: price, tender deadline or auction date, roll number, parcel identifier, legal description, assessed value, where to submit or attend, the municipality's conditions, map location and status history. Adds one request and a small per-record charge; turn it off for a fast listing-only run."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results in total across all provinces. Default 50; 0 = no limit (a full run holds more than a thousand listings, so set a number you are happy to pay for).",
            "default": 50
          },
          "maxPages": {
            "title": "Max pages per search (0 = unlimited)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each walk after this many result pages (24 listings per page). 0 = read to the last page. Max items always applies too."
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Connection used for requests. The register serves the standard pool; residential exits are used automatically when selected."
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Continue a previous run: only records not already in that run’s dataset are pushed. Leave empty for a fresh run."
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Track records across scheduled runs with the same scope. Compared: every returned field (title, status, minimum bid / amount, deadline, description, parties, details) except the built-in volatile ones (the daily status-history line, timestamps, change markers) and any you list under ignore fields; a change in any compared field makes the record UPDATED with changedFields. Only NEW or UPDATED records are returned (UNCHANGED suppressed). Records that disappear are marked EXPIRED only with Emit expired, only after a full uncapped scan of whole provinces. Mutually exclusive with Resume."
          },
          "stateKey": {
            "title": "State key (optional)",
            "type": "string",
            "description": "Name for the incremental baseline when you want to share one baseline across different filter variants. Leave empty to derive it from the scope automatically."
          },
          "emitUnchanged": {
            "title": "Emit unchanged records",
            "type": "boolean",
            "description": "In incremental mode, also return records that did not change (marked UNCHANGED)."
          },
          "emitExpired": {
            "title": "Emit expired records",
            "type": "boolean",
            "description": "In incremental mode, also return records seen previously that no longer appear (marked EXPIRED). Never emitted from a capped run, a pasted listing or search link. A listing dropping off the portal can mean sold, withdrawn or just hidden; read status for the outcome."
          },
          "changeScope": {
            "title": "Change scope (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "all (default) compares every field. priceAndStock compares only the minimum bid / amount, currency, status and deadline, so a description or detail edit never makes a record UPDATED.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact updated rows (incremental mode only)",
            "type": "boolean",
            "description": "UPDATED rows carry only identifiers, current bid / status / deadline and priceChanges {field: {old, new}}. NEW and EXPIRED rows stay full. The detail-enrichment charge is not applied to a compact row, because it no longer carries the detail data.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Expire after N missed scans (incremental mode only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "With Emit expired, a record is marked EXPIRED only after it was missing from this many consecutive complete scans. Default 1. A missing listing is not proof it is unavailable; check status.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Advanced: record fields that should never count as a change (in addition to the built-in ignore list). Use a dotted path such as \"details.img\" to ignore one nested key. Example: [\"valueText\"].",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send a summary of each returned listing to connected apps. Authorize a connector under Apify > Settings > Integrations, then select it here. Notion creates a page per record; other connectors receive a best-effort write or digest. Leave empty to skip. Dataset results are unaffected."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or ID of the Notion page where record pages should be created. Required for Notion; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of records written to each connector. Does not affect dataset output.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}