{
  "openapi": "3.0.1",
  "info": {
    "title": "Zillow Scraper",
    "description": "Scrape Zillow property listings and detailed real estate data. Search by location, price, beds. Get pricing history, tax records, schools. Bulk extraction supported.",
    "version": "0.1",
    "x-build-id": "UlNW9rTqriRcpII4D"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlio~zillow-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlio-zillow-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/crawlio~zillow-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlio-zillow-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/crawlio~zillow-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlio-zillow-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",
              "details"
            ],
            "type": "string",
            "description": "Choose the extraction mode: Search listings or Property details.",
            "default": "search"
          },
          "search": {
            "title": "Search input",
            "type": "object",
            "description": "Configure search parameters to find properties by location, price, size, and other filters.",
            "properties": {
              "location": {
                "title": "Location",
                "type": "string",
                "description": "Location to search (e.g. 'New York, NY', '90210', 'Chicago, IL'). Resolved to a Zillow region ID automatically.",
                "default": "New York, NY",
                "editor": "textfield"
              },
              "searchType": {
                "title": "Search type",
                "type": "string",
                "description": "Choose for_sale (properties for sale) or rent (rental properties).",
                "default": "for_sale",
                "enum": [
                  "for_sale",
                  "rent"
                ],
                "enumTitles": [
                  "For Sale",
                  "For Rent"
                ],
                "editor": "select"
              },
              "maxPages": {
                "title": "Max pages",
                "type": "integer",
                "description": "Maximum number of pages to scrape (each page has ~40 listings). Zillow caps at ~20 pages.",
                "default": 20,
                "minimum": 1,
                "maximum": 20,
                "editor": "number"
              },
              "sort": {
                "title": "Sort",
                "type": "string",
                "description": "Sort order for listings.",
                "default": "featured",
                "enum": [
                  "featured",
                  "newest",
                  "price_asc",
                  "price_desc",
                  "beds",
                  "baths",
                  "area"
                ],
                "enumTitles": [
                  "Featured",
                  "Newest",
                  "Price (Low to High)",
                  "Price (High to Low)",
                  "Bedrooms",
                  "Bathrooms",
                  "Square Feet"
                ],
                "editor": "select"
              },
              "bedsMin": {
                "title": "Min bedrooms",
                "type": "integer",
                "description": "Minimum number of bedrooms.",
                "minimum": 0,
                "editor": "number"
              },
              "bedsMax": {
                "title": "Max bedrooms",
                "type": "integer",
                "description": "Maximum number of bedrooms.",
                "minimum": 0,
                "editor": "number"
              },
              "priceMin": {
                "title": "Min price",
                "type": "integer",
                "description": "Minimum price in USD.",
                "minimum": 0,
                "editor": "number"
              },
              "priceMax": {
                "title": "Max price",
                "type": "integer",
                "description": "Maximum price in USD.",
                "minimum": 0,
                "editor": "number"
              },
              "homeType": {
                "title": "Home types",
                "type": "array",
                "description": "Filter by property types.",
                "editor": "stringList",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            },
            "default": {
              "location": "New York, NY",
              "searchType": "for_sale",
              "maxPages": 20,
              "sort": "featured"
            }
          },
          "details": {
            "title": "Detail input",
            "required": [],
            "type": "object",
            "description": "Fetch detailed property information by Zillow Property ID (zpid). Supports bulk fetching of multiple properties.",
            "properties": {
              "zpids": {
                "title": "Zillow Property IDs (zpids)",
                "type": "array",
                "description": "One or more Zillow Property IDs to fetch details for. Each property fetched counts as a billable event.",
                "editor": "stringList",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "uniqueItems": true
              },
              "zpid": {
                "title": "Single zpid (legacy)",
                "type": "string",
                "description": "DEPRECATED: Use 'zpids' array instead. Single Zillow Property ID for backward compatibility.",
                "editor": "textfield",
                "pattern": "^[0-9]*$"
              },
              "listingUrl": {
                "title": "Listing URL (legacy)",
                "type": "string",
                "description": "DEPRECATED: Extract zpid from URL and use 'zpids' array instead.",
                "editor": "textfield"
              }
            },
            "default": {
              "zpids": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}