{
  "openapi": "3.0.1",
  "info": {
    "title": "Vancouver Property Signal Monitor",
    "description": "Monitor Vancouver Open Data for rental standards issues, building permits, and assessment signals with address enrichment and aggregated property-level lead scoring.",
    "version": "0.4",
    "x-build-id": "3TYAUrKWjdarhN98p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stevennguyen~vancouver-property-signal-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stevennguyen-vancouver-property-signal-monitor",
        "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/stevennguyen~vancouver-property-signal-monitor/runs": {
      "post": {
        "operationId": "runs-sync-stevennguyen-vancouver-property-signal-monitor",
        "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/stevennguyen~vancouver-property-signal-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-stevennguyen-vancouver-property-signal-monitor",
        "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": {
          "signals": {
            "title": "Signals",
            "type": "array",
            "description": "Public-data signal groups to monitor.",
            "items": {
              "type": "string",
              "enum": [
                "rental_standards",
                "building_permits",
                "tax_assessment"
              ],
              "enumTitles": [
                "Rental standards issues",
                "Issued building permits",
                "Property tax assessment signals"
              ]
            },
            "default": [
              "rental_standards",
              "building_permits"
            ]
          },
          "neighbourhoods": {
            "title": "Neighbourhoods",
            "type": "string",
            "description": "Optional comma-separated Vancouver local areas, e.g. Downtown, West End, Mount Pleasant."
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "string",
            "description": "Optional comma-separated terms matched against all public fields."
          },
          "permitKeywords": {
            "title": "Permit keywords",
            "type": "string",
            "description": "Comma-separated terms for building permit filtering/scoring.",
            "default": "demolition, new building, multiplex, renovation, addition, alteration, change of use"
          },
          "minOutstandingIssues": {
            "title": "Minimum rental issues",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum outstanding rental standards issues.",
            "default": 1
          },
          "minProjectValue": {
            "title": "Minimum permit project value",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum building permit project value in CAD.",
            "default": 50000
          },
          "minLandValue": {
            "title": "Minimum land value",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum current land value for tax assessment signal records.",
            "default": 1000000
          },
          "sinceDays": {
            "title": "Permit lookback days",
            "minimum": 1,
            "type": "integer",
            "description": "Only fetch issued permits since this many days ago.",
            "default": 30
          },
          "reportYear": {
            "title": "Property tax report year",
            "type": "string",
            "description": "Report year for property-tax assessment records, e.g. 2026."
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum records to request per source. Vancouver Open Data caps individual requests, so this Actor keeps the MVP intentionally small.",
            "default": 100
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "aggregated",
              "raw",
              "both"
            ],
            "type": "string",
            "description": "aggregated emits one joined record per address. raw emits one record per source item. both emits aggregate records plus source records.",
            "default": "aggregated"
          },
          "enableAddressEnrichment": {
            "title": "Enable address enrichment",
            "type": "boolean",
            "description": "For high-scoring seed addresses, query other Vancouver datasets by address to intentionally create multi-signal leads.",
            "default": true
          },
          "maxEnrichmentAddresses": {
            "title": "Max enrichment addresses",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of highest-scoring addresses to enrich across other sources.",
            "default": 20
          },
          "enrichmentLimit": {
            "title": "Enrichment records per address/source",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum matching records fetched from each enrichment source for each seed address.",
            "default": 5
          },
          "onlyChanges": {
            "title": "Only emit changes",
            "type": "boolean",
            "description": "Skip unchanged records when compareWithPreviousRun is enabled.",
            "default": true
          },
          "emitUnchanged": {
            "title": "Emit unchanged records",
            "type": "boolean",
            "description": "Emit unchanged records too. Useful for first-run exports and debugging.",
            "default": false
          },
          "compareWithPreviousRun": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Persist fingerprints and mark records as new, updated, unchanged, or missing_from_current_run.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used to persist monitor state across Apify runs. Keep stable for scheduled monitors.",
            "default": "vancouver-property-signal-monitor-state"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Key-value store key used to persist monitor state. Use a different key for each watchlist/filter set.",
            "default": "vancouver-property-signal-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}