# B2B Lead Generator & Website Tech Scanner (Maps Enrichment) (`vedarai/b2b-agency-lead-generator`) Actor

Source local businesses from Google Maps and inspect their websites over HTTP to detect missing ad pixels (Facebook, GA4, GTM, TikTok), SEO/CMS gaps (SSL, viewport, outdated WordPress), chat/booking widgets, and contact emails. Priced at $6.00 per 1k leads.

- **URL**: https://apify.com/vedarai/b2b-agency-lead-generator.md
- **Developed by:** [Artūras](https://apify.com/vedarai) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 enriched b2b leads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## B2B Lead Generator & Website Tech Scanner (Maps Enrichment)

This Actor extracts local business listings from Google Maps (or accepts a list of direct business URLs) and inspects each company's website over plain HTTP to detect advertising pixels, CMS/WordPress versions, basic technical SEO tags, live chat widgets, appointment booking tools, and contact email addresses.

It is built for performance marketing agencies, SEO consultants, web development shops, and AI/automation builders who want to segment local business prospects by verifiable technical gaps before launching cold email or cold calling campaigns.

### How the Pipeline Works

1. **Stage 1 — Business Discovery:**
   If `searchQueries` are supplied (for example, `["roofers in Chicago", "med spas in Miami"]`), the Actor invokes `compass/crawler-google-places` via `ApifyClient` with review and image scraping disabled (`maxReviews: 0`, `maxImages: 0`) to keep run times short and platform compute usage minimal. Records without a website URL or pointing to social/directory domains (Facebook, Yelp, YellowPages, etc.) are filtered out, and the remaining businesses are deduplicated by root domain. You can also pass `seedWebsites` directly to skip or supplement Google Maps discovery.

2. **Stage 2 — HTTP Website & Contact Subpage Inspection:**
   Using Crawlee `BasicCrawler`, `got-scraping`, and `cheerio`, the Actor fetches the raw HTML and HTTP headers of each business homepage. No headless browser (Playwright/Puppeteer) is spun up. If the homepage contains no email addresses and `followContactPage` is enabled (the default), the scanner follows one internal `/contact` or `/about` link on the same domain to check for contact details and embedded booking widgets.

3. **Stage 3 — Signal Detection & Outreach Hook Generation:**
   Each website is evaluated across four categories:
   - **Advertising & Analytics Pixels:** Meta/Facebook Pixel (`fbevents.js`, `fbq('init', ...)`), Google Analytics (`G-`, `UA-`, `gtag/js`), Google Tag Manager (`GTM-`), Google Ads conversion tags (`AW-`), TikTok Pixel (`analytics.tiktok.com`), and LinkedIn Insight Tag.
   - **SEO & Web Development Signals:** HTTPS/SSL resolution (`hasSsl`), `<meta name="viewport">` presence (`hasViewportMeta`), `<meta name="description">` presence, CMS platform fingerprinting (`WordPress`, `Shopify`, `Wix`, `Squarespace`, `Webflow`, `GoHighLevel`, or `Custom/Static`), and exposed WordPress version numbers (`isWordpressOutdated` flags versions older than `6.4`).
   - **Automation & Conversion Widgets:** Live chat / AI receptionists (`Intercom`, `Drift`, `Tidio`, `Zendesk`, `Crisp`, `LiveChat`, `HubSpot Chat`, `GoHighLevel / LeadConnector`, `Tawk.to`, `Podium`, `Birdeye`, `Freshchat`) and appointment scheduling systems (`Calendly`, `Acuity Scheduling`, `Mindbody`, `Housecall Pro`, `ServiceTitan`, `Jobber`, `Setmore`, `SimplyBook.me`, `JaneApp`, `Vagaro`, `Square Appointments`, `Zocdoc`).
   - **Contact Extraction:** Harvests `mailto:` links, decodes Cloudflare `data-cfemail` attributes, and runs regex extraction over the document body while filtering out asset filenames (`@2x.png`, `.webp`, `.css`, `.js`) and system/placeholder domains (`sentry.io`, `wixpress.com`, `example.com`).

### Agency Use Cases & Segmentation Filters

Every dataset item includes a `missingSignals` array and a plain-English `pitchHook` string so you can filter exports in Clay, Instantly, Smartlead, or Google Sheets without manual spreadsheet formulas:

- **Paid Media / Meta & TikTok Ad Agencies:** Filter for `hasGoogleTagManager === true` or `reviewsCount >= 25` combined with `missingSignals` containing `NO_FACEBOOK_PIXEL` or `NO_TIKTOK_PIXEL`. These businesses already have customer volume or search tracking but are not retargeting site visitors on social channels.
- **AI Automation & GoHighLevel Agencies:** Filter for `missingSignals` containing `NO_CHAT_WIDGET` and `NO_ONLINE_BOOKING` on high-ticket local service businesses (HVAC, roofing, dental, med spas, legal).
- **Web Design & WordPress Maintenance Shops:** Filter for `missingSignals` containing `OUTDATED_WORDPRESS`, `NO_SSL_HTTPS`, `NO_MOBILE_VIEWPORT`, or `WEBSITE_UNREACHABLE`.

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `searchQueries` | `string[]` | `["roofers in Chicago"]` | Google Maps search queries to run in Stage 1. |
| `maxPlacesPerQuery` | `integer` | `20` | Maximum number of Google Maps listings to pull per query before website filtering. |
| `seedWebsites` | `string[]` | `[]` | Optional list of direct business URLs to scan without running Google Maps discovery. |
| `followContactPage` | `boolean` | `true` | Fetches up to 1 internal `/contact` or `/about` link when the homepage has no visible email address. |
| `onlyMissingSignals` | `boolean` | `false` | When `true`, skips businesses that have no detected gaps. |
| `language` | `string` | `"en"` | Language code passed to the background Google Maps scraper. |
| `mapsActorId` | `string` | `"compass/crawler-google-places"` | Background Apify Actor ID used for Google Maps discovery. |
| `maxConcurrency` | `integer` | `10` | Number of concurrent HTTP website requests. |
| `requestTimeoutSecs` | `integer` | `15` | Per-request HTTP timeout in seconds. |
| `proxyConfiguration` | `object` | `{ "useApifyProxy": true }` | Proxy settings for HTTP requests. |

### Output Example

```json
{
  "businessName": "Apex Roofing Chicago",
  "category": "Roofing contractor",
  "phone": "+1 312-555-0192",
  "website": "https://apexroofingchicago.com/",
  "finalUrl": "https://apexroofingchicago.com/",
  "domain": "apexroofingchicago.com",
  "websiteReachable": true,
  "httpStatus": 200,
  "responseTimeMs": 412,
  "emails": [
    "estimates@apexroofingchicago.com",
    "office@apexroofingchicago.com"
  ],
  "primaryEmail": "estimates@apexroofingchicago.com",
  "rating": 4.7,
  "reviewsCount": 68,
  "address": "1420 W Madison St, Chicago, IL 60607",
  "city": "Chicago",
  "state": "IL",
  "postalCode": "60607",
  "countryCode": "US",
  "cmsPlatform": "WordPress",
  "wordpressVersion": "5.8.2",
  "isWordpressOutdated": true,
  "hasSsl": true,
  "hasViewportMeta": true,
  "hasMetaDescription": true,
  "hasFacebookPixel": false,
  "facebookPixelId": null,
  "hasGoogleAnalytics": true,
  "googleAnalyticsId": "G-8K29LPQ10Z",
  "hasGoogleTagManager": false,
  "googleTagManagerId": null,
  "hasGoogleAdsTag": false,
  "hasTikTokPixel": false,
  "hasLinkedInInsight": false,
  "hasChatWidget": false,
  "chatWidgets": [],
  "hasBookingWidget": true,
  "bookingWidgets": [
    "Calendly"
  ],
  "socialLinks": {
    "facebook": "https://www.facebook.com/apexroofingchicago",
    "instagram": "https://www.instagram.com/apexroofingchicago",
    "linkedin": null,
    "youtube": null,
    "tiktok": null,
    "twitter": null
  },
  "missingSignals": [
    "OUTDATED_WORDPRESS",
    "NO_FACEBOOK_PIXEL",
    "NO_GOOGLE_TAG_MANAGER",
    "NO_TIKTOK_PIXEL",
    "NO_CHAT_WIDGET"
  ],
  "pitchHook": "Noticed Apex Roofing Chicago's website runs an older WordPress release (v5.8.2), has no Meta/Facebook retargeting pixel, has no live chat or AI lead capture widget.",
  "searchQuery": "roofers in Chicago",
  "mapsUrl": "https://www.google.com/maps/place/...",
  "placeId": "ChIJ...",
  "scrapedAt": "2026-11-11T08:15:00.000Z"
}
```

### Technical Constraints & Known Limitations

- **Static HTML vs. Tag Manager Containers:** Because this Actor inspects server-returned HTML over HTTP rather than executing JavaScript in a headless browser, tracking pixels loaded purely inside a Google Tag Manager container (`GTM-XXXX`) at runtime will not appear as individual `<script>` tags in the initial HTML. Always check `hasGoogleTagManager` alongside `hasFacebookPixel` when qualifying paid-media prospects: if `hasGoogleTagManager` is `false` AND `hasFacebookPixel` is `false`, the site definitely lacks a Meta Pixel.
- **Cloudflare / Bot Challenges:** Small local business websites rarely sit behind strict Cloudflare Turnstile gates, but when a domain returns HTTP 403/503 challenge pages over datacenter IPs, residential proxies or retry passes may be required.
- **Stage 1 Compute Costs:** When running `searchQueries` on the Apify platform, Stage 1 triggers an internal run of `compass/crawler-google-places` under your account. Keep `maxPlacesPerQuery` proportional to your batch size, or supply `seedWebsites` directly if you already have a list of domains.

# Actor input Schema

## `searchQueries` (type: `array`):

List of local business search queries to run on Google Maps (e.g. \['roofers in Chicago', 'plumbers in Austin TX', 'cosmetic dentists in Miami']).

## `maxPlacesPerQuery` (type: `integer`):

Maximum number of Google Maps business listings to fetch per search query before filtering for businesses with websites.

## `seedWebsites` (type: `array`):

Optional list of direct business website URLs to scan immediately without waiting for Google Maps discovery (can be used alongside or instead of searchQueries).

## `followContactPage` (type: `boolean`):

If enabled and no email address is found on the homepage, the scanner fetches up to 1 internal /contact or /about link to extract contact emails.

## `onlyMissingSignals` (type: `boolean`):

If enabled, only outputs businesses that are missing at least one core marketing, SEO, or automation signal.

## `language` (type: `string`):

Language code passed to Google Maps discovery (e.g. 'en', 'de', 'es', 'lt').

## `mapsActorId` (type: `string`):

Apify Actor ID used for Stage 1 Google Maps sourcing. Defaults to 'compass/crawler-google-places'.

## `maxConcurrency` (type: `integer`):

Number of concurrent HTTP website inspection requests.

## `requestTimeoutSecs` (type: `integer`):

Timeout in seconds for each HTTP website fetch.

## `proxyConfiguration` (type: `object`):

Optional proxy configuration for scanning business websites.

## Actor input object example

```json
{
  "searchQueries": [
    "roofers in Chicago"
  ],
  "maxPlacesPerQuery": 20,
  "seedWebsites": [],
  "followContactPage": true,
  "onlyMissingSignals": false,
  "language": "en",
  "mapsActorId": "compass/crawler-google-places",
  "maxConcurrency": 10,
  "requestTimeoutSecs": 15,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing business profiles merged with marketing pixels, SEO/CMS flags, chat/booking widgets, emails, and cold outreach pitch hooks.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "roofers in Chicago"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vedarai/b2b-agency-lead-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searchQueries": ["roofers in Chicago"] }

# Run the Actor and wait for it to finish
run = client.actor("vedarai/b2b-agency-lead-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "roofers in Chicago"
  ]
}' |
apify call vedarai/b2b-agency-lead-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vedarai/b2b-agency-lead-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HjFkYUa0KsvSNDhAD/builds/cDdSHbI8BQvQwWyfD/openapi.json
