{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Scraper: US Real Estate Listings API",
    "description": "Redfin API for US homes for sale and sold homes. Paste any Redfin search URL or pick cities and ZIP codes; get one record per home with price USD, address, beds, baths, square feet, home type, photos and the listing URL, plus optional sale and tax history.",
    "version": "0.3",
    "x-build-id": "euXBCrOveP7dpKBIF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~redfin-us-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-redfin-us-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/automatic~redfin-us-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-redfin-us-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/automatic~redfin-us-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-redfin-us-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": {
          "startUrls": {
            "title": "Redfin search URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Paste one or more redfin.com search page URLs (city, ZIP code, neighborhood or county pages) with any filters you set on Redfin: price, beds, baths, home type, square feet and more. Each URL keeps its own filters. Use this instead of, or alongside, Cities, ZIP codes and Custom search paths. Single home pages are not accepted. Example: [{\"url\": \"https://www.redfin.com/city/30818/TX/Austin\"}]. Empty adds no locations of this kind; if every location input is empty, runs the Austin sample.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Built-in cities to search: Austin, TX, Seattle, WA, San Francisco, CA, Los Angeles, CA and Chicago, IL. For any other place, paste its Redfin search URL above or use Custom search paths; a city that is not built in is skipped with the reason in OUTPUT skippedSearches and the other searches still run. An input with no city, ZIP code, search path or URL at all runs a sample search of up to 10 homes in Austin, TX. Example: [\"Austin, TX\"]. Empty adds no locations of this kind; if every location input is empty, runs the Austin sample.",
            "items": {
              "type": "string"
            }
          },
          "zipcodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Five-digit US ZIP codes to search as /zipcode/{zip} pages (no region id needed). Example: [\"90210\"]. Empty adds no locations of this kind; if every location input is empty, runs the Austin sample.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Custom search paths",
            "type": "array",
            "description": "Redfin search paths or URLs for any place, e.g. /city/16832/CO/Denver or /city/30818/TX/Austin/filter/property-type=house. Page numbers and anything after ? are ignored; each search starts at page 1. Example: [\"/city/30818/TX/Austin\"]. Empty adds no locations of this kind; if every location input is empty, runs the Austin sample.",
            "items": {
              "type": "string"
            }
          },
          "propertyType": {
            "title": "Property type filter",
            "enum": [
              "house",
              "condo",
              "townhouse",
              "apartment",
              "multi-family",
              "land",
              "mobile"
            ],
            "type": "string",
            "description": "Optional home type filter added to every search: house, condo, townhouse, apartment, multi-family, land or mobile. Example: \"house\". Empty applies no property-type filter."
          },
          "sold": {
            "title": "Sold listings",
            "type": "boolean",
            "description": "Search homes sold in the last year instead of homes for sale. Sold rows carry the sale price in price_usd and the sale date in sold_date. Works with every search input. Example: false. If left unset, uses false.",
            "default": false
          },
          "includeHistory": {
            "title": "Enrich with detail-page history",
            "type": "boolean",
            "description": "Also open each home's page (up to maxDetails homes) and add history[], tax_history[] and last_sold {date, price}. Redfin currently puts its bot verification page in front of those pages, so history can come back empty; the fields are always present so your code does not change. Example: false. If left unset, uses false.",
            "default": false
          },
          "maxDetails": {
            "title": "Maximum detail pages per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Most home pages to open when includeHistory is on, so a 50-result run does not open 50 home pages. Example: 1. If left unset, uses 3.",
            "default": 3
          },
          "maxPages": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Result pages to read per search, up to 100. One page holds up to 350 homes, so the default of 1 returns up to 350 homes per search; raise it to read a whole city. A home type or pasted-URL filter is applied to each page read, so filtered searches need more pages. Example: 10. If left unset, uses 1.",
            "default": 1
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many homes across all searches. Defaults to 50, or 10 for the empty-input sample. Together with maxPages this can read a whole city (thousands of homes); set a number you are happy to pay for. Example: 500. If unset, uses 50 listings, or the smaller 10-listing Austin sample limit when all locations are empty."
          },
          "requestDelaySecs": {
            "title": "Delay between page requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Pause between page requests, 0.5 to 10 seconds. Example: 1.0. If left unset, uses 1.0.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}