{
  "openapi": "3.0.1",
  "info": {
    "title": "Homes.com Scraper",
    "description": "Scrape Homes.com (CoStar) US real estate. Enriched property details by id or URL; search for sale / rent / sold by location, ZIP, coordinates or URL; place autocomplete; and find agents by name with full profiles.",
    "version": "1.0",
    "x-build-id": "wnDT7T4ZeU3LYzOOz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~homes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-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/one-api~homes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-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/one-api~homes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-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",
        "properties": {
          "property_inputs": {
            "title": "Property id or Homes.com URL (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and calls the right endpoint:\n• A homes.com property key (e.g. `g71pgh8bn398t`) → `/details/byid`\n• A `https://www.homes.com/property/.../<key>/` URL → `/details/byurl`\n\nEach row = one fully enriched property record: price, beds, baths, square feet, lot size, year built, the full description and its \"as of\" date, HOA fee, public records (zoning, subdivision, county, parcel, MLS#), highlights, the complete feature list, open houses, listing agent + phone, and every photo. Pull a key from any Search or Agent-listings result.",
            "items": {
              "type": "string"
            }
          },
          "search_inputs": {
            "title": "Location, ZIP code, or Homes.com results URL (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and routes to the right `/search/*` endpoint:\n• A homes.com results URL, e.g. `https://www.homes.com/austin-tx/` → `/search/byurl`\n• A 5-digit ZIP code, e.g. `78735` → `/search/byzip`\n• Anything else (city / state / neighborhood, e.g. `Austin, TX`) → `/search/bylocation`\n\nThe filters below apply to every location and ZIP query. Each hit returns one row per listing.",
            "items": {
              "type": "string"
            }
          },
          "coordinate_inputs": {
            "title": "Coordinates: lat,lon or lat,lon,radiusMiles (one per line)",
            "type": "array",
            "description": "Radius search around a point via `/search/bycoordinates`. One point per line as `latitude,longitude` or `latitude,longitude,radiusMiles` (radius in MILES, default 5). Example: `30.267,-97.743,3` searches 3 miles around downtown Austin. The filters below also apply. One row per listing.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Deal type",
            "enum": [
              "For_Sale",
              "For_Rent",
              "Sold"
            ],
            "type": "string",
            "description": "Listing status to search for. Applies to every Search and Coordinates query.",
            "default": "For_Sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "",
              "house",
              "townhouse",
              "condo",
              "multifamily",
              "land",
              "mobile",
              "commercial",
              "coop",
              "other"
            ],
            "type": "string",
            "description": "Restrict results to a property type. Leave as Any for all types.",
            "default": ""
          },
          "priceRange": {
            "title": "Price range ($)",
            "type": "string",
            "description": "Format: `min:300000,max:900000` — or just `min:300000` / `max:900000`. For rentals this filters the monthly price.",
            "default": ""
          },
          "bedsRange": {
            "title": "Beds",
            "type": "string",
            "description": "Number of bedrooms, e.g. `min:3` or `min:2,max:4`.",
            "default": ""
          },
          "bathsRange": {
            "title": "Baths",
            "type": "string",
            "description": "Number of bathrooms, e.g. `min:2` or `min:2,max:3` (half-baths allowed).",
            "default": ""
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "Recommended",
              "Price_Low_to_High",
              "Price_High_to_Low",
              "Most_Homes"
            ],
            "type": "string",
            "description": "Result ordering for `/search/bylocation`, `/search/byzip` and `/search/bycoordinates`.",
            "default": "Recommended"
          },
          "pages": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many result pages to fetch for each location / ZIP / coordinate / URL search (~40 listings per page).",
            "default": 1
          },
          "resultCount": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Listings to return per page for every search (1–40; homes.com serves 40 per page).",
            "default": 20
          },
          "autocomplete_inputs": {
            "title": "Location text to resolve (one per line)",
            "type": "array",
            "description": "Resolve a city / state / neighborhood / ZIP to the homes.com place suggestions used by Search, via `/autocomplete`. Each suggestion = one row (name, geo key, type, city/state/county, coordinates).",
            "items": {
              "type": "string"
            }
          },
          "agent_search_inputs": {
            "title": "Agent name to search (one per line)",
            "type": "array",
            "description": "Find real-estate agents by name via `/agent/search`. Each match = one row (name, agent key, company, profile URL). Use a returned key in the Agent details box below for the full profile.",
            "items": {
              "type": "string"
            }
          },
          "agent_detail_inputs": {
            "title": "Agent key or Homes.com agent URL (one per line)",
            "type": "array",
            "description": "Full agent profile via `/agent/details`. Auto-detects each entry:\n• An agent key (e.g. `w9enbmj`) → resolved by id\n• A `https://www.homes.com/real-estate-agents/.../<key>/` URL → resolved by url\n\nEach row = office, city/state, phone, email, license, bio, photo, active-listing count, sold count and rating when present.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}