{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Contact & Tech Stack Scraper",
    "description": "Scrape any website for emails, phone numbers, social profiles, tech stack, ad pixels, chatbot, and a lead score. One clean record per domain. Bulk lead generation + MCP server for AI agents.",
    "version": "0.1",
    "x-build-id": "zgyGC7iu9yfOX9One"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/headply~website-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-headply-website-intelligence-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/headply~website-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-headply-website-intelligence-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/headply~website-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-headply-website-intelligence-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": "Start URLs",
            "type": "array",
            "description": "List of websites to crawl, as a standard Apify request list. Each entry is an object with a `url`. Merged with the `websites` field.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "websites": {
            "title": "Websites (plain URLs)",
            "type": "array",
            "description": "Convenience list of plain website URLs, one per line. Merged with `startUrls`. At least one of `startUrls` or `websites` must be non-empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerSite": {
            "title": "Max pages per site",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on the number of pages crawled per domain. The default of 3 fetches the homepage plus the two highest-ranked contact pages (contact / about / team) and skips product/category sprawl — that's where the leads live. Raise for broader coverage; lower (e.g. 1) for homepage-only fastest mode.",
            "default": 3
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum link depth from the start URL (homepage is depth 0).",
            "default": 2
          },
          "prioritizeContactPages": {
            "title": "Prioritize contact pages",
            "type": "boolean",
            "description": "Enqueue likely contact/about/team pages and footer links before generic internal links.",
            "default": true
          },
          "renderJavaScript": {
            "title": "Render JavaScript",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "When to use a real browser. `auto` escalates to a browser only when a page looks JS-rendered; `always` renders every page; `never` uses HTTP only.",
            "default": "auto"
          },
          "checkLiveAds": {
            "title": "Check live ads",
            "type": "boolean",
            "description": "Best-effort check of the Meta Ad Library and Google Ads Transparency Center for active ads. Slower and gated; may return null.",
            "default": false
          },
          "captureScreenshot": {
            "title": "Capture homepage screenshot",
            "type": "boolean",
            "description": "Save a homepage screenshot to the key-value store and return its URL. Forces a browser render of the homepage.",
            "default": false
          },
          "validateEmailMx": {
            "title": "Validate email MX records",
            "type": "boolean",
            "description": "DNS MX lookup for discovered email domains. No SMTP verification is ever performed.",
            "default": false
          },
          "bypassProtection": {
            "title": "Bypass bot protection (slower, costs residential proxy)",
            "type": "boolean",
            "description": "When a site is blocked by Cloudflare's passive challenge, retry with a stealth browser over residential proxy. Off by default for speed/cost — most sites don't need it. Interactive CAPTCHAs (PerimeterX, DataDome, Akamai) are never attempted (unbeatable); those fail fast regardless of this flag.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Honor each site's robots.txt rules while crawling.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Datacenter proxy (the default) is fast and cost-effective and works for most sites. Switch to Residential only for sites that block datacenter IPs — it is far more expensive per GB and will increase your per-domain cost.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrentDomains": {
            "title": "Max concurrent domains",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many domains are crawled in parallel. Higher is faster for large lists; lower reduces memory pressure. Each domain still gets its own isolated crawl.",
            "default": 5
          },
          "maxConcurrency": {
            "title": "Max concurrency (pages per domain)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of pages fetched in parallel within each domain's crawl. Use 'Max concurrent domains' to control how many domains run at once.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request fetch/render budget in seconds. Higher values give slow or heavy JavaScript sites more time to render.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up on that page.",
            "default": 1
          },
          "scoringWeights": {
            "title": "Lead scoring weights (advanced)",
            "type": "object",
            "description": "Optional override of the lead-score weights. Leave empty to use sensible defaults from scoring.py.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}