Skip to content

Repository files navigation

Google Maps Scraper MCP

The Google Maps MCP for AI agents — OAuth in 30 seconds, no API keys. Extract B2B leads, emails, phones, ratings, reviews and social links from Google Maps directly inside Claude, Cursor, Codex, Windsurf, ChatGPT and any MCP-compatible AI client.

npm version MIT License MCP Apify Actor OAuth Works with Claude Works with Cursor Works with Windsurf Works with VS Code


What this is

A Model Context Protocol server that gives any MCP-compatible AI agent a single, reliable way to pull structured data from Google Maps:

  • 🏢 Businesses by keyword + location ("plumbers in Austin")
  • 🔗 Specific Google Maps URLs (search pages or place pages)
  • 📧 Verified emails and social links via optional website enrichment (charged only when an email is actually found)
  • Ratings, review counts, reviews, categories, opening hours, coordinates, phones, websites
  • 🎯 Lead-quality scoring (0–100) for prioritising outreach

Backed by a battle-tested Apify actor with proxies, deduplication and robust parsing built in.

Why use it inside an AI agent?

Traditional Google Maps scrapers live in a separate dashboard. This one lives inside the agent: Claude, Cursor, Codex or any other MCP client can plan an outreach campaign, research competitors, or enrich a CRM — and actually pull the data in the same turn.


Two ways to install

Option A: Cloud MCP (OAuth) Option B: Self-hosted (npm)
Install time ~30 seconds 2–3 minutes
What you need An Apify account (OAuth popup signs you in) Node 18+ and an Apify API token
Runs where Apify Cloud Your machine
Best for Most users — Claude, Cursor, Windsurf, VS Code, Codex Self-hosted infra, air-gapped networks, advanced overrides
Config One URL Command + token env var

Not sure which one? Pick Option A. That's why it's first.

Client coverage at a glance (Option A)

Client Surface Install path
Claude.ai Web · Desktop · Cowork · iOS · Android Settings → Connectors → Add custom connector
ChatGPT Web · Desktop Settings → Connectors → Create (Pro/Team/Enterprise/Edu)
Cursor Desktop One-click deeplink or ~/.cursor/mcp.json
Claude Code CLI claude mcp add --transport http ...
VS Code Desktop .vscode/mcp.json
Windsurf Desktop ~/.codeium/windsurf/mcp_config.json
OpenAI Codex CLI CLI ~/.codex/config.toml
Others LibreChat, Continue, Cline, Zed, Goose, Mistral Le Chat, Microsoft Copilot Studio, Sentinel…

Option A — Cloud MCP (OAuth, recommended)

🔗 The one URL you need

https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper

Paste this into any MCP-compatible client. On first call, a browser tab opens, you sign into Apify, and you're scraping. No tokens. No npm install. One setting covers Claude web, Claude Desktop, Cowork, mobile apps, ChatGPT web, Cursor, Windsurf, VS Code, Claude Code, Codex CLI and any other Streamable-HTTP MCP client.

New to Apify? Accounts are free and include $5 of credits — enough to scrape ~1,000 businesses before you pay a cent.

Web clients (nothing to install)

For users on Claude.ai (browser / Cowork / mobile app) and ChatGPT web — no desktop app, no config file, no CLI. Just add the connector URL in Settings and sign in.

Claude.ai (web, Cowork, mobile, Desktop — one setting for all)

  1. Open Claude → profile icon → Settings → Connectors.
  2. Scroll to the bottom and click "Add custom connector".
  3. Paste:
    https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper
    
  4. Click Connect. A browser tab opens for Apify OAuth. Approve it.
  5. You're done — the connector works across Claude web, Desktop, Cowork and mobile apps with a single setup.

Works on Free, Pro, Max, Team and Enterprise plans (Free is limited to 1 custom connector).

ChatGPT web (Pro, Team, Enterprise, Edu)

  1. Open ChatGPT → Settings → Connectors (or Apps & Connectors → Add new connector on newer UIs). You may need to toggle Developer Mode in Advanced settings first.
  2. Click Create / Add custom connector.
  3. Fill in:
    • Name: Google Maps Scraper
    • Description: Scrape Google Maps businesses, emails, phones, reviews.
    • MCP server URL: https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper
    • Authentication: OAuth (recommended) or Bearer with your Apify API token
  4. Save. First call opens the Apify OAuth popup.

