n8nb2blead-gen

n8n B2B Directory Scraping with Search API

Replace brittle Clutch/G2/Yelp scraping in n8n with Google Maps search API. Structured JSON without proxies or CAPTCHAs.

7 min

n8n B2B directory scraping via search API returns structured business data (name, phone, website, rating, address) without dealing with anti-bot detection, CAPTCHA solving, or HTML parsing. Instead of scraping Clutch, G2, or Yelp directly, query Google Maps for the same businesses and get cleaner data at $0.005 per query.

Why direct directory scraping fails for B2B

B2B directories like Clutch, G2, Capterra, and Yellow Pages actively block automated access. Clutch returns 403 after 10 requests without a residential proxy. G2 requires JavaScript rendering that n8n HTTP Request cannot handle. Capterra uses Cloudflare challenge pages. Even with proxies and Puppeteer, the data extraction breaks monthly as layouts change.

The search API alternative

Google indexes every B2B directory. Searching for a business category + location via SERP API returns the same businesses that directories list, plus Google-verified contact information, reviews, and website links. The data is structured JSON, not HTML to parse.

JavaScript
// n8n Function node: generate B2B search queries
const verticals = [
  "marketing agency",
  "web development company",
  "accounting firm",
  "IT consulting",
  "law firm",
];
const cities = [
  "Chicago IL", "Houston TX", "Phoenix AZ",
  "San Diego CA", "Dallas TX",
];

const queries = [];
for (const vertical of verticals) {
  for (const city of cities) {
    queries.push({
      json: {
        query: vertical + " in " + city,
        vertical: vertical,
        city: city,
      }
    });
  }
}
// 25 queries = 25 credits = $0.125
return queries;

n8n HTTP Request configuration

JSON
{
  "method": "POST",
  "url": "https://api.scavio.dev/api/v1/search",
  "headers": {
    "x-api-key": "={{ $env.SCAVIO_API_KEY }}",
    "Content-Type": "application/json"
  },
  "body": {
    "query": "={{ $json.query }}",
    "search_type": "maps",
    "num_results": 20
  }
}

Processing and deduplication

JavaScript
// n8n Function node: extract and deduplicate B2B leads
const allResults = $input.all();
const seen = new Set();
const leads = [];

for (const item of allResults) {
  const businesses = item.json.local_results || [];
  for (const biz of businesses) {
    const key = (biz.phone || biz.title || "").toLowerCase();
    if (seen.has(key)) continue;
    seen.add(key);

    // Only keep businesses with a website (B2B signal)
    if (!biz.website) continue;

    leads.push({
      json: {
        company: biz.title,
        website: biz.website,
        phone: biz.phone || "",
        address: biz.address || "",
        rating: biz.rating || 0,
        reviews: biz.reviews || 0,
        vertical: item.json.vertical || "",
        city: item.json.city || "",
        maps_url: biz.link || "",
      }
    });
  }
}

return leads;

Enrichment pass: company details

JavaScript
// n8n Function node: prep enrichment queries
// Run only on top-rated leads to control costs
const leads = $input.all()
  .filter(item => item.json.rating >= 4.0)
  .slice(0, 50);

return leads.map(lead => ({
  json: {
    ...lead.json,
    enrichment_query: lead.json.company + " " + lead.json.website + " about team size",
  }
}));
// 50 enrichment queries = 50 credits = $0.25

Cost comparison for 500 B2B leads/month

  • Direct scraping + proxies: $30-50/mo (unreliable, breaks often)
  • Firecrawl: 500 free pages, 3K pages on Hobby plan
  • SerpAPI Maps: $75/mo plan (5K searches)
  • Scavio Maps: 50 queries (20 results each) = 50 credits = $0.25
  • Apollo for contact enrichment: $49+/user/mo (different data, not a replacement)

Output to Google Sheets

The final n8n node appends leads to a Google Sheet with columns for company, website, phone, address, rating, reviews, vertical, and city. Sort by rating descending. Filter by minimum review count. This sheet becomes the sales team's prospecting list.

Key takeaway

Stop scraping B2B directories directly. Google already indexed them. Query Google Maps via search API and get the same data in structured JSON without proxies, CAPTCHAs, or CSS selectors. 25 searches cover 5 verticals across 5 cities with 20 results each -- that is 500 leads for $0.125.