{
  "openapi": "3.0.1",
  "info": {
    "title": "Zillow Listing Scraper",
    "description": "Scrape Zillow property listings by location, search URL, property URL, or ZPID. Track prices, status changes, lifecycle history, coverage quality, conflicts, and source provenance with false-removal protection.",
    "version": "0.1",
    "x-build-id": "Y33HjmhslMxpbuBCn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchshark~zillow-listing-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchshark-zillow-listing-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/searchshark~zillow-listing-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchshark-zillow-listing-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/searchshark~zillow-listing-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchshark-zillow-listing-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": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities, ZIP codes, neighborhoods, or other Zillow search locations.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchUrls": {
            "title": "Zillow search URLs",
            "type": "array",
            "description": "Zillow search URLs. Supported Actor filters override equivalent URL filters.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "propertyUrls": {
            "title": "Property URLs",
            "type": "array",
            "description": "Direct public Zillow property URLs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "zpids": {
            "title": "ZPIDs",
            "type": "array",
            "description": "Direct Zillow property IDs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItemsPerLocation": {
            "title": "Max items per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum accepted listing observations from each location or search URL before that search is marked capped by the user limit.",
            "default": 1000
          },
          "maxTotalItems": {
            "title": "Max total items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Global maximum accepted listing observations across direct targets and all searches in this run.",
            "default": 5000
          },
          "listingStatus": {
            "title": "Listing status",
            "enum": [
              "for_sale",
              "for_rent",
              "sold",
              "pending",
              "any"
            ],
            "type": "string",
            "description": "Status filter applied to supported Zillow search state. Choose Preserve URL/default status to avoid overriding the URL's status state.",
            "default": "for_sale"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Optional Zillow property-type filters. Multiple types can be selected.",
            "items": {
              "type": "string",
              "enum": [
                "SINGLE_FAMILY",
                "CONDO",
                "TOWNHOUSE",
                "MULTI_FAMILY",
                "APARTMENT",
                "MANUFACTURED",
                "LOT"
              ]
            },
            "default": []
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum listing price filter."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum listing price filter."
          },
          "minBeds": {
            "title": "Minimum beds",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum bedroom count filter."
          },
          "maxBeds": {
            "title": "Maximum beds",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum bedroom count filter."
          },
          "minBaths": {
            "title": "Minimum baths",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum bathroom count filter."
          },
          "includeDetails": {
            "title": "Include detail enrichment",
            "type": "boolean",
            "description": "Allow Zillow property-detail requests after search-card reconciliation.",
            "default": true
          },
          "detailStrategy": {
            "title": "Detail enrichment strategy",
            "enum": [
              "none",
              "all",
              "new_or_changed_only"
            ],
            "type": "string",
            "description": "Choose whether details are skipped, fetched for all canonical properties, or fetched only for new/changed/insufficient records.",
            "default": "new_or_changed_only"
          },
          "maxDetailFetches": {
            "title": "Maximum detail fetches",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum Zillow property-detail requests allowed in one run.",
            "default": 250
          },
          "deduplicateByZpid": {
            "title": "Deduplicate by ZPID",
            "type": "boolean",
            "description": "Return one canonical CURRENT row per ZPID. Monitoring state is always canonical even when this is disabled for public output.",
            "default": true
          },
          "preserveMatchedQueries": {
            "title": "Preserve matched queries",
            "type": "boolean",
            "description": "Preserve the searches and search URLs that observed each canonical ZPID.",
            "default": true
          },
          "includeCoverageReport": {
            "title": "Include coverage diagnostics",
            "type": "boolean",
            "description": "Emit COVERAGE records describing caps, blocks, request failures, detail success, and scan completeness.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor changes across runs",
            "type": "boolean",
            "description": "Compare this run with persistent monitor state and emit evidence-backed change/lifecycle records.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Stable ID used to load and update the same listing-history state across scheduled runs."
          },
          "emitOnlyChanges": {
            "title": "Emit only change events",
            "type": "boolean",
            "description": "In monitor mode, omit CURRENT and LIFECYCLE rows and emit change events plus requested coverage diagnostics.",
            "default": false
          },
          "retainEventHistory": {
            "title": "Retain lifecycle history",
            "type": "boolean",
            "description": "Retain lifecycle status transitions in persistent monitor state. This does not create a separate historical event Dataset in V1.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration. Blocks are reported as partial coverage; the Actor does not bypass interactive challenges."
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of search-target collectors allowed to run concurrently.",
            "default": 8
          },
          "maxRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retries for retryable Zillow HTTP failures.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Retry/request delay in milliseconds",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Base delay used between retry attempts and throttled requests.",
            "default": 250
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}