Not available on the Free plan.

Desktop / CLI clients

Config snippets below. Paste into the listed config file, save, restart the client.

Claude Desktop

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Add:

{
  "mcpServers": {
    "google-maps-scraper": {
      "url": "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"
    }
  }
}

Restart Claude Desktop. A browser tab opens for OAuth the first time. Done.

Cursor

One-click install: Add to Cursor

Or edit ~/.cursor/mcp.json manually:

{
  "mcpServers": {
    "google-maps-scraper": {
      "url": "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"
    }
  }
}

Then Cursor → Settings → MCP → Refresh. OAuth pops up on first call.

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "google-maps-scraper": {
      "url": "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"
    }
  }
}

VS Code

Add to .vscode/mcp.json in your workspace or user settings:

{
  "servers": {
    "google-maps-scraper": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"
    }
  }
}

Claude Code

claude mcp add google-maps-scraper \
  --transport http \
  https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper

OpenAI Codex CLI

Edit ~/.codex/config.toml:

[mcp_servers.google-maps-scraper]
url = "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"

Other MCP clients

LibreChat, Continue, Cline, Zed, Goose, Roo Code, Mistral Le Chat connectors, Microsoft Copilot Studio and Sentinel — any client that accepts a Streamable HTTP MCP URL works with the same endpoint.

Prefer Bearer token over OAuth?

Any of the configs above also accepts a Bearer header. Skip OAuth, use your Apify API token:

