{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn B2B Emails Scraper: Headcount Range Details",
    "description": "LinkedIn B2B Emails Scraper extracts public LinkedIn profile data and discovers available business email addresses and contact details. Collect names, job titles, companies, profile URLs, emails, phone numbers, and more for B2B lead generation, sales prospecting, and CRM enrichment.",
    "version": "0.1",
    "x-build-id": "ZeNWQewTUzmn5uM7Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~linkedin-b2b-emails-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-linkedin-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/scrapier~linkedin-b2b-emails-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-linkedin-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/scrapier~linkedin-b2b-emails-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-linkedin-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",
        "properties": {
          "companyUrls": {
            "title": "🏢 Company URLs (primary)",
            "type": "array",
            "description": "🔗 One or many LinkedIn company URLs/slugs (e.g. https://www.linkedin.com/company/google or just 'google'). ⭐ Supersedes 🔍 Keywords for employee discovery — each is crawled for real employee profiles. 🔁 Also accepts a 'companies' key. 🧩 If empty, 🔍 Keywords below are used as company-name search terms instead.",
            "items": {
              "type": "string"
            }
          },
          "legacyFallbackKeywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "🔎 Fallback company-name / search terms used only when 🏢 Company URLs is empty (👤 directory discovery via Google) or when 🎯 Directory Mode is set to legacy b2b/personal (LinkedIn via Google). ✨ Add one or many.",
            "items": {
              "type": "string"
            }
          },
          "directoryMode": {
            "title": "🎯 Directory Mode",
            "enum": [
              "employees",
              "b2b",
              "personal"
            ],
            "type": "string",
            "description": "👥 employees = real company-page discovery + profile enrichment (NEW, default) | 🏢 b2b = legacy corporate email patterns | 👤 personal = legacy Gmail/Outlook discovery. 🔁 Accepts the legacy 'mode' field as a fallback."
          },
          "maxEmployees": {
            "title": "👥 Max Employees Per Target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "🎯 Cap on employee profiles discovered + enriched per company/keyword target (👥 Employees mode). ⭐ Supersedes 🧩 Pattern Result Cap (legacy 'maxEmailsPerPattern') — accepts that legacy field as a fallback when this one is left empty."
          },
          "emailDomainFilter": {
            "title": "📬 Email Domain Filter",
            "type": "array",
            "description": "👤 Legacy personal mode only: filter results to these domains (e.g. @gmail.com, @outlook.com). ⏭️ Ignored in 👥 Employees and 🏢 B2B modes. 🔁 Accepts the legacy 'customDomains' field as a fallback.",
            "items": {
              "type": "string"
            }
          },
          "searchPatterns": {
            "title": "🔎 B2B Search Patterns (legacy)",
            "type": "array",
            "description": "🏢 Legacy b2b mode only: 📂 empty list runs all patterns; or name specific keys from b2b_patterns.py (e.g. email_for_bookings, bio_email_basic). Ignored in 👥 Employees mode. 🔁 Accepts the legacy 'patterns' field as a fallback.",
            "items": {
              "type": "string"
            }
          },
          "sourceNetwork": {
            "title": "🌐 Source Network",
            "enum": [
              "LinkedIn.com"
            ],
            "type": "string",
            "description": "📱 Target platform for legacy 🏢 b2b/👤 personal email search (locked to LinkedIn). Not used in 👥 Employees mode. 🔁 Accepts the legacy 'platform' field as a fallback."
          },
          "locationFilter": {
            "title": "📍 Location Filter",
            "type": "string",
            "description": "🗺️ Geographic filter added to legacy 🏢 b2b/👤 personal search queries (e.g. London, New York). 🌍 Leave empty for global results. Not used in 👥 Employees mode (profile location is extracted directly). 🔁 Accepts the legacy 'location' field as a fallback."
          },
          "maxResults": {
            "title": "📊 Maximum Total Results (legacy)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "🎯 Legacy 🏢 b2b/👤 personal modes only: maximum number of emails to collect across all keywords and patterns. 🔁 Accepts the legacy 'maxEmails' field as a fallback."
          },
          "patternResultCap": {
            "title": "🧩 Pattern Result Cap (legacy)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "📈 Legacy 🏢 b2b mode only: cap emails collected per B2B search pattern. 🔁 Accepts the legacy 'maxEmailsPerPattern' field as a fallback. Also used as the fallback value for 👥 Max Employees Per Target when that field is left empty."
          },
          "proxyEnabled": {
            "title": "🛡️ Enable Proxy",
            "type": "boolean",
            "description": "✅ Enable proxy for all requests — company pages, profile pages and Google Search. ⭐ Recommended: on for best results. When off, all requests go direct. 🔁 Accepts the legacy 'useProxy' field as a fallback."
          },
          "proxyConfiguration": {
            "title": "⚙️ Advanced Proxy Settings",
            "type": "object",
            "description": "🔧 Optional proxy override when 🛡️ Enable Proxy is on. 🏠 Residential recommended for 👥 Employees mode (company/profile pages); GOOGLE_SERP used automatically for legacy search modes. 🎯 Leave as default for best performance."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}