{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook B2b Lead Scraper",
    "description": "Extract targeted business prospects from Facebook using the Facebook B2B Lead Scraper. Collect company pages, descriptions, emails, websites, phone numbers, and follower metrics automatically. Ideal for B2B outreach, lead generation, and market research.",
    "version": "0.3",
    "x-build-id": "dprt0wHvI3hQkTT0g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~facebook-b2b-lead-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-facebook-b2b-lead-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~facebook-b2b-lead-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-facebook-b2b-lead-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~facebook-b2b-lead-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-facebook-b2b-lead-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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "🎯 The words that power your B2B lead search! Add one or more industry/trade keywords (e.g. ['marketing agency', 'consulting firm', 'freight forwarder', 'HVAC contractor']) and the actor finds public Facebook **business Pages** matching them, then 📧 reads the company's own contact email from the Page's public About tab. 💡 Tip: trade and industry terms ('logistics company', 'law firm') beat generic words — they map to how businesses actually name themselves.",
            "items": {
              "type": "string"
            }
          },
          "platform": {
            "title": "🌐 Platform",
            "enum": [
              "Facebook"
            ],
            "type": "string",
            "description": "📱 The social network to mine for leads. Currently locked to Facebook — more platforms coming soon! 🚀",
            "default": "Facebook"
          },
          "location": {
            "title": "📍 Location Filter",
            "type": "string",
            "description": "🗺️ Optional geo-targeting! Add a city, region or country (e.g. 'London' 🇬🇧, 'New York' 🗽, 'Dubai' 🏙️) to narrow leads down to business Pages mentioning that place. ✨ Leave empty to search the whole globe 🌍. ⚠️ A very narrow location can cut your result count sharply.",
            "default": ""
          },
          "emailDomains": {
            "title": "📧 Email Domains Filter",
            "type": "array",
            "description": "🎛️ Keep only leads whose email sits on the domains you list. 🏢 **Left empty by default on purpose**: genuine B2B contacts are overwhelmingly corporate addresses on the company's *own* domain (info@acme.co.uk, sales@acme.com), so pre-filtering to free webmail would throw away almost every real business lead. 🕳️ Empty = collect every domain (recommended for B2B). ✍️ Add entries only when you specifically want them — e.g. 🏢 @yourclient.com, or 📮 @gmail.com · 📨 @outlook.com · 💌 @hotmail.com · 💜 @yahoo.com if you are deliberately after sole traders on free webmail.",
            "items": {
              "type": "string"
            }
          },
          "maxEmails": {
            "title": "📊 Maximum Leads per Keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "🎚️ How many leads to collect per keyword before moving on. ⚡ Higher = more leads but longer runs, since every Page's About tab is fetched individually. Default is 20 ✅ (range 1 – 5,000).",
            "default": 20
          },
          "engine": {
            "title": "⚙️ Engine",
            "enum": [
              "legacy"
            ],
            "type": "string",
            "description": "🔧 The processing engine. Currently 'legacy' 🛡️ — a reliable, battle-tested extraction pipeline. More engines on the roadmap! 🚧",
            "default": "legacy"
          },
          "enrichFromWebsite": {
            "title": "🌍 Enrich from the company website",
            "type": "boolean",
            "description": "🏢 When a Facebook business Page lists a website but no email, also fetch that company's own site (home, /contact, /about) and take the corporate mailbox from there. ✅ Recommended — it is where most of the remaining genuine B2B addresses live. ⏱️ Turn off for faster, Facebook-only runs.",
            "default": true
          },
          "requireBusinessEmail": {
            "title": "🏢 Corporate domains only",
            "type": "boolean",
            "description": "🎯 Drop any lead whose email is on free consumer webmail (Gmail, Outlook, Yahoo, iCloud, …) and keep only addresses on a company's own domain. 💼 Turn on for a strictly corporate list; leave off to also capture sole traders and small firms that run on free webmail.",
            "default": false
          },
          "maxSearchPages": {
            "title": "📄 Search depth",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "🔎 How many search-result pages to walk per keyword while hunting for business Pages. Higher = more companies discovered, at the cost of a longer run. Default 6 ✅ (range 1 – 20).",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy Configuration",
            "type": "object",
            "description": "🌐 Controls the proxy used to fetch Facebook Pages and company websites. 🆓 Leave it as-is and the actor uses the Apify RESIDENTIAL group, which is what makes Facebook serve its logged-out Page markup. 🔎 Google search always runs through the dedicated GOOGLE_SERP group regardless of this setting — that group can only reach Google's own hosts, so it cannot be used for page fetching. 🔄 On any failed or blocked response the actor rotates to a fresh proxy URL and retries. 🧠 Advanced users can plug in their own groups or external URLs here."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}