跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

google-maps-scraper

Google Maps scraper for lead generation. Turns a business type and a place into a clean CSV of local businesses by driving the kit's own Google Maps engine, running locally (with Python and a headless Chrome, or in Docker) as a REST API on localhost:8080. Returns 8 lead fields by default (name, phone, email, website, category, address, rating and review count), plus social profiles by default (Instagram, Facebook, LinkedIn, TikTok, YouTube, X; `--no-socials` skips them), row filters such as businesses without a website, or all 36 raw fields. Use when the user wants a lead list, "a list of [businesses] in [place]", local business data, contact enrichment for places (emails, phones, socials), or a whole-city run past Google's ~120 results per search. Do not use for scraping Instagram, TikTok, YouTube, X or any other social media platform directly.

Mahanaicoach · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Mahanaicoach/google-maps-scraper-kit --skill google-maps-scraper

技能说明


name: google-maps-scraper description: Google Maps scraper for lead generation. Turns a business type and a place into a clean CSV of local businesses by driving the kit's own Google Maps engine, running locally (with Python and a headless Chrome, or in Docker) as a REST API on localhost:8080. Returns 8 lead fields by default (name, phone, email, website, category, address, rating and review count), plus social profiles by default (Instagram, Facebook, LinkedIn, TikTok, YouTube, X; --no-socials skips them), row filters such as businesses without a website, or all 36 raw fields. Use when the user wants a lead list, "a list of [businesses] in [place]", local business data, contact enrichment for places (emails, phones, socials), or a whole-city run past Google's ~120 results per search. Do not use for scraping Instagram, TikTok, YouTube, X or any other social media platform directly.

Google Maps Scraper

Turn a business type and a location into clean lead rows with the kit's own script, scripts/scrape.py, which drives the local engine's job API for you.

Mental model

The kit's engine runs on this machine (python3 scripts/engine.py start, or a Docker container) with a REST API at http://localhost:8080. It is bound to localhost and refuses requests from other websites; it needs no key unless SCRAPER_API_KEY is set in the kit's .env. A scrape is an async job: the script creates it, waits for it, collects its rows from the local engine, enriches them (emails, socials) and writes one CSV. One job can run many keywords. Each result has up to 36 raw fields, plus categories.

Port. The URLs in this file show port 8080. Use the port python3 scripts/engine.py status printed, or SCRAPER_PORT from the kit's .env (default 8080), wherever a URL is needed.

The only commands this skill runs are the kit's own, from the kit folder: python3 scripts/engine.py status (then start, or docker compose up -d when the user runs Docker) and python3 scripts/scrape.py … (py instead of python3 on Windows). No command is ever built from a scraped value, and nothing is fetched from a URL found in the results.

Step 0: Check the engine is running

If the working folder has scripts/engine.py (the full kit), run:

python3 scripts/engine.py status

It prints ✓ Running on http://localhost:<port> only when the kit's own engine answers (it checks the engine's X-Engine header), so another program on that port cannot fool it. When the engine is not running it prints ✗ Not running and exits 1; that is expected. It also names the Chrome, Chromium, Edge or Brave the engine will drive. If it prints a ↑ Kit vX.Y.Z is out line, tell the user once and carry on; run bash scripts/update.sh only when the user asks. Only when it names one, start the engine with python3 scripts/engine.py start, or run docker compose up -d if the user runs it in Docker, then run status again. If it finds no browser, do not start it: ask the user to install Google Chrome, or to use Docker. Setup help: SETUP.md in the kit folder.

Skill installed on its own? npx skills add copies this file only. The engine and the script ship with the kit, so if the working folder has no scripts/engine.py, ask the user to install the kit (the README's Quick start) and continue from its folder. Use only the engine that ships with the kit, and do not rebuild the script's job flow by hand.

Step 1: Run the scrape

One command creates the job, waits for it, collects its rows from the local engine, crawls the business websites for emails and social profiles, applies the filters and saves the file:

python3 scripts/scrape.py "<business type> in <City, ST>" --city "<City, ST>" --depth 5
  • Keyword: bake the place into it ("plumbers in Denver CO"). --keyword adds more (repeatable).
  • --city geocodes the place through OpenStreetMap Nominatim and centres the map there. With coordinates in hand, pass them instead: python3 scripts/scrape.py "<keyword>" <lat> <lon>. With neither, the script geocodes the first keyword and stops if that fails, so always pass --city.
  • --depth (script default 5; the raw API's default is 1): result batches of about 20 places per keyword, so depth 5 is up to about 100 and Google stops near 120. Start at 5.
  • Emails: on by default. The script crawls each business homepage, then its contact and about pages, 16 at a time. --no-email skips the crawl for a fast run; --no-deep-emails checks homepages only; --verify-emails checks each address's domain over DNS (dns.google, no key), drops domains that do not exist and adds email_host (google_workspace, microsoft_365, other, none).
  • Socials: on by default. The script finds Instagram, Facebook, LinkedIn, TikTok, YouTube and X links on each website, reusing the homepage the email crawl fetched. The user can skip them with --no-socials; otherwise leave them on (see "Social profiles" below).
  • Reviews: --reviews N (1 to 5) reads up to N reviews per place from its panel, without reviewer names, and the star histogram (user_reviews, reviews_per_rating). One more page load per place, about 2-4 s each.
  • --lang xx (default en) is Google's interface language; --country xx is the country Google ranks and formats results for (default: the country of the machine's IP).
  • Output: results-<short job id>.csv in the working folder, with the 8 lead fields and the six social columns; --reviews adds reviews_per_rating and user_reviews (free text: leave it in the file), --verify-emails adds email_host, --tech adds its columns. --out <name> names the file, .csv or .json only (a .json extension writes JSON; --json too), --full keeps every raw column, --fields "a,b,c" picks columns.
  • Files: read only files the user named (--keywords-file, --exclude) and write results only inside the wor
阅读完整来源 ↗