ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build an SMB Outreach Pipeline from Google Maps to Email
Tutorial

How to Build an SMB Outreach Pipeline from Google Maps to Email

Build a small business outreach pipeline from Google Maps search to validated email outreach. Find businesses, verify websites, compose emails.

Get Free API KeyAPI Docs

An r/coldemail thread asked about reaching small businesses at scale. The pipeline: search Google Maps for businesses by category and location, check if they have websites, and compose personalized outreach. This tutorial builds the data collection and email composition steps.

Prerequisites

  • Scavio API key
  • Python 3.8+
  • SMTP credentials for sending
  • Optional: email verification service

Walkthrough

Step 1: Search for businesses by category and location

Use Google Maps via Scavio to find businesses.

Python
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}

def find_smbs(category, city, state):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=H,
        json={'platform': 'google', 'query': f'{category} in {city} {state}',
              'type': 'maps'}).json()
    businesses = []
    for b in data.get('local_results', []):
        businesses.append({
            'name': b.get('title'),
            'address': b.get('address'),
            'phone': b.get('phone'),
            'website': b.get('website'),
            'rating': b.get('rating'),
            'reviews': b.get('reviews', 0),
        })
    return businesses

Step 2: Find contact emails from websites

Extract email from the business website using Scavio extract endpoint.

Python
def find_email(website):
    if not website:
        return None
    try:
        data = requests.post('https://api.scavio.dev/api/v1/extract',
            headers=H,
            json={'url': website}).json()
        text = data.get('text', '')
        # Simple email extraction
        import re
        emails = re.findall(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}', text)
        # Filter out generic emails
        generic = ['noreply', 'no-reply', 'support', 'info']
        personal = [e for e in emails if not any(g in e.lower() for g in generic)]
        return personal[0] if personal else (emails[0] if emails else None)
    except:
        return None

Step 3: Compose personalized outreach emails

Generate emails that reference specific business details.

Python
def compose_email(business, your_service):
    name = business['name']
    rating = business.get('rating', '')
    reviews = business.get('reviews', 0)
    subject = f'Quick question for {name}'
    body = (f'Hi,\n\n'
            f'I found {name} on Google Maps'
            f'{f" -- {rating} stars with {reviews} reviews, nice work" if rating else ""}.\n\n'
            f'I help businesses like yours with {your_service}. '
            f'Would it be worth a 5-minute conversation this week?\n\n'
            f'Best regards')
    return {'subject': subject, 'body': body, 'to': business.get('email')}

Step 4: Export as CSV for import into outreach tool

Instantly ($30/mo) or Smartlead ($39/mo) can import the CSV for sequenced sending.

Python
import csv

def export_outreach(businesses, service, filename='outreach.csv'):
    with open(filename, 'w', newline='') as f:
        writer = csv.DictWriter(f, fieldnames=['name', 'email', 'subject', 'body', 'phone', 'website'])
        writer.writeheader()
        for b in businesses:
            if b.get('email'):
                email = compose_email(b, service)
                writer.writerow({'name': b['name'], 'email': b['email'],
                    'subject': email['subject'], 'body': email['body'],
                    'phone': b.get('phone', ''), 'website': b.get('website', '')})
    print(f'Exported {filename}')

Python Example

Python
import os, requests, re
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}

def smb_pipeline(category, city):
    maps = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
        json={'platform': 'google', 'query': f'{category} in {city}', 'type': 'maps'}).json()
    for biz in maps.get('local_results', []):
        if biz.get('website'):
            page = requests.post('https://api.scavio.dev/api/v1/extract', headers=H,
                json={'url': biz['website']}).json()
            emails = re.findall(r'[\w.+-]+@[\w-]+\.[\w.]+', page.get('text', ''))
            if emails: print(f"{biz['title']}: {emails[0]}")

JavaScript Example

JavaScript
const maps = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'},
  body: JSON.stringify({platform: 'google', query: `dentist in ${city}`, type: 'maps'})
}).then(r => r.json());

Expected Output

JSON
CSV of SMB leads with business name, email, phone, and personalized outreach email. Maps search + website extraction per lead. Compatible with Instantly or Smartlead for sequenced sending.

Related Tutorials

  • How to Build a Google Maps to WhatsApp Lead Pipeline
  • How to Build a Complete Google Maps to WhatsApp Outreach Pipeline

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Scavio API key. Python 3.8+. SMTP credentials for sending. Optional: email verification service. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Google Maps API for Lead Extraction in 2026

Read more
Best Of

Best Google Maps Business Data APIs (May 2026)

Read more
Workflow

Google Maps Cold Email Lead Pipeline

Read more
Solution

Enrich Cold Email Campaigns with Google Maps Business Data

Read more
Use Case

Google Maps Local Lead Gen

Read more
Use Case

Google Maps Local Agency Lead Gen

Read more

Start Building

Build a small business outreach pipeline from Google Maps search to validated email outreach. Find businesses, verify websites, compose emails.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy