{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Lead Scraper - Emails, Phones & Lead Scoring",
    "description": "Turn company domains into sales-ready B2B leads: emails, phones, decision-makers, tech stack and a transparent 0-100 lead score. Pay only for leads that pass your quality gate. No LinkedIn scraping. MCP-ready for AI agents.",
    "version": "1.0",
    "x-build-id": "FlSeub0V0Jm0pIDFg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/invincible_brookbed~b2b-lead-gen-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-invincible_brookbed-b2b-lead-gen-pro",
        "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/invincible_brookbed~b2b-lead-gen-pro/runs": {
      "post": {
        "operationId": "runs-sync-invincible_brookbed-b2b-lead-gen-pro",
        "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/invincible_brookbed~b2b-lead-gen-pro/run-sync": {
      "post": {
        "operationId": "run-sync-invincible_brookbed-b2b-lead-gen-pro",
        "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": [
          "companies"
        ],
        "properties": {
          "companies": {
            "title": "Companies (domains or URLs)",
            "type": "array",
            "description": "Company domains or website URLs, one per line. Examples: `stripe.com`, `https://www.notion.so/`, `www.hubspot.com`. Domains are normalized and de-duplicated automatically.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of enriched leads to deliver (and bill). The run stops once this many leads passed the quality gate.",
            "default": 100
          },
          "maxContactsPerCompany": {
            "title": "Max contacts per company",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of named decision-makers / contacts returned per company (most senior first). Set to 0 to skip contact extraction entirely.",
            "default": 5
          },
          "minLeadScore": {
            "title": "Minimum lead score (quality gate)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Leads scoring below this value (0-100) are dropped and NOT charged. Use 40-60 to keep only well-enriched leads.",
            "default": 0
          },
          "enrichEmails": {
            "title": "Extract & enrich emails",
            "type": "boolean",
            "description": "Extract published email addresses, classify them (personal / generic), detect the company's email naming pattern and verify MX records via DNS.",
            "default": true
          },
          "enrichSocial": {
            "title": "Extract social links",
            "type": "boolean",
            "description": "Find the company's LinkedIn, Twitter/X and Facebook pages from the website.",
            "default": true
          },
          "enrichTechStack": {
            "title": "Detect tech stack",
            "type": "boolean",
            "description": "Detect CMS, e-commerce, analytics, marketing, CRM, chat and hosting technologies from HTML and HTTP headers.",
            "default": true
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Skip domains that were already enriched (and delivered) within the freshness window, so scheduled runs only pay for new or stale leads. State is kept in the named key-value store `b2b-lead-gen-pro-incremental`.",
            "default": false
          },
          "incrementalFreshnessDays": {
            "title": "Incremental freshness (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "In incremental mode, domains enriched within this many days are skipped.",
            "default": 30
          },
          "skipSocialEnrichment": {
            "title": "Skip social enrichment",
            "type": "boolean",
            "description": "Force-disable social link extraction even if 'Extract social links' is on. Social points are then excluded from the lead score.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Enriched leads are POSTed here as JSON batches (`event: leads.enriched`, up to 25 leads each), followed by a final `run.finished` event. Failures are retried and never fail the run."
          },
          "piiSafeMode": {
            "title": "PII-safe mode",
            "type": "boolean",
            "description": "Replace all email addresses and phone numbers with SHA-256 hashes in the output and webhook payloads. Hashes are deterministic, so you can still de-duplicate or match against your own hashed lists.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Off by default — most company sites work without a proxy. Enable Apify Proxy only for large lists or when you hit rate limits. Captcha solving is not required.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}