ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何构建 Google 地图冷电子邮件管道
教程

如何构建 Google 地图冷电子邮件管道

使用 SERP 结果中的 Google 地图数据构建潜在客户开发渠道。查找本地企业、提取联系人并个性化冷电子邮件。

获取免费API密钥API文档

Google 地图列表包含丰富的商业数据:名称、地址、电话、网站、营业时间、评分和评论。本教程不是直接抓取 Google 地图(这违反了服务条款并不断中断),而是从 SERP 结果中提取地图数据。搜索业务类别和位置,SERP 将返回本地包结果,其中包含冷电子邮件外展所需的所有数据。每次搜索费用为 0.005 美元。

前置条件

  • 已安装 Python 3.9+
  • 请求已安装库
  • 来自 scavio.dev 的 Scavio API 密钥

操作指南

步骤 1: 通过 SERP 搜索本地企业

搜索业务类别和位置。 SERP 结果包括有机列表和带有业务详细信息的本地包数据。

Python
import requests, os, re

SCAVIO_KEY = os.environ['SCAVIO_API_KEY']

def find_local_businesses(category: str, city: str, count: int = 10) -> list:
    query = f'{category} near {city}'
    resp = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'},
        json={'query': query, 'country_code': 'us', 'num_results': count})
    resp.raise_for_status()
    data = resp.json()
    businesses = []
    # Extract from organic results
    for r in data.get('organic_results', []):
        domain = r['link'].split('/')[2] if '/' in r['link'] else ''
        # Skip aggregator sites
        if any(a in domain for a in ['yelp.com', 'yellowpages.com', 'angi.com', 'thumbtack.com']):
            continue
        phones = re.findall(r'\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}', r.get('snippet', ''))
        businesses.append({
            'name': r['title'].split(' - ')[0].split(' | ')[0].strip(),
            'website': r['link'],
            'domain': domain,
            'phone': phones[0] if phones else '',
            'snippet': r.get('snippet', ''),
            'category': category,
            'city': city
        })
    return businesses

leads = find_local_businesses('dentist', 'Austin TX')
print(f'Found {len(leads)} businesses')
for l in leads[:5]:
    print(f'  {l["name"]}: {l["domain"]} {l["phone"]}')

步骤 2: 通过网站分析丰富潜在客户

搜索每个企业以查找其他信号:他们是否有博客、社交媒体或过时的网站设计。

Python
import time

def enrich_lead(lead: dict) -> dict:
    domain = lead['domain']
    if not domain:
        return lead
    # Search for the business to find additional info
    resp = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'},
        json={'query': f'site:{domain}', 'country_code': 'us', 'num_results': 5})
    pages = resp.json().get('organic_results', [])
    lead['page_count'] = len(pages)
    lead['has_blog'] = any('blog' in p.get('link', '').lower() for p in pages)
    lead['has_booking'] = any(w in ' '.join(p.get('title', '') for p in pages).lower()
                              for w in ['book', 'schedule', 'appointment'])
    # Estimate website quality from page count
    if lead['page_count'] <= 2:
        lead['website_quality'] = 'minimal'
    elif lead['page_count'] <= 5:
        lead['website_quality'] = 'basic'
    else:
        lead['website_quality'] = 'established'
    return lead

# Enrich top leads
for i, lead in enumerate(leads[:3]):
    leads[i] = enrich_lead(lead)
    print(f'  {lead["name"]}: {lead["page_count"]} pages, '
          f'blog={lead.get("has_blog", False)}, '
          f'quality={lead.get("website_quality", "unknown")}')
    time.sleep(0.3)

步骤 3: 生成个性化冷邮件模板

使用丰富数据为每个潜在客户创建个性化电子邮件模板。参考他们的具体网站情况。

Python
def generate_email(lead: dict) -> str:
    name = lead['name']
    quality = lead.get('website_quality', 'unknown')
    has_blog = lead.get('has_blog', False)
    has_booking = lead.get('has_booking', False)
    # Personalized opening based on website analysis
    if quality == 'minimal':
        opening = (f'I noticed {name} has a fairly simple website. '
                   'Many of your competitors in the area have sites with '
                   'online booking and patient reviews that help them stand out.')
    elif not has_booking:
        opening = (f'I visited the {name} website and noticed you do not have '
                   'an online booking system. Adding one typically increases '
                   'new patient inquiries by 20-30%.')
    elif not has_blog:
        opening = (f'{name} has a solid website, but I noticed there is no blog. '
                   'Local dental practices with blogs rank for 3-5x more '
                   'keywords than those without.')
    else:
        opening = (f'I have been following {name} online and your web presence '
                   'is strong. I think there is an opportunity to improve '
                   'your local search visibility even further.')
    email = f"""Subject: Quick question about {name}'s website

Hi,

{opening}

I help {lead['category']}s in {lead['city']} get more patients through 
their website. Would a 10-minute call this week make sense?

Best regards"""
    return email

