{
  "openapi": "3.0.1",
  "info": {
    "title": "Zillow Market Trends Scraper",
    "description": "Pull Zillow's home value index, listing and sale price metrics, sale-to-list ratio, days to pending, and rental index for any US city or state, with configurable months of history.",
    "version": "1.1",
    "x-build-id": "eib1lvbHYElVwmXDZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~zillow-market-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-zillow-market-trends-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/nimbryxo-studio~zillow-market-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-zillow-market-trends-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/nimbryxo-studio~zillow-market-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-zillow-market-trends-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "regionTrends",
              "history",
              "marketScan"
            ],
            "type": "string",
            "description": "What to collect. regionTrends = one detailed record per location. history = tidy monthly rows per location. marketScan = one row per region from a Zillow Research dataset.",
            "default": "regionTrends"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "(mode=regionTrends, history) Cities, states, counties, ZIP codes or neighborhoods, e.g. 'Austin, TX', 'Travis County, TX', '78701', 'Barton Hills, Austin, TX', 'Texas'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "historyMonths": {
            "title": "History months",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "(mode=regionTrends, history) Months of monthly history to include per metric. Zillow's page carries up to 100 months; larger values are capped at 100.",
            "default": 24
          },
          "historyMetric": {
            "title": "History metric",
            "enum": [
              "zhvi",
              "zori",
              "both"
            ],
            "type": "string",
            "description": "(mode=history) Which monthly series to emit as tidy rows.",
            "default": "zhvi"
          },
          "dataset": {
            "title": "Dataset",
            "enum": [
              "zhviAllHomes",
              "zhviSingleFamily",
              "zhviCondo",
              "zhviBottomTier",
              "zhviTopTier",
              "zhvi1Bedroom",
              "zhvi2Bedroom",
              "zhvi3Bedroom",
              "zhvi4Bedroom",
              "zhvi5PlusBedroom",
              "zoriAllHomes",
              "zoriSingleFamily",
              "zoriMultiFamily",
              "zhvf1Year",
              "inventory",
              "newListings",
              "newlyPending",
              "medianListPrice",
              "medianSalePrice",
              "saleToListRatio",
              "pctSoldAboveList",
              "pctSoldBelowList",
              "medianDaysToPending",
              "meanDaysToPending",
              "priceCutShare",
              "priceCutAmount",
              "marketHeatIndex",
              "newConstructionSalePrice",
              "newConstructionPricePerSqft",
              "newHomeownerIncomeNeeded",
              "newRenterIncomeNeeded",
              "affordableHomePrice",
              "yearsToSave",
              "newHomeownerAffordability",
              "newRenterAffordability"
            ],
            "type": "string",
            "description": "(mode=marketScan) Zillow Research series to scan. Each dataset supports a subset of geographies; the actor tells you if the selected geography is unavailable.",
            "default": "zhviAllHomes"
          },
          "geography": {
            "title": "Geography",
            "enum": [
              "metro",
              "state",
              "county",
              "city",
              "zip",
              "neighborhood",
              "us"
            ],
            "type": "string",
            "description": "(mode=marketScan) Region level to scan. Available levels depend on the dataset.",
            "default": "city"
          },
          "state": {
            "title": "State filter",
            "enum": [
              "all",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "DC"
            ],
            "type": "string",
            "description": "(mode=marketScan) Keep only regions in this state. 'all' keeps every state.",
            "default": "all"
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "(mode=marketScan) Case-insensitive substring filter on the region name, e.g. 'Travis' or 'Springfield'.",
            "default": ""
          },
          "regionIds": {
            "title": "Region IDs",
            "type": "array",
            "description": "(mode=marketScan) Exact Zillow RegionIDs to keep, e.g. '3101'. Values not in the selected dataset are ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort and rank by",
            "enum": [
              "sizeRank",
              "regionName",
              "largestValue",
              "smallestValue",
              "biggestGain1m",
              "biggestGain3m",
              "biggestGain6m",
              "biggestGain12m",
              "biggestDecline12m"
            ],
            "type": "string",
            "description": "(mode=marketScan) Order rows and assign a 1-based rank over all matches before maxItems truncation.",
            "default": "sizeRank"
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on emitted records for this run.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}