{
  "openapi": "3.0.1",
  "info": {
    "title": "Real Estate Listings & Sold Comps Scraper",
    "description": "Scrape US property listings and sold comparables from Redfin. Every row carries price per square foot, HOA, lot size, year built, MLS number and coordinates. Sold searches return confirmed sales only - dated and priced, never padded with unconfirmed rows - plus median $/sqft per area.",
    "version": "0.0",
    "x-build-id": "1rCceQjZHbnwi7yC8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eiv~real-estate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eiv-real-estate-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/eiv~real-estate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eiv-real-estate-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/eiv~real-estate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eiv-real-estate-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": "Redfin location URLs",
            "type": "array",
            "description": "One per line. Open the area on redfin.com and paste the address bar: a city page (redfin.com/city/30818/TX/Austin), a ZIP page (redfin.com/zipcode/78704), a county page or a neighbourhood page. Individual property pages and saved searches will not work.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (for chaining)",
            "type": "array",
            "description": "Alternative to Locations, for feeding output from another Actor straight into this one.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sourceDatasetId": {
            "title": "Source dataset ID",
            "type": "string",
            "description": "Read location URLs from an existing dataset instead of typing them."
          },
          "sourceDatasetField": {
            "title": "Source dataset field",
            "type": "string",
            "description": "Which field on the source dataset holds the location URL.",
            "default": "locationUrl"
          },
          "listingType": {
            "title": "What to return",
            "enum": [
              "for-sale",
              "sold"
            ],
            "type": "string",
            "description": "'For sale' returns the live market. 'Sold' returns comparables — the same fields plus a sold date — which is what valuations and offer analysis are built on.",
            "default": "for-sale"
          },
          "soldWithinDays": {
            "title": "Sold within (days)",
            "minimum": 1,
            "maximum": 1095,
            "type": "integer",
            "description": "Look-back window for comparables. Ignored when returning for-sale listings. Appraisers usually work to 90 or 180 days.",
            "default": 90
          },
          "maxListingsPerLocation": {
            "title": "Max properties per location",
            "minimum": 1,
            "maximum": 350,
            "type": "integer",
            "description": "Redfin's export returns at most 350 properties per request and gives no way to page past that. When a location has more, the summary row is flagged truncated — narrow with a price range, a property type, or a smaller area.",
            "default": 350
          },
          "includeLocationSummary": {
            "title": "Include a summary per location",
            "type": "boolean",
            "description": "Add one rollup record per location with median price, median price per square foot, median size and median days on market. Not billed as a property.",
            "default": true
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Leave empty for all. Valid values: house, condo, townhouse, multi-family, land, manufactured-home, co-op, other.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "In US dollars. 0 disables. On a sold search Redfin filters by list price while the export carries the sale price, so the bounds are re-applied to the sale price here — a comparable that closed outside your range is dropped and not charged.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "In US dollars. 0 disables. Pairing a min and max is also the way to work around the 350-property ceiling: run the same area in price bands.",
            "default": 0
          },
          "minBeds": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 disables.",
            "default": 0
          },
          "minBaths": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 disables.",
            "default": 0
          },
          "minSqft": {
            "title": "Minimum square feet",
            "minimum": 0,
            "type": "integer",
            "description": "Interior floor area. 0 disables.",
            "default": 0
          },
          "minYearBuilt": {
            "title": "Built no earlier than",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Four-digit year. Useful for skipping pre-1978 stock when lead-paint rules matter, or for isolating recent construction. 0 disables.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Locations processed in parallel. Redfin sheds load under bursts by returning empty responses, so this is deliberately conservative. Lower it if you see throttling.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout.",
            "default": 60
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for connection resets and 5xx responses. Empty throttled responses are retried separately with a backoff.",
            "default": 2
          },
          "flattenOutput": {
            "title": "Flatten output for CSV",
            "type": "boolean",
            "description": "Emit flat dot-notation columns. The property records are already flat, so this mainly affects the summary rows.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Recommended for runs over a handful of locations. Redfin throttles by address, and a proxy spreads the requests.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}