{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Property Scraper — Sale + Sold · Market KPIs",
    "description": "Redfin scraper and US real estate data API. Search for-sale, for-rent, sold and coming-soon listings by region, coordinates or property URL; return price, price per sqft, beds, baths, address, MLS status, price history, schools, flood risk, Redfin Estimate and Walk Score.",
    "version": "1.0",
    "x-build-id": "uASyJryWtMOweagZh"
  },
  "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",
              "byLocation",
              "byPolygon",
              "byCoordinates",
              "propertyDetails"
            ],
            "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)\n• **propertyDetails** — full property dossier for specific homes by Redfin URL or street address (agent contact, remarks, price history, schools, flood risk, amenities, Redfin Estimate, Walk Score)\n• **byLocation** — free-text location (if it returns 0 results, the upstream resolver missed: paste a redfin.com URL in byUrl mode or use autocomplete + byRegionId)\n• **byPolygon** — closed `lon lat` ring (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",
              "forRent",
              "sold",
              "comingSoon"
            ],
            "type": "string",
            "description": "Which listings to return.\n\n• **forSale** — active for-sale listings\n• **forRent** — rental 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. Example: `Austin`."
          },
          "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"
            }
          },
          "locationName": {
            "title": "📍 Location name  (used when Search Mode = byLocation)",
            "type": "string",
            "description": "Free-text US location (e.g. \"Seattle, WA\", \"Denver, CO\"). If a location returns 0 results the upstream resolver missed it — paste a redfin.com search URL in byUrl mode instead, or resolve a region ID via autocomplete."
          },
          "locations": {
            "title": "📍 Bulk locations (PAID)  (used when Search Mode = byLocation)",
            "type": "array",
            "description": "Multiple free-text locations in one run (PAID).",
            "items": {
              "type": "string"
            }
          },
          "polygon": {
            "title": "🔷 Polygon ring  (used when Search Mode = byPolygon, PAID)",
            "type": "string",
            "description": "Closed polygon as `lon lat, lon lat, …` (at least 4 points, lon first). First and last point must match (auto-closed if not).\n\nExample (central Seattle): `-122.44 47.70, -122.28 47.70, -122.28 47.58, -122.44 47.58, -122.44 47.70`"
          },
          "lat": {
            "title": "🗺️ Latitude  (used when Search Mode = byCoordinates)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for a radial search. Example: `30.27`."
          },
          "lng": {
            "title": "🗺️ Longitude  (used when Search Mode = byCoordinates)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for a radial search. Example: `-97.74`."
          },
          "radius": {
            "title": "📏 Radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Search radius in miles around the lat/lng center (1-50).",
            "default": 5
          },
          "propertyUrls": {
            "title": "🏠 Property URLs  (used when Search Mode = propertyDetails)",
            "uniqueItems": true,
            "type": "array",
            "description": "Redfin home-detail URLs — one full dossier per URL. Format: https://www.redfin.com/TX/Austin/6702-Fireoak-Dr-78759/home/31327561\n\nEach dossier includes: listing agent name + phone, marketing remarks, key facts, full amenity details, price history, schools with ratings, flood risk, view/favorite popularity stats, Redfin Estimate, and Walk / Bike / Transit Scores. FREE tier processes 1 property per run.",
            "items": {
              "type": "string"
            }
          },
          "propertyAddresses": {
            "title": "📮 Property Addresses  (used when Search Mode = propertyDetails)",
            "uniqueItems": true,
            "type": "array",
            "description": "Full US street addresses — one full dossier per address. Example: \"9201 La Siesta Bnd, Austin, TX 78749\". Same dossier fields as Property URLs.",
            "items": {
              "type": "string"
            }
          },
          "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
          },
          "includeMarketInfo": {
            "title": "🔥 Include market info (PAID)",
            "type": "boolean",
            "description": "Add per-listing market context: hot-market stats (share of homes going under contract fast in the area) and mortgage cost inputs (current rate info, property tax rate, insurance rates, county). Charged as its own per-listing enrichment event (separate from the Redfin Estimate + Walk Score bundle's charge).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}