for lead in leads[:2]:
    if lead.get('website_quality'):
        email = generate_email(lead)
        print(email)
        print('---')

Python 示例

Python
import requests, os, re, time

SCAVIO_KEY = os.environ['SCAVIO_API_KEY']

def find_leads(category, city):
    resp = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'},
        json={'query': f'{category} near {city}', 'country_code': 'us', 'num_results': 10})
    leads = []
    for r in resp.json().get('organic_results', []):
        domain = r['link'].split('/')[2] if '/' in r['link'] else ''
        if not any(a in domain for a in ['yelp.com', 'yellowpages.com']):
            phones = re.findall(r'\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}', r.get('snippet', ''))
            leads.append({'name': r['title'].split(' - ')[0], 'domain': domain,
                          'phone': phones[0] if phones else ''})
    return leads

for l in find_leads('dentist', 'Austin TX')[:5]:
    print(f'{l["name"]}: {l["domain"]} {l["phone"]}')

JavaScript 示例

JavaScript
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;

async function findLeads(category, city) {
  const resp = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ query: `${category} near ${city}`, country_code: 'us', num_results: 10 })
  });
  return (await resp.json()).organic_results?.filter(r => {
    const domain = new URL(r.link).hostname;
    return !['yelp.com', 'yellowpages.com'].some(a => domain.includes(a));
  }).map(r => ({
    name: r.title.split(' - ')[0],
    domain: new URL(r.link).hostname,
    phone: (r.snippet || '').match(/\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/)?.[0] || ''
  })) || [];
}

findLeads('dentist', 'Austin TX').then(l => l.forEach(x => console.log(`${x.name}: ${x.phone}`)));

预期输出

JSON
Found 7 businesses
  Austin Dental Care: austindentalcare.com (512) 555-0123
  Smile Solutions: smilesolutionsatx.com (512) 555-0456
  Capital City Dental: capitalcitydental.com

  Austin Dental Care: 3 pages, blog=False, quality=basic
  Smile Solutions: 8 pages, blog=True, quality=established

Subject: Quick question about Austin Dental Care's website

Hi,

I visited the Austin Dental Care website and noticed you do not have
an online booking system. Adding one typically increases
new patient inquiries by 20-30%.

I help dentists in Austin TX get more patients through their website.
Would a 10-minute call this week make sense?

相关教程

  • 如何通过 SERP 丰富构建本地潜在客户渠道
  • 如何对冷电子邮件个性化运行 SERP 审核
  • 如何寻找没有大规模网站的企业

常见问题

大多数开发者在15到30分钟内完成本教程。您需要一个Scavio API密钥(免费套餐即可)和可用的Python或JavaScript环境。

已安装 Python 3.9+. 请求已安装库. 来自 scavio.dev 的 Scavio API 密钥. Scavio API密钥注册即送50个免费积分。

可以。免费套餐注册即送50个积分,完全足够完成本教程并构建一个可运行的原型解决方案。

Scavio提供原生LangChain包(langchain-scavio)、MCP服务器以及适用于任何HTTP客户端的REST API。本教程使用 the raw REST API, 但您可以根据需要适配您选择的框架。

相关资源

Best Of

2026 年最佳 AI 生产力应用程序

Read more
Best Of

2026年最佳SerpAPI替代方案

Read more
Glossary

搜索 API 供应商格局(2026)

Read more
Glossary

搜索付费墙时代(2026)

Read more
Use Case

2026 开源 AI 网络访问方案

Read more
Comparison

DataForSEO vs Serper

Read more

开始构建

使用 SERP 结果中的 Google 地图数据构建潜在客户开发渠道。查找本地企业、提取联系人并个性化冷电子邮件。

获取免费API密钥阅读文档
ScavioScavio

面向AI智能体的实时搜索API。搜索所有平台,不仅仅是Google。

产品

  • 功能
  • 定价
  • 控制台
  • 联盟计划

开发者

  • 文档
  • API参考
  • 快速开始
  • MCP集成
  • Python SDK

替代方案

  • Tavily替代方案
  • SerpAPI替代方案
  • Firecrawl替代方案
  • Exa替代方案

工具

  • JSON格式化
  • cURL转代码
  • Token计数器
  • 全部工具

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策