{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Property Scraper — Sale + Sold · Market KPIs",
    "description": "🏡 Scrape Redfin US real estate listings — for-sale, sold, and coming-soon — with built-in market KPIs (median price, price/sqft, days-on-market, breakdowns by city/zip) and HTML report. Optional Redfin Estimate + Walk Score enrichment. Independent tool — not affiliated with Redfin Corporation.",
    "version": "1.0",
    "x-build-id": "IfpVfFx1PST1apx3j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~redfin-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-redfin-property-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-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-redfin-property-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-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-redfin-property-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "autocomplete",
              "byRegionId",
              "byCoordinates"
            ],
            "type": "string",
            "description": "How to find listings.\n\n• **autocomplete** — look up region IDs by typing a city / zip / neighborhood (helper mode, returns region candidates)\n• **byRegionId** — search a specific Redfin region (use Autocomplete first to get the ID)\n• **byCoordinates** — search by lat/lng + radius (PAID)",
            "default": "byRegionId"
          },
          "maxResults": {
            "title": "📊 Max results per query",
            "minimum": 1,
            "maximum": 350,
            "type": "integer",
            "description": "Hard cap on listings returned per query. Redfin returns up to ~350 per region in a single call. FREE tier is always capped at 25 listings per run.",
            "default": 100
          },
          "listingStatus": {
            "title": "🏷️ Listing Status",
            "enum": [
              "forSale",
              "sold",
              "comingSoon"
            ],
            "type": "string",
            "description": "Which listings to return.\n\n• **forSale** — active for-sale listings\n• **sold** — recently sold homes\n• **comingSoon** — coming-soon listings",
            "default": "forSale"
          },
          "autocompleteQuery": {
            "title": "🔎 Autocomplete Query  (used when Search Mode = autocomplete)",
            "type": "string",
            "description": "Free-text place lookup — city, neighborhood, or 5-digit zip code. Returns a list of matching region IDs you can plug into the byRegionId mode."
          },
          "regionId": {
            "title": "📍 Region ID  (used when Search Mode = byRegionId)",
            "type": "string",
            "description": "Redfin region identifier in '<type>_<id>' format. Examples:\n• 2_30818 — Austin, TX (city)\n• 2_29470 — Seattle, WA (city)\n• 6_14462 — a specific neighborhood\n• 13_78641 — zip code 78641\n\nUse Autocomplete mode first to discover region IDs.",
            "default": "2_30818"
          },
          "regionIds": {
            "title": "📋 Bulk Region IDs  (PAID, byRegionId mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of region IDs (same '<type>_<id>' format) — runs one search per ID. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "lat": {
            "title": "🗺️ Latitude  (used when Search Mode = byCoordinates)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for a radial search."
          },
          "lng": {
            "title": "🗺️ Longitude  (used when Search Mode = byCoordinates)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for a radial search."
          },
          "radius": {
            "title": "📏 Radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Search radius in miles around the lat/lng center (1-50).",
            "default": 5
          },
          "includeEnrichment": {
            "title": "⭐ Include enrichment — Redfin Estimate + Walk Score (PAID)",
            "type": "boolean",
            "description": "When ON, fetches the Redfin Estimate (AVM) and Walk Score / Bike Score / Transit Score for each listing (2 extra API calls per listing). Adds one ListingEnriched charge per listing where at least one enrichment fetch succeeds. Disabled on FREE tier.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}