{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Sold Homes Scraper: Recent Sales and Comps",
    "description": "Get homes that recently sold on Redfin, by city, ZIP code, region or map polygon, from the past day up to five years back. Each row has the sale price, sale date, beds, baths, square feet, home type, address and photo, for comparable sales, pricing and market reports.",
    "version": "1.0",
    "x-build-id": "uk3t0yMb9JrycssLM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happyendpoint~redfin-sold-homes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happyendpoint-redfin-sold-homes-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/happyendpoint~redfin-sold-homes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-happyendpoint-redfin-sold-homes-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/happyendpoint~redfin-sold-homes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-happyendpoint-redfin-sold-homes-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "sold",
              "soldByLocation",
              "soldByPolygon"
            ],
            "type": "string",
            "description": "Which data to fetch. Each option is one kind of request."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most results to return. The run stops once it has this many.",
            "default": 100
          },
          "location": {
            "title": "Location",
            "maxLength": 200,
            "type": "string",
            "description": "The place to look in, as plain text: a city followed by its state code, a ZIP code, a neighborhood, a county, a school or a school district. A street address or a state name alone is refused. Used by: Sold homes by location."
          },
          "regionId": {
            "title": "Region ID",
            "minimum": 1,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Redfin's number for a region: a city, county, neighborhood, ZIP code, state, school district or school zone. The homes-for-sale Actor listed under More Redfin Actors finds it from a typed place name. Send it with Region type, or send a Polygon instead. Used by: Sold homes by region or polygon."
          },
          "regionType": {
            "title": "Region type",
            "enum": [
              "city",
              "neighborhood",
              "zip",
              "state",
              "county",
              "school",
              "school-district"
            ],
            "type": "string",
            "description": "What kind of place the Region ID stands for. Set it whenever you set Region ID. Sold-home searches also take a whole state. Used by: Sold homes by region or polygon."
          },
          "polygon": {
            "title": "Polygon",
            "pattern": "^-?[0-9]{1,3}(\\.[0-9]+)? -?[0-9]{1,3}(\\.[0-9]+)?(,-?[0-9]{1,3}(\\.[0-9]+)? -?[0-9]{1,3}(\\.[0-9]+)?){3,}$",
            "type": "string",
            "description": "The shape of the area to search, written as longitude and latitude pairs. Put a space inside each pair and a comma between pairs, use four points or more, and end on the starting point. Used by: Sold homes by region or polygon, Sold homes by polygon."
          },
          "soldWithinDays": {
            "title": "Sold within (days)",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "How many days back a sale may have closed. Leave it empty for the last 30 days; the longest window is 1825 days, about five years. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "propertyTypes": {
            "title": "Home types",
            "pattern": "^(house|condo|townhouse|multi-family|land|other|mobile|co-op)(,(house|condo|townhouse|multi-family|land|other|mobile|co-op))*$",
            "type": "string",
            "description": "Home types separated by commas, any of which may match: house, townhouse, condo, co-op, multi-family, mobile, land or other. Leave it empty for all. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Lowest sale price. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Highest sale price. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "minBeds": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Fewest bedrooms a home may have. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "maxBeds": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Most bedrooms a home may have. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "minBaths": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Fewest bathrooms a home may have, such as 1.5 or 2. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "minSqft": {
            "title": "Minimum living area (sq ft)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Smallest living area, in square feet. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "maxSqft": {
            "title": "Maximum living area (sq ft)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Largest living area, in square feet. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "query": {
            "title": "Keywords",
            "maxLength": 200,
            "type": "string",
            "description": "Words to look for in the listing text. With several words, only homes whose text has every one of them are kept. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "priceReduced": {
            "title": "Price cut",
            "enum": [
              "within-1-day",
              "within-3-days",
              "within-7-days",
              "within-14-days",
              "within-30-days",
              "more-than-30-days",
              "more-than-60-days",
              "more-than-120-days"
            ],
            "type": "string",
            "description": "Only homes whose asking price was lowered while they were on the market, by how recently. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "openHouse": {
            "title": "Open house",
            "enum": [
              "any",
              "this-weekend"
            ],
            "type": "string",
            "description": "Only homes with an open house on their listing, at any time or on the coming weekend. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "recommended",
              "newest",
              "price-low",
              "price-high",
              "sqft",
              "lot-size",
              "price-per-sqft",
              "oldest",
              "recently-sold"
            ],
            "type": "string",
            "description": "How to order the homes. Latest sale first puts the newest sales on top. Leave it empty for the order Redfin recommends. Used by: Sold homes by region or polygon, Sold homes by location, Sold homes by polygon."
          },
          "advancedFilters": {
            "title": "Advanced filters",
            "type": "object",
            "description": "More filters as one JSON object. The README lists every accepted key; any other key is refused."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}