# Google Maps Lead Scraper & Tech-Gap Analyzer (GA4/Booking AI) (`cautious_canteen_a8q/local-business-lead-tech-gap-analyzer`) Actor

Extracts verified local business leads via Google Places API, scans websites for GA4, GTM, Meta Pixel, and online booking gaps, deduplicates automatically, and generates AI outreach hooks.

- **URL**: https://apify.com/cautious_canteen_a8q/local-business-lead-tech-gap-analyzer.md
- **Developed by:** [Oki ei](https://apify.com/cautious_canteen_a8q) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 analyzed business lead (byok)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Local Business Lead & Tech-Gap Analyzer (AI + GA4/Booking Scanner)

Stop paying for raw, unactionable business directories—and stop chaining 4 different scrapers together just to qualify a single lead.

**Local Business Lead & Tech-Gap Analyzer** extracts verified local business data via the **official Google Places API (New)**, runs a lightweight HTTP scan on each business website to detect **GA4, Google Tag Manager, Meta Pixel, online booking systems, emails, and social links**, automatically removes duplicates across queries/cities, and uses **Gemini 2.5 Flash** to score each lead's digital bottleneck and write a personalized 2-sentence cold outreach hook.

***

### Why Agencies & Automation Builders Choose This Actor

1. **All-in-One Lead Enrichment Pipeline (No Chaining Required)**
   - Combines **Places extraction + Website tech-stack scan + AI sales angle generation** in a single run.
   - Outputs structured JSON/CSV/Excel plus a ready-to-map `locations.geojson` file in the Key-Value Store.
2. **Actionable Tech-Gap & Conversion Signals**
   - Automatically detects whether a prospect's website has:
     - **HTTPS security**
     - **Google Analytics 4 (`gtag` / `G-`)**
     - **Google Tag Manager (`GTM-`)**
     - **Meta Pixel (`fbq`)**
     - **Online Booking Flow** (Calendly, Acuity, Square Appointments, Mindbody, OpenTable, Resy, Vagaro, Booksy, Zocdoc, or direct booking CTAs)
     - **Public Contact Emails & Social Profiles** (Instagram, Facebook, LinkedIn, X)
3. **Zero Duplicate Waste**
   - Automatically deduplicates businesses by `placeId` and normalized website domain across multiple search queries and locations. **You are never charged for duplicate records.**
4. **Transparent Pay-Per-Event Pricing + BYOK Support**
   - No confusing micro-charges for filters, reviews, or extra fields.
   - **BYOK Mode (`lead-analyzed-byok`)**: Bring your own Google Places & Gemini API keys for ultra-low execution pricing.
   - **Managed Mode (`lead-analyzed-managed`)**: Leave API key fields blank and run immediately out of the box.
5. **100% Official & Reliable Architecture**
   - Built on official Google Places API (New) and lightweight `httpx` HTML parsing—no brittle browser scrapers that break on layout updates.

***

### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `searchQueries` | `string[]` | `["Dentist"]` | Business niches or keywords (e.g., `["Roofing contractor", "Med spa"]`). |
| `locations` | `string[]` | `["Austin, TX"]` | Target cities, states, or regions (e.g., `["Austin, TX", "Dallas, TX"]`). |
| `maxResultsPerQuery` | `integer` | `20` | Max leads per query-location pair (`1` to `60`). |
| `includeReviews` | `boolean` | `true` | Include latest 5 reviews for AI reputation & operations analysis. |
| `scanWebsite` | `boolean` | `true` | Scan business websites for GA4, GTM, Meta Pixel, booking tools & emails. |
| `userPlacesApiKey` | `string` (secret) | `""` | Optional BYOK Google Places API (New) key. |
| `userGeminiApiKey` | `string` (secret) | `""` | Optional BYOK Google Gemini API key. |

***

### Sample Output (Dataset Item)

```json
{
  "placeId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
  "businessName": "South Congress Family Dental",
  "searchQuery": "Dentist",
  "searchLocation": "Austin, TX",
  "address": "1402 S Congress Ave, Austin, TX 78704, USA",
  "phone": "(512) 555-0194",
  "website": "https://southcongressdental-example.com",
  "rating": 4.6,
  "reviewCount": 84,
  "extractedEmails": ["frontdesk@southcongressdental-example.com"],
  "socialLinks": {
    "instagram": "https://instagram.com/southcongressdental",
    "facebook": "https://facebook.com/southcongressdental"
  },
  "trackingTags": {
    "hasGA4": false,
    "hasGTM": false,
    "hasMetaPixel": false
  },
  "hasOnlineBooking": false,
  "bottleneckScore": 5,
  "detectedWeaknesses": [
    "No GA4 or GTM analytics tracking detected",
    "No self-serve online booking flow on website",
    "Recent reviews mention phone hold times during lunch hours"
  ],
  "bestAgencyPitchCategory": "Booking Automation",
  "coldOutreachHook": "Noticed South Congress Family Dental has great 4.6-star patient feedback in Austin, though patients currently have to call in rather than book online. Adding a 24/7 self-serve scheduling flow could capture after-hours appointments while reducing front-desk phone load.",
  "pricingMode": "Managed"
}
```

#### Spatial Output (`locations.geojson`)

Every run also saves a valid GeoJSON `FeatureCollection` to the default Key-Value Store under the key `locations.geojson` so you can visualize territory density and high-opportunity (`bottleneckScore`: 4–5) leads directly in QGIS, Kepler.gl, or Mapbox.

***

### Integration with n8n, Make, and AI Agents (MCP)

#### 1. n8n / Make Automation

- Use the official Apify node (Run an Actor and get dataset items) or an HTTP Request node pointing to `run-sync-get-dataset-items`.
- Pass your target niche and city from Google Sheets, Airtable, or a webhook.
- Filter output items where `bottleneckScore >= 4` and route `coldOutreachHook` directly into Instantly, Smartlead, Lemlist, or Gmail drafts.

#### 2. Apify MCP Server (Claude Desktop, Cursor, Custom Agents)

Connect this Actor as a tool via Apify's MCP endpoint (`https://mcp.apify.com`) so your AI agent can autonomously discover local B2B prospects, inspect their marketing tech stack, and draft tailored outreach on demand.

# Actor input Schema

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

List of business categories or keywords to search (e.g., 'Dentist', 'HVAC contractor').

## `locations` (type: `array`):

List of cities, neighborhoods, or regions to search in (e.g., 'Austin, TX').

## `maxResultsPerQuery` (type: `integer`):

Maximum number of unique businesses to extract per search query and location.

## `includeReviews` (type: `boolean`):

Fetch the latest 5 Google reviews to detect operational or service bottlenecks.

## `scanWebsite` (type: `boolean`):

Scan business websites for GA4, GTM, Meta Pixel, online booking flows, emails & social links.

## `userPlacesApiKey` (type: `string`):

Bring Your Own Google Places API key. Leave blank only for sample demo output.

## `userGeminiApiKey` (type: `string`):

Bring Your Own Google Gemini API key for AI bottleneck scoring & cold outreach hook generation.

## `geminiModel` (type: `string`):

Leave blank to automatically use the latest available Gemini Flash model.

## Actor input object example

```json
{
  "searchQueries": [
    "Dentist"
  ],
  "locations": [
    "Austin, TX"
  ],
  "maxResultsPerQuery": 20,
  "includeReviews": true,
  "scanWebsite": true,
  "geminiModel": ""
}
```

# 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": [
        "Dentist"
    ],
    "locations": [
        "Austin, TX"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cautious_canteen_a8q/local-business-lead-tech-gap-analyzer").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": ["Dentist"],
    "locations": ["Austin, TX"],
}

# Run the Actor and wait for it to finish
run = client.actor("cautious_canteen_a8q/local-business-lead-tech-gap-analyzer").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": [
    "Dentist"
  ],
  "locations": [
    "Austin, TX"
  ]
}' |
apify call cautious_canteen_a8q/local-business-lead-tech-gap-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cautious_canteen_a8q/local-business-lead-tech-gap-analyzer"
        }
    }
}
```

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/yb3MkFG2Sxf4cSpGS/builds/BFfZWYkMz1a2tvveM/openapi.json
