Build a Self-Qualifying B2B Lead Engine
Краткое содержание
Pixel shares a single-pass B2B lead-generation pipeline built with Google Places API, lightweight website scans, and Gemini Flash. It deduplicates businesses, checks for analytics pixels and booking tools, and scores leads—helping streamline outreach while reducing duplicate records and scraper costs.
DEV Community
How I Built a Self-Qualifying B2B Lead Engine with Google Places API, Lightweight Tag Scanning, and Gemini Flash
If you have ever built a local B2B lead-generation workflow in n8n, Make, or Python, you probably know the exact pain of "scraper chaining": Run a Google Maps scraper to get business names and websites. Pipe those URLs into a second tool to extract emails and social links. Run a third check to see if the business actually needs your service (e.g., missing GA4, no Meta Pixel, no online booking widget). Send everything to an LLM to write a non-generic cold email opener. Realize you paid three times for duplicate franchise locations across neighboring zip codes. To eliminate that friction, I designed a single-pass, API-first pipeline—packaged as an Apify Actor (Local Business Lead & Tech-Gap Analyzer)—that handles extraction, deduplication, tech-stack auditing, and structured AI scoring in one step. 1. Official Data First (No Brittle Headless Browsers) Instead of spinning up heavy Playwright/Puppeteer instances that break every time a DOM class changes, Step 1 queries the Google Places API (New) (places:searchText) using strict X-Goog-FieldMask headers so only required fields are fetched. Before doing any downstream processing or billing, records pass through a two-key deduplication gate (placeId + normalized root domain). If "Austin, TX" and "Round Rock, TX" return the same clinic, the duplicate is dropped immediately. 2. Fast, Async Website Tech-Gap Scanning (httpx + BeautifulSoup) Using httpx.AsyncClient with a strict 6-second timeout and 350 KB HTML cap, a lightweight scanner inspects each business homepage for concrete conversion and analytics signals: Analytics & Ad Pixels: Checks for gtag( / G- (GA4), googletagmanager.com/gtm.js (GTM), and fbq( (Meta Pixel). Online Booking Friction: Detects Calendly, Acuity, Square Appointments, Mindbody, OpenTable, Resy, Zocdoc, and direct /book CTAs. Contact & Social Surface: Extracts clean public email addresses and social profiles. 3. Structured Bottleneck Scoring with Gemini Flash The combined business profile, recent reviews, and website tech-scan JSON are passed to Gemini Flash using Pydantic-enforced response_schema JSON output to generate a 1–5 bottleneck score, concrete weaknesses, and a tailored 2-sentence cold outreach hook. Try It Out 👉 Local Business Lead & Tech-Gap Analyzer on Apify Store

Powered by Readybot.io