{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Lead Qualifier - Score & Rank Company Leads",
    "description": "Score and rank B2B leads 0-100 by crawling company websites. Evaluates 30+ signals across contact reachability, business legitimacy, online presence, website quality, and team transparency. Letter grades A-F. No API keys needed.",
    "version": "1.1",
    "x-build-id": "5iYXzOBGfPRCUlQj5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~b2b-lead-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-b2b-lead-qualifier",
        "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-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-b2b-lead-qualifier",
        "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-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-b2b-lead-qualifier",
        "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": {
          "domains": {
            "title": "Company Domains",
            "maxItems": 500,
            "type": "array",
            "description": "List of company domains to analyze and score (e.g., stripe.com, acme-plumbing.com). One scored result per domain. Leave empty if you're using business names or footer phrases instead.",
            "items": {
              "type": "string"
            }
          },
          "knownNames": {
            "title": "Business names (instead of domains)",
            "type": "array",
            "description": "Optional. Paste a list of business names and the actor resolves each one to its website via Google before qualifying. Leave domains 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', 'sell your land fast for cash'). 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 qualify",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on how many newly-discovered domains are sent through lead qualification. Controls run cost.",
            "default": 1000
          },
          "pipelineData": {
            "title": "Pipeline Data (optional)",
            "maxItems": 500,
            "type": "array",
            "description": "Pre-scraped data from Website Contact Scraper and/or Email Pattern Finder. Format: [{\"domain\": \"stripe.com\", \"emails\": [...], \"contacts\": [...]}]",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string",
                  "title": "Domain",
                  "description": "Company domain"
                },
                "emails": {
                  "type": "array",
                  "title": "Emails",
                  "description": "Known emails"
                },
                "phones": {
                  "type": "array",
                  "title": "Phones",
                  "description": "Known phones"
                },
                "contacts": {
                  "type": "array",
                  "title": "Contacts",
                  "description": "Known contacts with name/title"
                },
                "socialLinks": {
                  "type": "object",
                  "title": "Social links",
                  "description": "Social media URLs"
                }
              },
              "required": [
                "domain"
              ]
            }
          },
          "maxPagesPerDomain": {
            "title": "Max pages per domain",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum pages to crawl per website for signal extraction.",
            "default": 5
          },
          "minScore": {
            "title": "Minimum score to include",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only output leads scoring at or above this threshold (0-100). Set to 0 to include all.",
            "default": 0
          },
          "scoringProfile": {
            "title": "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.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies for website scraping."
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "minimal",
              "standard",
              "llm",
              "full"
            ],
            "type": "string",
            "description": "Controls how much data each result record contains. 'minimal' = decision-only fields (best for downstream automation). 'standard' = decision + signals (default-equivalent). 'llm' = LLM-friendly subset with summary + explanation. 'full' = every field (default).",
            "default": "full"
          },
          "watchlistName": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Name this run as a separate watchlist. Score history is stored per-watchlist, so you can run the same actor as N independent watchlists (e.g. 'tier-1-prospects', 'churn-risk-accounts'). Leave blank to share the default history.",
            "default": ""
          },
          "webhookUrl": {
            "title": "Webhook URL (Slack or Discord)",
            "type": "string",
            "description": "Optional. Slack or Discord incoming webhook URL. On run completion, posts a rich embed with the top scored leads + a link to the Apify run. Leave blank to disable.",
            "default": ""
          },
          "circuitBreakerThreshold": {
            "title": "Circuit breaker threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Abort the run if this many consecutive domains fail to fetch (e.g. proxy outage, network issue). 0 disables the breaker. Recommended: 5-10 for large batches.",
            "default": 0
          },
          "includeAgentContract": {
            "title": "Include agentContract in output",
            "type": "boolean",
            "description": "Add a top-level agentContract { decision, confidence, nextAction, costToAct } to every record so MCP and AI-agent consumers don't have to traverse the full result.",
            "default": true
          },
          "enableProFallback": {
            "title": "Auto-retry JavaScript / blocked sites with Pro",
            "type": "boolean",
            "description": "Off by default. Enable when qualifying JavaScript SPAs, Cloudflare-protected sites, or DataDome-protected sites where Cheerio extraction returns nothing.",
            "default": false
          },
          "crmWebhookUrl": {
            "title": "CRM webhook URL (HubSpot / Salesforce / Make / Zapier)",
            "type": "string",
            "description": "HTTPS endpoint to receive lead payloads. Each scored domain triggers one POST. Failures retry 2× with backoff; 5 consecutive failures disable pushing for the rest of the run. Distinct from `webhookUrl` (which is a Slack/Discord run-completion summary)."
          },
          "crmFormat": {
            "title": "CRM payload format",
            "enum": [
              "generic-json",
              "hubspot",
              "salesforce"
            ],
            "type": "string",
            "description": "Pick a payload shape that matches your CRM. HubSpot pushes as Company record. Salesforce pushes as Lead record. Generic JSON sends the full scored record (use this for Make.com / Zapier / n8n).",
            "default": "generic-json"
          },
          "crmOnlyTierA": {
            "title": "Only push outreach-immediately leads to CRM",
            "type": "boolean",
            "description": "When enabled, only push records where recommendedAction is `outreach-immediately` (Tier-A). Recommended for outbound sales — keeps your CRM clean of leads still in nurture / enrichment / review."
          },
          "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": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}