{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor.com Agents by Zip Code Scraper With Lead Generation",
    "description": "Realtor.com Agents by Zip Code Scraper — Find real estate agents by ZIP code and extract names, agencies, locations, phone numbers, emails, specialties, ratings, and profile URLs. Build targeted agent lead lists for real estate prospecting, market research, and outreach.",
    "version": "0.1",
    "x-build-id": "ABCKNyTgyi97M0LjZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~realtor-com-agents-by-zip-code-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-realtor-com-agents-by-zip-code-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/scrapier~realtor-com-agents-by-zip-code-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-realtor-com-agents-by-zip-code-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/scrapier~realtor-com-agents-by-zip-code-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-realtor-com-agents-by-zip-code-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",
        "required": [
          "zipCodes"
        ],
        "properties": {
          "zipCodes": {
            "title": "📍 Target Zip Codes",
            "type": "array",
            "description": "Zip codes to pull agent leads from (e.g. [\"07101\", \"00501\"]). Add as many as you need for a multi-market lead list.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerZipcode": {
            "title": "🎯 Max Agents Per Zip Code",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many agents to pull and score per zip code, before the lead-quality filters below are applied. Final lead count per zip can be lower once filters run.",
            "default": 10
          },
          "sortOrder": {
            "title": "🔀 Lead Sort Priority",
            "enum": [
              "RELEVANT_AGENTS",
              "RATINGS_REVIEWS",
              "MOST_SALES",
              "MOST_RECENT_ACTIVITY",
              "TESTIMONIALS_RECOMMENDATIONS"
            ],
            "type": "string",
            "description": "Order in which realtor.com returns agents for each zip code.",
            "default": "RELEVANT_AGENTS"
          },
          "maxRetries": {
            "title": "🔁 Max Retry Attempts",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Max retry attempts per request (agent list page or agent detail) before giving up on that request. Also governs proxy-fallback retries.",
            "default": 3
          },
          "minListingCount": {
            "title": "🏘️ Minimum Active Listings",
            "minimum": 0,
            "type": "integer",
            "description": "Drop agents with fewer than this many active for-sale listings. 0 = no minimum.",
            "default": 0
          },
          "minRating": {
            "title": "⭐ Minimum Average Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Drop agents whose average_rating is below this value (0-5). Agents with no rating on file are dropped once this is above 0. 0 = no minimum.",
            "default": 0
          },
          "paidOnly": {
            "title": "💳 Paid/Featured Agents Only",
            "type": "boolean",
            "description": "Keep only agents flagged as paid/featured (is_paid) on realtor.com — often the more active, higher-budget leads.",
            "default": false
          },
          "enrichWebsiteContacts": {
            "title": "🔍 Enrich Leads From Agent Websites",
            "type": "boolean",
            "description": "When ON, visits the agent's own external website and extracts an email + social links (Facebook/Instagram/LinkedIn/X/YouTube) if present. Always null when the site has none — never fabricated.",
            "default": true
          },
          "websiteEnrichmentTimeoutSec": {
            "title": "⏱️ Website Fetch Timeout (seconds)",
            "minimum": 3,
            "maximum": 30,
            "type": "integer",
            "description": "How long to wait for the agent's website to respond before marking enrichment as failed for that lead and moving on.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy Configuration",
            "type": "object",
            "description": "Starts with no proxy by default. If realtor.com (or an agent's own website) blocks requests, automatically falls back to a datacenter proxy, then a residential proxy with retries."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}