{
  "openapi": "3.0.1",
  "info": {
    "title": "Redfin Scraper & Investment Analysis",
    "description": "Scrape Redfin active, sold, rental, pending and coming-soon listings by ZIP or search URL. Compare sold comps and calculate transparent investment metrics using available property data and your assumptions.",
    "version": "0.1",
    "x-build-id": "2h0ui5tKGwCypFotE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zapticx~redfin-scraper-investment-analysis/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zapticx-redfin-scraper-investment-analysis",
        "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/zapticx~redfin-scraper-investment-analysis/runs": {
      "post": {
        "operationId": "runs-sync-zapticx-redfin-scraper-investment-analysis",
        "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/zapticx~redfin-scraper-investment-analysis/run-sync": {
      "post": {
        "operationId": "run-sync-zapticx-redfin-scraper-investment-analysis",
        "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": [
          "locations",
          "listingType",
          "maxResultsPerLocation"
        ],
        "properties": {
          "locations": {
            "title": "Locations",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 ZIP codes or Redfin city/ZIP URLs for real estate market data. City text lookup is experimental.",
            "default": [
              "78704"
            ],
            "items": {
              "type": "string"
            }
          },
          "listingType": {
            "title": "Listing type",
            "enum": [
              "forSale",
              "sold",
              "forRent",
              "comingSoon",
              "pending"
            ],
            "type": "string",
            "description": "Pending includes Redfin's pending and contingent/under-contract statuses.",
            "default": "forSale"
          },
          "maxResultsPerLocation": {
            "title": "Maximum results per location",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100 results per location. This is a sample limit, not a full-market guarantee. Check coverageStatus.",
            "default": 20
          },
          "soldWithin": {
            "title": "Sold within",
            "enum": [
              "1_week",
              "1_month",
              "3_months",
              "6_months",
              "1_year",
              "2_years",
              "3_years",
              "5_years"
            ],
            "type": "string",
            "description": "Applied only to sold searches.",
            "default": "3_months"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude properties priced below this amount."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude properties priced above this amount."
          },
          "minBeds": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "type": "number",
            "description": "Exclude properties with fewer bedrooms."
          },
          "maxBeds": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "type": "number",
            "description": "Exclude properties with more bedrooms."
          },
          "minBaths": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "type": "number",
            "description": "Exclude properties with fewer bathrooms."
          },
          "maxBaths": {
            "title": "Maximum bathrooms",
            "minimum": 0,
            "type": "number",
            "description": "Exclude properties with more bathrooms."
          },
          "minSqFt": {
            "title": "Minimum square feet",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude properties below this interior size."
          },
          "maxSqFt": {
            "title": "Maximum square feet",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude properties above this interior size."
          },
          "propertyTypes": {
            "title": "Property types",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional normalized property-type filter.",
            "items": {
              "type": "string",
              "enum": [
                "HOUSE",
                "CONDO",
                "TOWNHOUSE",
                "MULTI_FAMILY",
                "LAND",
                "OTHER"
              ]
            }
          },
          "includeComps": {
            "title": "Calculate sold comps",
            "type": "boolean",
            "description": "Select nearby recent sales using explicit property-type, bed, size, time, and distance rules.",
            "default": false
          },
          "investmentAnalysis": {
            "title": "Investment analysis assumptions",
            "type": "object",
            "description": "Optional real estate investment analysis. Supply monthlyRentOverride for rental returns. Unknown tax or HOA keeps dependent metrics null.",
            "properties": {
              "enabled": {
                "title": "Enable analysis",
                "type": "boolean",
                "description": "Calculate financing and rental-return metrics.",
                "editor": "checkbox",
                "default": false
              },
              "downPaymentPercent": {
                "title": "Down payment percent",
                "type": "number",
                "description": "Down payment as a percentage of purchase price.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 20
              },
              "interestRate": {
                "title": "Interest rate",
                "type": "number",
                "description": "Annual mortgage interest rate as a percentage.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 7
              },
              "loanTermYears": {
                "title": "Loan term",
                "type": "integer",
                "description": "Mortgage amortization term in years.",
                "editor": "number",
                "minimum": 1,
                "maximum": 50,
                "default": 30
              },
              "closingCostPercent": {
                "title": "Closing cost percent",
                "type": "number",
                "description": "Estimated closing costs as a percentage of price.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 3
              },
              "propertyTaxPercentAnnual": {
                "title": "Property tax assumption",
                "type": "number",
                "description": "Optional annual tax percentage used only when source tax is unavailable.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100
              },
              "insurancePercentAnnual": {
                "title": "Insurance percent",
                "type": "number",
                "description": "Estimated annual insurance as a percentage of price.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 0.5
              },
              "maintenancePercentAnnual": {
                "title": "Maintenance percent",
                "type": "number",
                "description": "Estimated annual maintenance as a percentage of price.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 1
              },
              "vacancyPercent": {
                "title": "Vacancy percent",
                "type": "number",
                "description": "Estimated vacancy deduction from gross rent.",
                "editor": "number",
                "minimum": 0,
                "maximum": 100,
                "default": 5
              },
              "monthlyRentOverride": {
                "title": "Monthly rent override",
                "type": "number",
                "description": "User-provided monthly rent. Required for NOI, cap rate, cash-on-cash and DSCR in V1.",
                "editor": "number",
                "minimum": 0
              }
            },
            "default": {
              "enabled": false
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct networking is the default. Use your Apify US RESIDENTIAL proxy for sustained workloads if needed. Standard datacenter proxy failed validation."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}