{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Scraper",
    "description": "Redfin scraper for US homes for sale, sold and for rent: paste a Redfin search URL or type a city or ZIP. Price, beds, baths, sqft, lot, year built, $/sqft, HOA, days on market, MLS id, sold price and date, photos. Monitor alerts on new listings and price changes.",
    "version": "0.1",
    "x-build-id": "cqqZGIk1US3kcTRl4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~redfin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-redfin-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/datahamster~redfin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-redfin-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/datahamster~redfin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-redfin-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": {
          "searchUrls": {
            "title": "Redfin search URLs",
            "type": "array",
            "description": "Redfin search pages, one per line, with any filters you set on redfin.com (city, ZIP, neighborhood or county pages; for sale, sold or rentals). Example: https://www.redfin.com/city/30818/TX/Austin/filter/property-type=house,min-price=300k,max-price=600k,min-beds=3",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Places to search without building a URL: 'City, ST', a ZIP code, a neighborhood or a county, one per line. Example: Austin, TX or 78701. Uses the listing type and filters below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingType": {
            "title": "Listing type (for locations)",
            "enum": [
              "forSale",
              "sold",
              "forRent"
            ],
            "type": "string",
            "description": "What to search for at the locations above. A pasted search URL keeps its own type.",
            "default": "forSale"
          },
          "soldWithinDays": {
            "title": "Sold within",
            "enum": [
              "7",
              "30",
              "90",
              "180",
              "365",
              "730",
              "1095",
              "1825"
            ],
            "type": "string",
            "description": "Sold searches only: how far back. Example: 90.",
            "default": "90"
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest list price (monthly rent for rentals). Applies to locations, and replaces the same filter of a pasted URL. Example: 300000."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest list price (monthly rent for rentals). Example: 600000."
          },
          "minBeds": {
            "title": "Min beds",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Example: 3."
          },
          "maxBeds": {
            "title": "Max beds",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Example: 5."
          },
          "minBaths": {
            "title": "Min baths",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Example: 2."
          },
          "homeTypes": {
            "title": "Home types",
            "type": "array",
            "description": "Keep only these home types (any of them). Empty = all. Example: house.",
            "items": {
              "type": "string",
              "enum": [
                "house",
                "condo",
                "townhouse",
                "multi-family",
                "land",
                "manufactured",
                "co-op",
                "other",
                "apartment"
              ],
              "enumTitles": [
                "House",
                "Condo",
                "Townhouse",
                "Multi-family",
                "Land",
                "Manufactured",
                "Co-op",
                "Other",
                "Apartment (rentals)"
              ]
            },
            "default": []
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 35000,
            "type": "integer",
            "description": "Stop reading one search after this many homes. Redfin answers 350 homes per request, so 1,000 is 3 requests. In monitor mode every run reads this deep. Example: 1000.",
            "default": 1000
          },
          "includeDetails": {
            "title": "Add listing brokerage (property page)",
            "type": "boolean",
            "description": "Open each for-sale or sold home's page to add the listing brokerage company. One extra request per home. Redfin lets only about 6 property pages per run through before it answers with a challenge; the other homes come with detailsFetched false. In monitor mode only homes new to the search are opened, never on the baseline run. Agent names and phones are never collected.",
            "default": false
          },
          "maxPhotos": {
            "title": "Photos per home",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many full-size photo URLs to return per for-sale or sold home. 0 = none (photoCount is always filled). Example: 10.",
            "default": 10
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many homes (you are charged only for pushed homes). Shared between searches. Example: 20.",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}