{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Sold Comps Scraper - Sold Homes, Prices & $/Sqft Bands",
    "description": "Recently sold homes from Redfin for any city, ZIP code, county or neighborhood: sale price, sold date, $/sqft, beds, baths, sqft, lot, year built, HOA and MLS #, plus a comps summary per location with p10 to p90 price and $/sqft bands by bedroom count.",
    "version": "0.1",
    "x-build-id": "ylIH10vxZoQmR1Eog"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~redfin-sold-comps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-redfin-sold-comps-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/fanndev~redfin-sold-comps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-redfin-sold-comps-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/fanndev~redfin-sold-comps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-redfin-sold-comps-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",
            "type": "array",
            "description": "Where to pull sold homes: a city ('Austin, TX'), ZIP code ('78704'), county ('Travis County, TX'), neighborhood ('Ballard, Seattle'), or a Redfin URL such as https://www.redfin.com/city/16163/WA/Seattle. One set of sales (and one comps summary) per entry.",
            "items": {
              "type": "string"
            }
          },
          "soldWithinDays": {
            "title": "Sold within",
            "enum": [
              "7",
              "30",
              "90",
              "180",
              "365",
              "730",
              "1095",
              "1825"
            ],
            "type": "string",
            "description": "How far back to look.",
            "default": "90"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Only these property types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "house",
                "condo",
                "townhouse",
                "multi-family",
                "land",
                "manufactured",
                "co-op",
                "other"
              ],
              "enumTitles": [
                "House",
                "Condo",
                "Townhouse",
                "Multi-family",
                "Land",
                "Manufactured",
                "Co-op",
                "Other"
              ]
            }
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only homes that sold at or above this price."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only homes that sold at or below this price."
          },
          "minBeds": {
            "title": "Min bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "At least this many bedrooms."
          },
          "maxBeds": {
            "title": "Max bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "At most this many bedrooms."
          },
          "minBaths": {
            "title": "Min bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "At least this many bathrooms."
          },
          "minSqft": {
            "title": "Min square feet",
            "minimum": 0,
            "type": "integer",
            "description": "Interior size at least this many square feet."
          },
          "maxSqft": {
            "title": "Max square feet",
            "minimum": 0,
            "type": "integer",
            "description": "Interior size at most this many square feet."
          },
          "minYearBuilt": {
            "title": "Built in or after",
            "minimum": 1700,
            "type": "integer",
            "description": "Only homes built in or after this year."
          },
          "maxYearBuilt": {
            "title": "Built in or before",
            "minimum": 1700,
            "type": "integer",
            "description": "Only homes built in or before this year."
          },
          "maxResults": {
            "title": "Max sales per location",
            "minimum": 0,
            "type": "integer",
            "description": "Newest sales first. 0 = every matching sale (more than 10,000 sales are collected price range by price range so nothing is skipped).",
            "default": 1000
          },
          "includeCompsSummary": {
            "title": "Add comps summary",
            "type": "boolean",
            "description": "Adds one summary row per location: p10 / p25 / median / p75 / p90 sale price and price per square foot, plus medians by bedroom count and property type.",
            "default": true
          },
          "includeListingRemarks": {
            "title": "Include listing description",
            "type": "boolean",
            "description": "Adds the agent's listing description to every sale (makes rows much longer).",
            "default": false
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retries per request.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. The default (datacenter) works for Redfin and costs least; switch to Residential only if a large run starts getting blocked.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}