{
  "openapi": "3.0.1",
  "info": {
    "title": "Zillow Agents Leads [Scrape All Agents] [PPE]",
    "description": "Unlock the power of Zillow with automated agent profile scraping. Effortlessly gather key insights and contact data, including emails and phone numbers, from real estate agents.",
    "version": "0.0",
    "x-build-id": "HII4a6CcUQHKRTRQq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~zillow-agents-leads-scraper-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-zillow-agents-leads-scraper-ppe",
        "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/memo23~zillow-agents-leads-scraper-ppe/runs": {
      "post": {
        "operationId": "runs-sync-memo23-zillow-agents-leads-scraper-ppe",
        "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/memo23~zillow-agents-leads-scraper-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-zillow-agents-leads-scraper-ppe",
        "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": {
          "dbType": {
            "title": "What to get",
            "enum": [
              "agents",
              "propertyManagers",
              "lenders"
            ],
            "type": "string",
            "description": "Choose which pre-collected directory to pull from. Agents = real estate agents (500k+, direct cell & email). Property Managers = property-management companies (email + phones). Lenders = mortgage loan officers (NMLS id, company & phones — lenders are phone-first, so no email on record).",
            "default": "agents"
          },
          "dbState": {
            "title": "State (2-letter code)",
            "type": "string",
            "description": "The US state to pull for — e.g. FL, CA, TX. Setting this alone delivers instant database results."
          },
          "dbCity": {
            "title": "City (optional)",
            "type": "string",
            "description": "Narrow the results to a single city (case-insensitive). Leave empty to return the whole state."
          },
          "dbBrokerage": {
            "title": "Company / Brokerage contains (optional)",
            "type": "string",
            "description": "Only return records whose company/brokerage name contains this text (case-insensitive), e.g. \"Keller Williams\". Applies to whichever directory you picked above."
          },
          "dbFullDetail": {
            "title": "Full detail (same fields as live scraping)",
            "type": "boolean",
            "description": "On by default: Instant Database returns the COMPLETE record — every field a live scrape of that directory produces — not just the contact summary. Turn this OFF for a compact, flat contact list that's tidier to open as a CSV. (Output columns differ by directory: agents, property managers, and lenders each carry their own fields.)",
            "default": true
          },
          "teamLeadersOnly": {
            "title": "Team leaders only (agents)",
            "type": "boolean",
            "description": "Return ONLY team leaders — agents who lead a team (their Zillow profile carries the team name and member roster), not the individual members and not company/brokerage profiles. With \"Full detail\" ON you get each leader's complete record (recent sales with close dates, team roster, Member since); turn it OFF for a clean flat contact list (name, team, email, phones, brokerage, city, state). Applies to the Agents directory; combine with a State for fast, per-state pulls.",
            "default": false
          },
          "dbOffset": {
            "title": "Skip first N records (resume a split pull)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip this many records before delivering, so you can pull a large state in slices — e.g. get the first 50,000 with Maximum results = 50000, then a second run with Skip = 50000 continues exactly where the first left off (ordering is stable across runs). Useful when one full state doesn't fit your plan's usage cap. Leave at 0 to start from the beginning.",
            "default": 0
          },
          "dbCountOnly": {
            "title": "Count only (free preview — no records delivered)",
            "type": "boolean",
            "description": "Check the size of a pull before paying for it: reports how many records match your filters, how many were refreshed in the last 14 days, and the estimated cost — as the run's status message plus one summary row. Turn it off to actually pull the records.",
            "default": false
          },
          "dbUpdatedWithinDays": {
            "title": "Updated within the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only records we re-scraped within this many days — e.g. 14 delivers just the freshest slice of a market (the same number the Count-only preview reports). Applies to Agents and Team leaders. Leave empty for no freshness cut."
          },
          "dbSoldWithinDays": {
            "title": "Closed a deal within the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only agents whose most recent past sale on record closed within this many days — e.g. 30 for last-month closers. Freshness follows the record's last_scraped_at; combine with the Count-only preview to check how fresh a market's records are."
          },
          "dbMinSales": {
            "title": "Min sales (last 12 months)",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents with at least this many sales in the last 12 months. For team leaders this is the TEAM's figure (Zillow reports team-wide numbers)."
          },
          "dbMaxSales": {
            "title": "Max sales (last 12 months)",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents with at most this many sales in the last 12 months — useful for excluding mega-teams when you target mid-volume producers."
          },
          "dbMinAvgPrice": {
            "title": "Min average sale price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents whose average sale price is at least this, e.g. 250000."
          },
          "dbMaxAvgPrice": {
            "title": "Max average sale price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents whose average sale price is at most this, e.g. 800000."
          },
          "dbMinYears": {
            "title": "Min years active",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents on Zillow for at least this many years (from the profile's \"Member since\" date)."
          },
          "dbMaxYears": {
            "title": "Max years active",
            "minimum": 0,
            "type": "integer",
            "description": "Only agents on Zillow for at most this many years."
          },
          "dbHasCell": {
            "title": "Only records with a cell phone",
            "type": "boolean",
            "description": "Return only records that have a direct cell phone number on file. (Agents & Property Managers.)",
            "default": false
          },
          "dbHasEmail": {
            "title": "Only records with an email",
            "type": "boolean",
            "description": "Return only records that have an email address on file. (Agents & Property Managers — lenders are phone-first with no email on record, so this is ignored for Lenders.)",
            "default": false
          },
          "dbHasPhone": {
            "title": "Only records with any phone",
            "type": "boolean",
            "description": "Return only records that have at least one phone number on file (cell, business, or brokerage).",
            "default": false
          },
          "dbPremiumOnly": {
            "title": "Only Zillow Premier / premium agents",
            "type": "boolean",
            "description": "Agents only: return only agents flagged as Zillow Premier / premium (advertising, higher-intent agents). Ignored for Property Managers & Lenders.",
            "default": false
          },
          "dbMinRating": {
            "title": "Minimum star rating (0–5)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Agents only: return only agents whose average review rating is at least this (e.g. 4 = 4★ and up). Leave empty for no rating filter. Note: agents with no reviews yet are excluded when set."
          },
          "dbMinReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Agents only: return only agents with at least this many reviews (e.g. 10) — a quick proxy for established, active agents. Leave empty for no filter."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Zillow agent-directory URLs (by city or ZIP) or agent profile URLs to scrape.",
            "items": {
              "type": "string"
            }
          },
          "getPastSales": {
            "title": "Get Past Sales",
            "type": "boolean",
            "description": "If checked, the scraper will fetch the full history of past sales for each agent.",
            "default": false
          },
          "getActiveListings": {
            "title": "Get Active For-Sale Listings",
            "type": "boolean",
            "description": "If checked, paginate the agent's <b>full active for-sale catalogue</b> (output field: <code>activeListingsHistory</code>). Without this flag, only the first ~10 listings are returned (the subset embedded in the profile page). Adds N requests per agent (N = ceil(listing_count / 5), capped at ~50 pages). Recommended only when you need the complete inventory.",
            "default": false
          },
          "getRentalListings": {
            "title": "Get Active Rental Listings",
            "type": "boolean",
            "description": "If checked, paginate the agent's <b>full active rental catalogue</b> (output field: <code>rentalListingsHistory</code>). Same shape and pagination behaviour as Get Active For-Sale Listings, but for rentals.",
            "default": false
          },
          "enrichEmails": {
            "title": "Enrich with contact emails (experimental, billed per email)",
            "type": "boolean",
            "description": "If enabled, finds a contact email for each result from its own website (or by discovering it from the name). Adds contactEmail + contactWebsite columns plus a detailed emailEnrichment object. Billed per contact email found; only charged when an email is returned, never for misses.",
            "default": false
          },
          "forceFresh": {
            "title": "Always scrape fresh (skip database)",
            "type": "boolean",
            "description": "By default, when you scrape a location we already have, we serve it instantly from the database. Enable this to force a live scrape every time instead.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "type": "integer",
            "description": "Maximum agents to return PER start URL — each URL you paste gets its own allowance (e.g. 3 city URLs × 500 = up to 1,500 agents). The default is high so a whole state comes back in full (a single state can be 10,000–40,000 agents). Your actual spend is still bounded by the run's \"Maximum cost per run\" limit — you are billed per result, so set that limit to control cost.",
            "default": 100000
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "type": "integer",
            "description": "Maximum number of pages that can be processed at the same time.",
            "default": 50
          },
          "minConcurrency": {
            "title": "Min Concurrency",
            "type": "integer",
            "description": "Minimum number of pages that will be processed at the same time.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max Request Retries",
            "type": "integer",
            "description": "Number of times the crawler will retry a failed request before giving up. Keep this low for profile-URL lists — a dead URL retried dozens of times wastes the whole run's time.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration (optional override)",
            "type": "object",
            "description": "Leave empty — the actor already routes all traffic through its own built-in US residential proxy at no extra cost to you, and Instant Database pulls need no proxy at all. Only set this if you want to use your own proxies.<br><br>Heads-up: selecting Apify's RESIDENTIAL group here will make the run fail before it starts unless your account has that add-on enabled."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}