{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor Com Agent Scraper With Market & Brokerage Stats",
    "description": "Realtor.com Agent Scraper extracts agent profiles with market and brokerage stats, including names, locations, specialties, sales data, brokerage details, ratings, contact info, and profile URLs. Ideal for agent research, lead generation, market analysis, and real estate intelligence.",
    "version": "0.1",
    "x-build-id": "EmD51gvmQcG9CQ9om"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~realtor-com-agent-scraper-with-market-brokerage-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-realtor-com-agent-scraper-with-market-brokerage-stats",
        "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-agent-scraper-with-market-brokerage-stats/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-realtor-com-agent-scraper-with-market-brokerage-stats",
        "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-agent-scraper-with-market-brokerage-stats/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-realtor-com-agent-scraper-with-market-brokerage-stats",
        "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": "One or more zip codes to size up as markets (e.g. ['07101', '00501']). Each zip becomes one territory rollup. Add several to compare markets side by side.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerZipcode": {
            "title": "🔢 Agents Sampled Per Zip Code",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many agents to pull per zip code before computing the rollup. A larger sample makes the market and brokerage averages more representative. Example: 50 → up to 50 agents per zip feed the stats. Default is 10.",
            "default": 10
          },
          "sortOrder": {
            "title": "🔀 Agent Sort Order",
            "enum": [
              "RELEVANT_AGENTS",
              "RATINGS_REVIEWS",
              "MOST_SALES",
              "MOST_RECENT_ACTIVITY",
              "TESTIMONIALS_RECOMMENDATIONS"
            ],
            "type": "string",
            "description": "Order agents are drawn from Realtor.com before the sample is taken. Use MOST_SALES to bias the sample toward top producers, or RELEVANT_AGENTS for the default mix.",
            "default": "RELEVANT_AGENTS"
          },
          "rankTopAgents": {
            "title": "🏆 Rank Top Agents Per Zip",
            "type": "boolean",
            "description": "Rank agents within each zip by sold count (ties broken by review count, then rating) and add top_agent_rank, top_agent_in_zip, and agent_market_share to every agent row. Default is true.",
            "default": true
          },
          "marketStats": {
            "title": "🗺️ Territory Market Stats",
            "type": "boolean",
            "description": "Build one market-by-zip summary per zip (agent count, total & average listings/sold/reviews, average rating, top agent). Written to a separate 'market-breakdown' dataset. Default is true.",
            "default": true
          },
          "aggregateByCompany": {
            "title": "🏢 Brokerage Breakdown",
            "type": "boolean",
            "description": "Group the scraped agents by brokerage/office and roll up per-firm totals and averages across all zips. Written to the same 'market-breakdown' dataset. Default is true.",
            "default": true
          },
          "maxRetries": {
            "title": "🔁 Max Retries Per Request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a blocked or unstable request before rotating the proxy IP. Default is 3.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Starts direct (no proxy). On an anti-bot block or data-less response it falls back to datacenter, then sticky residential with retries. Enable Apify Proxy here to start proxied."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}