{
  "openapi": "3.0.1",
  "info": {
    "title": "▶️ YouTube B2B Email and B2B Lead Finder",
    "description": "YouTube B2B Email & Lead Finder: Find publicly available business emails and B2B leads from YouTube channels and videos. Extract channel names, creators, websites, social links, locations, contact details, and URLs to build targeted lead lists for prospecting and outreach.",
    "version": "1.0",
    "x-build-id": "tnddKucMxkqoP9cMz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~youtube-b2b-emails-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-youtube-b2b-emails-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/scraper-engine~youtube-b2b-emails-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-youtube-b2b-emails-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/scraper-engine~youtube-b2b-emails-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-youtube-b2b-emails-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",
        "required": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "🔎 Search terms for YouTube via Google (e.g. tech reviewer, beauty influencer, travel vlogger). ✨ Add one or many.",
            "items": {
              "type": "string"
            }
          },
          "emailType": {
            "title": "🎯 Extraction Mode",
            "enum": [
              "b2b",
              "personal"
            ],
            "type": "string",
            "description": "👤 personal = Gmail/Outlook/webmail discovery | 🏢 b2b = corporate email patterns",
            "default": "b2b"
          },
          "targetPlatform": {
            "title": "🌐 Platform",
            "enum": [
              "YouTube.com"
            ],
            "type": "string",
            "description": "📱 Target platform for email discovery (locked to YouTube).",
            "default": "YouTube.com"
          },
          "locationFilter": {
            "title": "📍 Location",
            "type": "string",
            "description": "🗺️ Geographic filter added to search queries (e.g. London, New York). 🌍 Leave empty for global results.",
            "default": ""
          },
          "maxLeads": {
            "title": "📊 Maximum Total Leads",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "🎯 Maximum number of leads to collect across all search terms and patterns combined (after quality filtering). ⚡ Higher = more leads but longer runs.",
            "default": 10
          },
          "maxLeadsPerPattern": {
            "title": "🧩 Max Leads Per B2B Pattern",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "📈 Cap leads collected per individual B2B search pattern before moving to the next one (🏢 B2B mode only).",
            "default": 15
          },
          "minPatternTier": {
            "title": "🏆 Minimum pattern tier (B2B mode)",
            "enum": [
              "top",
              "high",
              "medium-high",
              "medium",
              "solid"
            ],
            "type": "string",
            "description": "🎚️ Only run B2B search patterns at this quality tier or better. Skipping lower tiers entirely saves run time/cost instead of just filtering results after the fact. Leave unset to run all 29 patterns."
          },
          "minConfidenceScore": {
            "title": "✅ Minimum confidence score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "🧮 Drop leads whose computed confidence score (0-100, based on pattern quality, result type, channel-metadata completeness, and domain validity) falls below this. Leave empty to keep everything."
          },
          "minSubscriberCount": {
            "title": "👥 Minimum subscriber count",
            "minimum": 0,
            "type": "integer",
            "description": "🎯 Only keep leads whose subscriber count (when stated in the result) is at least this. A lead with no subscriber figure recovered is always kept — this only filters leads with a KNOWN, too-small count. Leave empty for no minimum."
          },
          "verifyEmailDomains": {
            "title": "🔬 Verify email domains (MX lookup)",
            "type": "boolean",
            "description": "🌐 Look up each discovered domain's mail (MX) records once per run (cached per domain) and report whether it can plausibly receive mail. Adds a small amount of run time; strongly improves lead quality signal.",
            "default": true
          },
          "enableProxy": {
            "title": "🛡️ Use Apify Proxy",
            "type": "boolean",
            "description": "✅ Enable proxy for Google Search requests. ⭐ Recommended: on for best results.",
            "default": true
          },
          "proxySettings": {
            "title": "⚙️ Advanced Proxy Settings",
            "type": "object",
            "description": "🔧 Optional proxy override when 🛡️ Use Apify Proxy is enabled. 🎯 Leave as default for best performance.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}