{
  "openapi": "3.0.1",
  "info": {
    "title": "Realtor Agent Phone Scraper",
    "description": "Extract publicly displayed Realtor.com agent details using a public profile URL or profile identifiers.",
    "version": "1.1",
    "x-build-id": "g7DREhW5oVJXg3a5c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~realtor-agent-phone-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-realtor-agent-phone-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/w3crawler~realtor-agent-phone-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-realtor-agent-phone-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/w3crawler~realtor-agent-phone-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-realtor-agent-phone-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": {
          "startUrls": {
            "title": "Agent profile URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Public HTTPS Realtor.com profile URLs under /realestateagents/. Custom profile URLs take precedence over profileIds.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Profile URL",
                  "description": "For example, https://www.realtor.com/realestateagents/example-profile.",
                  "type": "string",
                  "pattern": "^https://(?:[^./]+\\.)?realtor\\.com/realestateagents/[^/?#]+/?(?:\\?.*)?$"
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "profileIds": {
            "title": "Profile IDs",
            "maxItems": 50,
            "type": "array",
            "description": "Public profile identifiers used in /realestateagents/{profileId} URLs. Ignored when the same source is already supplied in startUrls.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "fulfillmentIds": {
            "title": "Fulfillment IDs",
            "maxItems": 50,
            "type": "array",
            "description": "Optional context identifiers. They do not generate guessed URLs; a non-empty array always produces an IDENTIFIER_NOT_RESOLVED diagnostic because this Actor does not resolve these identifiers.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "nrdsIds": {
            "title": "NRDS IDs",
            "maxItems": 50,
            "type": "array",
            "description": "Optional context identifiers. They do not generate guessed URLs; a non-empty array always produces an IDENTIFIER_NOT_RESOLVED diagnostic because this Actor does not resolve these identifiers.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "maxItems": {
            "title": "Maximum profiles",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of profile pages requested across all supplied sources. Range: 1–200.",
            "default": 50
          },
          "includeListings": {
            "title": "Include listings and sales",
            "type": "boolean",
            "description": "Include bounded public listing/sale rows discovered in the profile payload or page links.",
            "default": true
          },
          "maxListings": {
            "title": "Maximum listings per profile",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum listing or sales rows retained per profile. 0 disables listing rows.",
            "default": 25
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Include bounded public review summaries when exposed by the profile page.",
            "default": true
          },
          "maxReviews": {
            "title": "Maximum reviews per profile",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum public review summaries retained per profile. 0 disables review rows.",
            "default": 10
          },
          "includeTestimonials": {
            "title": "Include testimonials",
            "type": "boolean",
            "description": "Include a small bounded sample of public testimonials when exposed. Disabled by default because testimonials can contain personal narratives.",
            "default": false
          },
          "maxTestimonials": {
            "title": "Maximum testimonials per profile",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum public testimonials retained per profile. 0 disables testimonial rows.",
            "default": 5
          },
          "includeDiagnostics": {
            "title": "Include diagnostic rows",
            "type": "boolean",
            "description": "Emit minimal {url,error,errorCode,scrapedAt} dataset rows for blocked, empty, or failed pages. Run-level counts remain in OUTPUT_SUMMARY.",
            "default": true
          },
          "discoverRelatedAgents": {
            "title": "Discover related public agents",
            "type": "boolean",
            "description": "When the supplied profile pages cannot fill maxItems, read additional publicly displayed agents from a public Realtor.com agent directory that is served without an access boundary. Set to false to keep the dataset limited to the supplied profile URLs.",
            "default": true
          },
          "includeDiscoveredContactDetails": {
            "title": "Include contact data from related agents",
            "type": "boolean",
            "description": "Related agents discovered on a public directory are not the requested profile. Their email and phone are withheld by default; enable only with a lawful basis to store that personal data.",
            "default": false
          },
          "allowArchivedCapture": {
            "title": "Allow archived capture after a block",
            "type": "boolean",
            "description": "Disabled by default: a blocked live profile fails closed with a diagnostic instead of substituting a stale Wayback capture. Enabling labels rows with dataOrigin=archive and sourceCapturedAt.",
            "default": false
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between profile requests and bounded retry backoff. Range: 0–10000 ms.",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for one public page request. Range: 5–120 seconds.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries are bounded and are not used for clear access blocks, 401/403/404/429 responses, or untrusted redirects. Range: 0–3.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration used for the actual public page requests. Proxy rotation does not bypass access controls; credentials are never written to output."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}