{
  "openapi": "3.0.1",
  "info": {
    "title": "Zillow Agent Scraper — Licenses, Contacts, Sales Stats",
    "description": "Scrape Zillow agent profiles at scale — search by city or lookup by username, URL, or zuid. Returns verified contacts, license numbers + expiry, MLS IDs, service areas, sales stats, active for-sale + sold portfolios, and reviews. Built for brokerage recruiting, lead gen, and CRM enrichment.",
    "version": "1.0",
    "x-build-id": "xPjslowWv7oTLm5wO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~zillow-agent-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-zillow-agent-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/sian.agency~zillow-agent-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-zillow-agent-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/sian.agency~zillow-agent-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-zillow-agent-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "search",
              "lookup"
            ],
            "type": "string",
            "description": "How to find agents. **search** — paginate Zillow's agent directory by city/state. **lookup** — directly fetch one or more agents by username, profile URL, or encodedZuid.",
            "default": "search"
          },
          "location": {
            "title": "📍 Location (search mode)",
            "type": "string",
            "description": "City + state for the agent search, e.g. \"Miami, FL\" or \"Austin, TX\". Required when searchMode = search."
          },
          "language": {
            "title": "🌐 Language filter (search mode, optional)",
            "type": "string",
            "description": "Optional agent language filter, e.g. \"Spanish\", \"Portuguese\", \"Mandarin\". Best-effort — Zillow returns the most relevant agents and language is a soft signal."
          },
          "maxAgentsPerQuery": {
            "title": "📊 Max agents per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on how many agent records to return per search query. Default 50 (~3-4 pages). FREE tier hard-capped at 5.",
            "default": 50
          },
          "lookupTargets": {
            "title": "🔎 Lookup targets (lookup mode)",
            "type": "array",
            "description": "List of Zillow agent profile URLs (https://www.zillow.com/profile/USERNAME), usernames (e.g. RESalesForce), or encodedZuids. Required when searchMode = lookup.",
            "items": {
              "type": "string"
            }
          },
          "fetchAgentDetails": {
            "title": "👤 Fetch full agent details",
            "type": "boolean",
            "description": "When in search mode, after each agent row from the directory, call /agent/details to retrieve license numbers, MLS IDs, full contact info, service areas, parsed sales stats, and embedded listing samples. Adds 1 upstream call per agent. Always on in lookup mode.",
            "default": true
          },
          "includeForSale": {
            "title": "🏷 Enrich: Active for-sale listings",
            "type": "boolean",
            "description": "Per agent, paginate /agent/for_sale and attach the full active sale-listing portfolio (zpid, price, address, beds/baths). FREE tier: disabled.",
            "default": false
          },
          "includeForRent": {
            "title": "🏘 Enrich: Active for-rent listings",
            "type": "boolean",
            "description": "Per agent, paginate /agent/for_rent and attach the full active rental portfolio. FREE tier: disabled.",
            "default": false
          },
          "includeSoldProperties": {
            "title": "📈 Enrich: Sold properties (transaction history)",
            "type": "boolean",
            "description": "Per agent, paginate /agent/sold_properties and attach past transactions (price, sold_date, represented side). Can be 1000+ rows per agent — cap below. FREE tier: disabled.",
            "default": false
          },
          "includeReviews": {
            "title": "⭐ Enrich: Client reviews",
            "type": "boolean",
            "description": "Per agent, paginate /agent/reviews and attach client reviews (rating, comment, work description, agent rebuttal). FREE tier: disabled.",
            "default": false
          },
          "maxListingsPerAgent": {
            "title": "Max active listings per agent (for-sale + for-rent)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on for-sale + for-rent rows per agent. Default 50.",
            "default": 50
          },
          "maxSoldPerAgent": {
            "title": "Max sold properties per agent",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on sold-history rows per agent. Default 50. Some agents have 1000+ sold; raise this for full history.",
            "default": 50
          },
          "maxReviewsPerAgent": {
            "title": "Max reviews per agent",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on reviews rows per agent. Default 25.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}