google-maps-list-builder
Scrape Google Maps for local businesses by category and location, output CSV ready for cold email enrichment. Best for SMB campaigns targeting restaurants, clinics, gyms, salons, contractors, etc. Uses RapidAPI Maps Data API. Output feeds directly into /blitz-list-builder (to find owner contacts) or /email-waterfall (if you have names already).
growthenginenowoslawski · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add growthenginenowoslawski/coldoutboundskills --skill google-maps-list-builder技能说明
name: google-maps-list-builder description: Scrape Google Maps for local businesses by category and location, output CSV ready for cold email enrichment. Best for SMB campaigns targeting restaurants, clinics, gyms, salons, contractors, etc. Uses RapidAPI Maps Data API. Output feeds directly into /blitz-list-builder (to find owner contacts) or /email-waterfall (if you have names already).
Google Maps List Builder
A self-contained tool for scraping business listings from Google Maps. Give it a search query (e.g., "pizza restaurant") and a location (zip code, city, or coordinates), and it returns structured data for every matching business — written to CSV.
How this fits in the cold email flow
Google Maps gives you COMPANIES (name, domain, phone, address, ratings). It does NOT give you PEOPLE. To run cold email:
- Run this skill → CSV of businesses with
company_domain - Run
/icp-prompt-builderon a sample of 50 — tune a qualification prompt to filter out bad fits before paying for downstream enrichment - Run
/blitz-list-builderwith the filtered CSV → adds owners/managers to each business - Run
/email-waterfall→ fills in missing emails - Run
/cold-email-starter-kit'ssmartlead-add-leads.ts→ upload to Smartlead
This skill is only the first step.
Required step: Qualify with /icp-prompt-builder
This is a required step. Do not skip it.
Google Maps will happily return 10,000 "pizza restaurants in Illinois," but most of those won't match your actual ICP (maybe you only want 50-200 seat operators, or only ones without online ordering). Before spending on enrichment, sample ~50 results and run /icp-prompt-builder:
- Evaluate 10 results with an AI qualification prompt
- You flag "this one should be NO, they're a chain franchise"
- Refine, run next 10
- Stop when 2 rounds show no corrections
- Apply tuned prompt to filter the rest of the scrape
Why required: downstream owner-finding (via /blitz-list-builder) and email waterfall cost $0.10-$0.30 per contact. On a 10,000-business scrape, that's $1K-$3K. Qualifying upfront saves 50-80% of that spend on average.
What You Need Before Starting
- Node.js 18+ and npm installed
- A RapidAPI account (free tier available) with a subscription to the Maps Data API:
- Sign up at https://rapidapi.com
- Subscribe to the API: https://rapidapi.com/alexanderxbx/api/maps-data
- Copy your RapidAPI key from the dashboard (it's in the
X-RapidAPI-Keyheader on any endpoint page)
That's it. No Google Cloud account, no OAuth, no billing setup beyond RapidAPI.
Project Setup
Create a new project directory and initialize it:
mkdir google-maps-scraper && cd google-maps-scraper
npm init -y
npm install typescript bottleneck
npm install -D @types/node tsx
Add to package.json scripts:
{
"scripts": {
"scrape": "tsx src/index.ts"
}
}
Create tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"outDir": "dist",
"rootDir": "src",
"skipLibCheck": true
},
"include": ["src"]
}
Set your API key as an environment variable:
export RAPIDAPI_KEY=your_key_here
Or create a .env file (add .env to .gitignore):
RAPIDAPI_KEY=your_key_here
File Structure
google-maps-scraper/
data/
us-zip-codes.csv # 42,734 US zip codes with city, state, lat/lng, population
src/
index.ts # CLI entry point
client.ts # RapidAPI Maps Data client with rate limiting
types.ts # TypeScript interfaces
csv.ts # CSV export
zips.ts # Zip code loader (filter by state, city, population)
Bundled Zip Code Database
The repo includes data/us-zip-codes.csv — a complete US zip code reference with 42,734 entries. Columns:
zip,primary_city,state,timezone,area_codes,world_region,country,latitude,longitude,irs_estimated_population
This lets you scrape an entire state or metro area without manually listing zip codes. The src/zips.ts loader provides filtering by state, city, and minimum population.
Core Files
src/types.ts
export interface SearchParams {
query: string; // "pizza restaurant", "dentist", "gym"
lat?: number; // Center latitude (optional if using "query in zipcode" format)
lng?: number; // Center longitude
limit?: number; // Max results per search (default 20, max 20)
zoom?: number; // Map zoom level (default 13 = neighborhood)
country?: string; // Country code (default "us")
}
export interface Place {
place_id: string;
name: string;
address: string;
lat: number;
lng: number;
rating?: number;
reviews_count?: number;
phone?: string;
website?: string;
types?: string[];
category?: string;
}
export interface ScrapeResult {
query: string;
location: string;
total_results: number;
unique_results: number;
places: Place[];
duration_ms: number;
}
src/zips.ts
Loads and filters the bundled zip code CSV. Lets you target by state, city name, or minimum population.
import { readFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
export interface ZipEntry {
zip: string;
city: string;
state: string;
lat: number;
lng: number;
population: number;
}
let cache: ZipEntry[] | null = null;
function loadAll(): ZipEntry[] {
if (cache) return cache;
const __dirname = dirname(fileURLToPath(import.meta.url));
const csvPath = join(__dirname, '..', 'data', 'us-zip-codes.csv');
const raw = readFileSync(csvPath, 'utf-8');
const lines = raw.trim().split('\n').slice(1); // skip header
cache = lines.map(line => {
// Handle quoted fields (area_codes can contain commas)
const parts: string[] = [];
let current = '';
let inQuotes
阅读完整来源 ↗