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

如何构建从 Google 地图到电子邮件的 SMB 外展管道

构建从 Google 地图搜索到经过验证的电子邮件外展的小型企业外展管道。查找企业、验证网站、撰写电子邮件。

获取免费API密钥API文档

r/coldemail 的一个帖子询问了如何大规模接触小型企业。管道:按类别和位置在 Google 地图上搜索企业,检查他们是否有网站,并进行个性化宣传。本教程构建数据收集和电子邮件撰写步骤。

前置条件

  • Scavio API 密钥
  • Python 3.8+
  • 用于发送的 SMTP 凭据
  • 可选:电子邮件验证服务

操作指南

步骤 1: 按类别和地点搜索企业

通过 Scavio 使用 Google 地图查找商家。

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

步骤 2: 从网站查找联系电子邮件

使用 Scavio 提取端点从企业网站提取电子邮件。

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

步骤 3: 撰写个性化外展电子邮件

生成引用特定业务详细信息的电子邮件。

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')}

步骤 4: 导出为 CSV 以导入外展工具

Instantly(30 美元/月)或 Smartlead(39 美元/月)可以导入 CSV 以按顺序发送。

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 示例

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 示例

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());

预期输出

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.

相关教程

  • 如何构建 Google 地图到 WhatsApp 的潜在客户管道
  • 如何构建完整的 Google 地图到 WhatsApp 的外展管道

常见问题

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

Scavio API 密钥. Python 3.8+. 用于发送的 SMTP 凭据. 可选:电子邮件验证服务. Scavio API密钥注册即送50个免费积分。

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

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

相关资源

Best Of

2026年中小企业最佳商业数据增强API

Read more
Best Of

2026最佳本地商业数据API

Read more
Comparison

Google Places API vs SERP Local Pack API

Read more
Solution

Sonar API

Read more
Solution

从 Brave Search API 迁移到 Scavio 获得更好覆盖

Read more
Use Case

n8n 搜索数据增强工作流

Read more

开始构建

构建从 Google 地图搜索到经过验证的电子邮件外展的小型企业外展管道。查找企业、验证网站、撰写电子邮件。

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

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

产品

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

开发者

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

替代方案

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

工具

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

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策