{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Housing Market Data Scraper — Trends, Comps, Hotness",
    "description": "Pull US housing market data for any ZIP, city, or neighborhood: 60-month median sale price and demand trends, Compete Score market hotness, recently sold comps, school ratings, climate risk, and national trends. One structured row per location and dataset. Built for investors, analysts, and ETL.",
    "version": "1.0",
    "x-build-id": "0crJinZJQf60srRdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~redfin-market-analytics-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-redfin-market-analytics-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/sian.agency~redfin-market-analytics-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-redfin-market-analytics-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/sian.agency~redfin-market-analytics-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-redfin-market-analytics-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 (ZIP, City, County or Neighborhood)",
            "uniqueItems": true,
            "type": "array",
            "description": "📍 **US LOCATIONS TO ANALYZE.** Free-form — each entry is resolved server-side to a market region.\n\n✅ **Accepted formats:**\n- ZIP code — `78759`\n- City — `Austin, TX`\n- County — `Travis County, TX`\n- Neighborhood — `Great Hills, Austin, TX`\n\n💡 **TIP:** One dataset row is produced per location per enabled dataset below.\n\n🔓 **TIER LIMITS:**\n- **FREE users:** up to 5 locations per run\n- **PAID users:** unlimited locations",
            "default": [
              "Austin, TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeMarketTrends": {
            "title": "📈 Market Trends (60-month series)",
            "type": "boolean",
            "description": "📈 **60 MONTHLY DATAPOINTS PER METRIC** — median sale price, homes sold, median days on market, sale-to-list ratio, % sold above list, % listings with price drops. Every point carries the value **and** the year-over-year change.",
            "default": true
          },
          "includeMarketHotness": {
            "title": "🔥 Market Hotness (Compete Score)",
            "type": "boolean",
            "description": "🔥 **COMPETE SCORE (0–100)** with sale-to-list ratio, average days on market, typical number of offers, waived-contingency share — plus the same scores for nearby ZIP codes for instant comparison.",
            "default": true
          },
          "includeRecentlySold": {
            "title": "🏠 Recently Sold Comps",
            "type": "boolean",
            "description": "🏠 **SOLD COMPS** — the most recently sold homes in the location (typically the 8 latest sales) with sold price, price per sqft, beds/baths, sqft, sold date, days on market, MLS number, coordinates, photos count and listing remarks — all inside ONE charged row per location.",
            "default": true
          },
          "includeSchools": {
            "title": "🎓 Schools & Ratings",
            "type": "boolean",
            "description": "🎓 **SCHOOL INTELLIGENCE** — elementary, middle and high schools serving the location with ratings (1–10), parent ratings, grade ranges, public/private type, student counts, student-teacher ratios and website links.",
            "default": false
          },
          "includeClimateRisk": {
            "title": "🌊 Climate Risk Scores",
            "type": "boolean",
            "description": "🌊 **CLIMATE RISK** — flood, fire, heat and wind risk scores with properties-at-risk counts, regional vs national risk change, and deep links to the underlying risk reports.",
            "default": false
          },
          "includeNationalTrends": {
            "title": "🇺🇸 National Trends Baseline",
            "type": "boolean",
            "description": "🇺🇸 **US-LEVEL SERIES** (one extra row per run): median sale price, homes sold, homes for sale, new listings, months of supply, days on market, demand ratios — plus the national average 30-year fixed mortgage rate, 60 monthly points each.",
            "default": false
          },
          "listingSignals": {
            "title": "🎯 Listing Demand Signals (propertyId:listingId pairs)",
            "uniqueItems": true,
            "type": "array",
            "description": "🎯 **PER-LISTING DEMAND INTEL.** One entry per active listing in the form `propertyId:listingId` (e.g. `31327561:217326962`).\n\n🔎 **Where to get the IDs:** every row of our [Redfin Property Scraper](https://apify.com/sian.agency/redfin-property-scraper?fpr=sian) carries both `propertyId` and `listingId`.\n\n📦 **Each pair returns ONE merged row:** tour insights (agent tour count, notes), popularity (home views vs the top-10% threshold, popular flag), and price-drop eligibility.\n\n🔓 **TIER LIMITS:** FREE up to 5 pairs · PAID unlimited",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}