{
  "mcpServers": {
    "google-maps-scraper": {
      "url": "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper",
      "headers": {
        "Authorization": "Bearer apify_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Clients that don't speak Streamable HTTP yet

Wrap the URL with mcp-remote:

{
  "mcpServers": {
    "google-maps-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.apify.com?tools=khadinakbar/google-maps-leads-scraper"]
    }
  }
}

mcp-remote handles the OAuth flow for stdio-only clients.


Option B — Self-hosted (npm)

For when you want the server to run in your own process (air-gapped, internal network, heavy customisation).

Prerequisites

Claude Desktop

{
  "mcpServers": {
    "google-maps-scraper": {
      "command": "npx",
      "args": ["-y", "google-maps-scraper-mcp"],
      "env": {
        "APIFY_TOKEN": "apify_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Claude Code

claude mcp add google-maps-scraper \
  -e APIFY_TOKEN=apify_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
  -- npx -y google-maps-scraper-mcp

Cursor / Windsurf / VS Code / Codex CLI

Same shape as Claude Desktop above — substitute the correct config path:

  • Cursor: ~/.cursor/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
  • VS Code: .vscode/mcp.json (use "type": "stdio")
  • Codex CLI: ~/.codex/config.toml

Ready-to-paste examples live in examples/.


Tools exposed

The server exposes two tools. Descriptions are tuned for LLM discoverability — your agent picks the right one automatically.

search_google_maps

Search Google Maps by keyword + location. Best when the user describes a business type ("dentists", "SaaS agencies", "law firms").

Parameter Type Default Notes
searchQuery string required e.g. "vegan restaurants"
location string required e.g. "Austin, TX"
maxResults integer 20 1–500
enrichEmails boolean false Visit business website to extract emails + socials
minRating number 0 0–5 filter
maxReviews integer 0 Reviews per business (0 = none, fastest)
language enum "en" en, es, fr, de, it, pt, nl, pl, ru, ja, ko, zh-CN, ar, tr, hi

scrape_google_maps_urls

Scrape specific Google Maps URLs — search pages or individual place pages. Best when the user already has links.

Parameter Type Default Notes
urls string[] required 1–100 Google Maps URLs
maxResults integer 20 Across all URLs
enrichEmails boolean false Emails + socials
maxReviews integer 0 Reviews per business
language enum "en" Same options as above

The cloud option exposes additional Apify meta-tools (actor discovery, docs lookup) automatically. The self-hosted npm package is deliberately scoped to just these two tools for a smaller surface area.


Example prompts

Drop these into Claude / Cursor / Codex once connected:

Find 30 independent coffee shops in Brooklyn with ratings above 4.3. Include phones and websites.

Get me the top 50 dental clinics in Dubai with verified emails for a cold-outreach campaign.

Scrape this Google Maps search: https://www.google.com/maps/search/solar+installers+in+Phoenix/ — 100 results, with emails.

Build a competitor list: the top 25 B2B SaaS agencies in London, show lead score + website + rating.

Enrich the first 10 businesses from https://www.google.com/maps/search/marketing+agencies+Austin with emails and LinkedIn profiles.

The agent will pick the right tool, call the actor, and return structured results your model can filter or pipe into a CSV / your CRM.

More workflows: docs/USAGE.md.


Output shape

Each result is a flat, CRM-ready record:

{
  "placeId": "ChIJ...",
  "name": "Smile Bright Dental",
  "category": "Dentist",
  "categories": ["Dentist", "Cosmetic dentist"],
  "address": "123 Collins Ave, Miami Beach, FL 33139",
  "phone": "+1 305-555-0199",
  "website": "https://smilebrightmiami.com",
  "email": "hello@smilebrightmiami.com",
  "emails": ["hello@smilebrightmiami.com", "bookings@smilebrightmiami.com"],
  "rating": 4.8,
  "reviewsCount": 312,
  "openingHours": { "Monday": "9 AM – 6 PM", "...": "..." },
  "latitude": 25.7904,
  "longitude": -80.1300,
  "googleMapsUrl": "https://www.google.com/maps/place/?q=place_id:ChIJ...",
  "socialLinks": {
    "instagram": "https://instagram.com/smilebrightmiami",
    "facebook":  "https://facebook.com/smilebrightmiami"
  },
  "leadScore": 92
}

A full tool response also includes a run object with the Apify runId, datasetId and a clickable apifyRunUrl so you can audit every request.


Pricing

The MCP server itself is free and open-source (MIT). Runs on top of a pay-per-result Apify actor:

Event Price
Place scraped $0.004
Verified email found $0.006 (only when an email is actually discovered)
Actor start $0.00005

No subscription. No minimum. New Apify accounts include $5 of free credits — enough for ~1,000 businesses.


How it compares

Google Places API Scraping it yourself google-maps-scraper-mcp
Works inside Claude / Cursor / Codex
OAuth, zero-install
Emails & social links Manual
No API key / OAuth dance ✅ (OAuth option)
Pay-per-result, not per-seat
Deduplication + lead scoring Build it
Safe to ship in an agent ❌ (IP bans)

Security, rate limits, and best practices

  • OAuth flow is scoped — the token your client receives only works against mcp.apify.com endpoints, not your full Apify account.
  • Self-hosted token stays local. Option B's APIFY_TOKEN is only sent from your machine to api.apify.com.
  • Caps. Self-hosted maxResults is capped at 500 per call to protect your credits. Set MAX_RESULTS_CEILING in env to lower it further.
  • Timeouts. Self-hosted long runs are bounded by APIFY_WAIT_SECS (default 180s).
  • Deduplication is handled upstream by the actor.
  • Respect local law. Scraping public business data is broadly permitted, but GDPR/CAN-SPAM/CCPA still apply to how you use the data. Notes in docs/LEGAL.md.

Configuration reference (self-hosted)

Variable Default Description
APIFY_TOKEN Required. Your Apify API token.
APIFY_ACTOR_ID khadinakbar/google-maps-leads-scraper Override to point at a fork of the actor.
DEFAULT_MAX_RESULTS 20 Default maxResults when the agent doesn't specify.
MAX_RESULTS_CEILING 500 Hard cap per request.
APIFY_WAIT_SECS 180 Seconds to wait for the actor run to finish.

Local development

git clone https://github.com/khadinakbarlabs/google-maps-scraper-mcp.git
cd google-maps-scraper-mcp
npm install
cp .env.example .env   # fill in APIFY_TOKEN
npm run build
npm run inspect        # opens the MCP Inspector UI

Contributing

Issues and PRs welcome. See CONTRIBUTING.md.

If you build a workflow on top of this (n8n, Zapier, LangGraph, CrewAI, autogen…), open a PR adding a recipe to examples/.


License

MIT © Khadin Akbar.


Related


Keywords: google maps scraper mcp, google maps mcp server, claude google maps mcp, cursor google maps scraper, windsurf mcp scraper, codex mcp google places, gmaps lead generation ai, b2b email scraper mcp, local business scraper claude, google maps places api alternative, google maps email extractor mcp, apify mcp connector, apify oauth mcp, google maps oauth mcp, AI agent google maps, model context protocol google maps, llm scraper google maps, claude google maps oauth.

Releases

Packages

Contributors

Languages