{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Lead Generation Suite - Find Emails, Score & Qualify Leads",
    "description": "All-in-one B2B lead pipeline. Enter company URLs, get enriched leads with emails, phone numbers, contacts, email patterns, quality scores (0-100), grades, and business signals from a 3-step automated pipeline.",
    "version": "1.2",
    "x-build-id": "pemtgsOLtI53vgmz9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~b2b-lead-gen-suite/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-b2b-lead-gen-suite",
        "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/ryanclinton~b2b-lead-gen-suite/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-b2b-lead-gen-suite",
        "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/ryanclinton~b2b-lead-gen-suite/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-b2b-lead-gen-suite",
        "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": {
          "urls": {
            "title": "Website URLs or Domains",
            "type": "array",
            "description": "List of company websites or bare domains to process (e.g., https://stripe.com or buffer.com). One result per domain. Leave empty if you're using business names or footer phrases instead.",
            "items": {
              "type": "string"
            }
          },
          "knownNames": {
            "title": "Business names (instead of URLs)",
            "type": "array",
            "description": "Optional. Paste a list of business names and the suite resolves each one to its website via Google before running the pipeline. Leave URLs empty if you only have names. Combine with name suffix below to disambiguate (e.g. 'we buy land', 'real estate', 'plumber').",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "footerPhrases": {
            "title": "Footer / marketing phrases",
            "type": "array",
            "description": "Optional. Distinctive phrases that identify a niche (e.g. 'we buy land in any state'). Each phrase is run as an exact-match Google query and every organic result is collected.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "nameSuffix": {
            "title": "Name search suffix (optional)",
            "type": "string",
            "description": "Appended to every business-name query to disambiguate (e.g. 'we buy land', 'real estate', 'plumber'). Leave blank to search names verbatim.",
            "default": ""
          },
          "discoveryCountry": {
            "title": "Discovery country (for names/phrases)",
            "enum": [
              "US",
              "UK",
              "CA",
              "AU",
              "EU"
            ],
            "type": "string",
            "description": "Used for both Google country code and TLD filtering when resolving names/phrases. Domains that don't match the country's TLDs are dropped.",
            "default": "US"
          },
          "maxResultsPerQuery": {
            "title": "Max results per discovery query",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "How many organic Google results to collect per phrase query.",
            "default": 50
          },
          "maxDiscoveredDomains": {
            "title": "Max discovered domains to process",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on how many newly-discovered domains are sent through the pipeline. Controls run cost.",
            "default": 1000
          },
          "skipAmbiguousResolutions": {
            "title": "Skip ambiguous name resolutions (discovery)",
            "type": "boolean",
            "description": "When resolving business names, drop results the resolver flags as ambiguous (a generic name whose top Google hit is likely the wrong company) before scraping. Off by default. Turn on for cold outreach to avoid enriching wrong-company domains; leave off for broad discovery. Every lead also carries a resolverConfidence field so you can filter downstream instead.",
            "default": false
          },
          "maxPagesPerDomain": {
            "title": "Max pages per domain (contact scraping)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum pages to crawl per website during the contact scraping step. Higher values find more contacts but cost more.",
            "default": 5
          },
          "maxQualifierPagesPerDomain": {
            "title": "Max pages per domain (lead qualification)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum pages to crawl per website during the lead qualification step.",
            "default": 5
          },
          "minScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only include leads scoring at or above this threshold (0-100). Set to 0 to include all.",
            "default": 0
          },
          "skipEmailPatternFinder": {
            "title": "Skip email pattern detection",
            "type": "boolean",
            "description": "Skip the Email Pattern Finder step. Faster and cheaper, but you won't get email pattern analysis or generated emails for team contacts.",
            "default": false
          },
          "skipLeadQualifier": {
            "title": "Skip lead qualification",
            "type": "boolean",
            "description": "Skip the B2B Lead Qualifier step. Faster and cheaper, but you won't get lead scores, grades, or business signals.",
            "default": false
          },
          "verifyEmails": {
            "title": "Verify discovered + generated emails",
            "type": "boolean",
            "description": "Enable Step 4 — runs every discovered AND pattern-generated email through the Bulk Email Verifier (Outbound Control System) in mode='enrichment-validation'. Adds a per-email status, confidence, decision (send / send-monitor / hold / replace / suppress), recommendedAction, and failureCategory to every lead. Default off — turn on for outbound-ready output. Sub-actor compute is billed against this run; no extra event-price charge per lead.",
            "default": false
          },
          "goal": {
            "title": "Run goal — what is this run optimizing for?",
            "enum": [
              "quick-outreach",
              "high-deliverability",
              "max-coverage"
            ],
            "type": "string",
            "description": "Plain-English run goal. Sets sensible defaults at every step: quick-outreach = fast, less safe. high-deliverability = thorough, verifies everything, raises send-decision threshold. max-coverage = all sources, all candidates."
          },
          "preset": {
            "title": "Step 1 preset (execution depth)",
            "enum": [
              "auto",
              "fast",
              "balanced",
              "maximum"
            ],
            "type": "string",
            "description": "How deep Step 1 scrapes. Configures verification, email fill, deep scan, and Pro browser fallback automatically. Pick `auto` if you don't want to think about settings."
          },
          "confidenceMode": {
            "title": "Step 1 confidence mode (risk appetite)",
            "enum": [
              "safe",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "description": "How conservative or aggressive Step 1 should be about which emails ship. Use `safe` for cold-outreach lists; `aggressive` for low-stakes prospecting (includes pattern-generated emails)."
          },
          "deepScan": {
            "title": "Step 1 deep scan",
            "type": "boolean",
            "description": "Probe common hidden pages (/imprint, /impressum, /privacy-policy, /legal, /support) that often contain emails not listed on the main contact page. Increases pages crawled per domain."
          },
          "enableProFallback": {
            "title": "Step 1 Pro fallback for JavaScript sites",
            "type": "boolean",
            "description": "When a JavaScript-heavy site is detected (React, Angular, Vue, Next.js) and no contacts are found, Step 1 auto-retries through Website Contact Scraper Pro (real-browser rendering). Costs $0.35 per site that gets re-run. Only triggered when JS is detected AND no contacts were found on the first pass."
          },
          "requirePersonalEmail": {
            "title": "Require personal email (Step 1 filter)",
            "type": "boolean",
            "description": "Only include domains where Step 1 found at least one personal email (not info@, hello@, etc.). Filtered domains are excluded from the dataset AND from PPE billing."
          },
          "autoFilter": {
            "title": "Auto-filter (one-click output filter)",
            "enum": [
              "none",
              "send-now-only",
              "safe-only",
              "max-leads"
            ],
            "type": "string",
            "description": "Plain-English output filter mapped to send-decision action. Forwards to Step 1 and Step 2 — `max-leads` is normalized to `max-coverage` for Step 2. `send-now-only` = only ready-to-email leads. `safe-only` = ready-to-email leads with low risk only. `max-leads` = everything except SKIP. `none` = no filter (default)."
          },
          "companyTypes": {
            "title": "Filter by company type",
            "type": "array",
            "description": "Only include domains classified as these company types. Leave empty to include all. Available: saas, agency, consulting, legal, accounting, ecommerce, healthcare, real_estate, financial_services, manufacturing, education, nonprofit, construction, hospitality, media, recruitment, logistics, technology.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "compareToPrevRun": {
            "title": "Compare to previous run (monitoring mode)",
            "type": "boolean",
            "description": "When enabled, every lead gets contact-side changeFlags[] + changeSinceLastRun (Step 1), and pattern-side changeSinceLastRun + driftState + patternStabilityScore (Step 2). First run establishes the baseline; subsequent runs compute deltas. Pair with Apify Schedules for daily/weekly monitoring."
          },
          "monitorStateKey": {
            "title": "Monitor state key (optional)",
            "type": "string",
            "description": "Optional name for the key-value store(s) that hold your monitoring baselines. Use the same key across scheduled runs to maintain history. Auto-derived from input domains when blank. Forwards to Step 1 and Step 2 (each maintains its own snapshot).",
            "default": ""
          },
          "crmWebhookUrl": {
            "title": "CRM webhook URL (HubSpot / Salesforce / Make / Zapier)",
            "type": "string",
            "description": "HTTPS endpoint to receive lead payloads. Each enriched domain triggers one POST. Failures retry 2× with backoff; 5 consecutive failures disable pushing for the rest of the run."
          },
          "crmFormat": {
            "title": "CRM payload format",
            "enum": [
              "generic-json",
              "hubspot",
              "salesforce"
            ],
            "type": "string",
            "description": "Pick a payload shape that matches your CRM. Generic JSON sends the full domain record (use this for Make.com / Zapier / n8n).",
            "default": "generic-json"
          },
          "crmOnlyTierA": {
            "title": "Only push Tier-A leads to CRM",
            "type": "boolean",
            "description": "When enabled, only domains with Step 1 decision tier 'A' (verified personal email + senior contact) are pushed to the webhook. Recommended for outbound sales — keeps your CRM clean of low-quality leads."
          },
          "searchWhois": {
            "title": "Step 2 — search WHOIS / RDAP for registrant emails",
            "type": "boolean",
            "description": "Look up domain registration data for registrant email addresses. Works best for smaller companies where the owner's email is in the WHOIS record. Off by default."
          },
          "hunterApiKey": {
            "title": "Hunter.io API key (optional)",
            "type": "string",
            "description": "Your Hunter.io API key for additional Step 2 email discovery. Free tier gives 25 searches/month. Get a key at https://hunter.io/api-keys"
          },
          "scoringProfile": {
            "title": "Step 3 scoring profile",
            "enum": [
              "default",
              "sales",
              "marketing",
              "recruiting"
            ],
            "type": "string",
            "description": "Adjusts category weights for different use cases. Sales: emphasizes contact reachability + decision makers. Marketing: emphasizes online presence + website quality. Recruiting: emphasizes team transparency + contact info."
          },
          "watchlistName": {
            "title": "Step 3 watchlist name (optional)",
            "type": "string",
            "description": "Name this run as a separate Step 3 watchlist. Score history is stored per-watchlist, so you can run the suite as N independent watchlists (e.g. 'tier-1-prospects', 'churn-risk-accounts'). Leave blank to share the default qualifier history.",
            "default": ""
          },
          "qualifierWebhookUrl": {
            "title": "Step 3 Slack/Discord webhook URL (optional)",
            "type": "string",
            "description": "Optional Slack or Discord incoming webhook URL. On run completion, Step 3 posts a rich embed with the top scored leads + a link to the Apify run. Distinct from Step 1's `crmWebhookUrl` — that's per-record CRM auto-push; this is a one-time run summary."
          },
          "qualifierCircuitBreakerThreshold": {
            "title": "Step 3 circuit breaker threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Abort the Step 3 sub-actor if this many consecutive domains fail to fetch (e.g. proxy outage). 0 disables the breaker. Recommended: 5-10 for large batches.",
            "default": 0
          },
          "exportFormats": {
            "title": "Outreach-tool CSV exports",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick one or more outreach-tool CSV formats to generate. Leave empty to skip CSV generation.",
            "items": {
              "type": "string",
              "enum": [
                "instantly",
                "smartlead",
                "apollo"
              ],
              "enumTitles": [
                "Instantly.ai CSV",
                "Smartlead CSV",
                "Apollo CSV"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings passed to all pipeline steps. Recommended for scraping many sites."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}