{
  "markdown": "# Google Maps Scraper\n\n<p align=\"center\">\n  <a href=\"https://github.com/gosom/google-maps-scraper/stargazers\"><img src=\"https://img.shields.io/github/stars/gosom/google-maps-scraper?style=social\" alt=\"GitHub Stars\"></a>\n  <a href=\"https://github.com/gosom/google-maps-scraper/network/members\"><img src=\"https://img.shields.io/github/forks/gosom/google-maps-scraper?style=social\" alt=\"GitHub Forks\"></a>\n  <a href=\"https://twitter.com/intent/tweet?text=Powerful%20open-source%20Google%20Maps%20scraper%20-%20extract%20business%20data%20at%20scale%20with%20CLI%2C%20Web%20UI%2C%20or%20REST%20API&url=https%3A%2F%2Fgithub.com%2Fgosom%2Fgoogle-maps-scraper&hashtags=golang,webscraping,googlemaps,opensource\"><img src=\"https://img.shields.io/twitter/url/http/shields.io.svg?style=social\" alt=\"Tweet\"></a>\n</p>\n\n[![Build Status](https://github.com/gosom/google-maps-scraper/actions/workflows/build.yml/badge.svg)](https://github.com/gosom/google-maps-scraper/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gosom/google-maps-scraper)](https://goreportcard.com/report/github.com/gosom/google-maps-scraper)\n[![GoDoc](https://godoc.org/github.com/gosom/google-maps-scraper?status.svg)](https://godoc.org/github.com/gosom/google-maps-scraper)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289DA?logo=discord&logoColor=white)](https://discord.gg/fpaAVhNCCu)\n\nExtract Google Maps business leads, emails, reviews, phone numbers, websites, ratings, coordinates, and more with a free open-source CLI, Web UI, REST API, and optional self-hosted platform.\n\nUse it for lead generation, local business research, sales prospecting, data enrichment, or developer automation.\n\n## Ask an AI Agent to Get Leads\n\nThe easiest way to use Google Maps Scraper is with an AI coding agent such as [Claude Code](https://claude.com/claude-code), Codex, Cursor, GitHub Copilot, or any [Agent Skills-compatible tool](https://agentskills.io). You describe the leads you want; the agent plans the searches, runs a small validation, starts the full local scrape, monitors it, and helps you work with the results.\n\nInstall the skill:\n\n```bash\nnpx skills add gosom/google-maps-scraper\n```\n\nThen ask your agent in plain language:\n\n> Find dentists in Berlin and include their websites and email addresses.\n\nThe agent automatically checks for the latest skill and Docker image, then asks only for details it still needs. For larger crawls, you can provide your own proxy, continue without one, or review three randomly selected proxy sponsors. Proxy credentials are entered through a masked local terminal prompt and are never pasted into the agent chat.\n\nRequires Docker and Node.js on macOS, Linux, or Windows through WSL. See [how the agent workflow works](#ai-agent-skill).\n\n| Goal | Start here |\n|---|---|\n| Get leads into CSV/JSON | [Command Line](#command-line) |\n| Ask an AI coding agent to run a scrape | [AI Agent Skill](#ai-agent-skill) |\n| Run a browser UI locally | [Web UI](#web-ui) |\n| Automate scraping from your app | [REST API](#rest-api) |\n| Run a multi-user scraping platform | [SaaS Edition](docs/saas.md) |\n| Follow common workflows | [Recipes](docs/recipes.md) |\n\n![Example GIF](img/example.gif)\n\nIf this project is useful to you, a GitHub star helps others discover it. Sponsorships help fund maintenance and new work.\n\n---\n\n## Sponsored By\n\n<p align=\"center\"><i>This project is made possible by our amazing sponsors</i></p>\n\n### [Coreclaw](https://www.coreclaw.com/?utm_source=github&utm_medium=referral&utm_campaign=gosom&utm_term=&utm_id=gosom) - Full-stack web scraping and data extraction platform\n\n[![Coreclaw - Full-stack web scraping and data extraction platform](./img/coreclaw.png)](https://www.coreclaw.com/?utm_source=github&utm_medium=referral&utm_campaign=gosom&utm_term=&utm_id=gosom)\n\nFind ready-made workers for public websites, run them instantly, and get structured data you can export or connect anywhere. [**Get free test for $3 →**](https://www.coreclaw.com/?utm_source=github&utm_medium=referral&utm_campaign=gosom&utm_term=&utm_id=gosom)\n\n---\n\n### [G Maps Extractor](https://gmapsextractor.com?utm_source=github&utm_medium=banner&utm_campaign=gosom) - No-code Google Maps scraper\n\n[![G Maps Extractor](./img/gmaps-extractor-banner.png)](https://gmapsextractor.com?utm_source=github&utm_medium=banner&utm_campaign=gosom)\n\nChrome extension that extracts emails, social profiles, phone numbers, reviews & more. [**Get 1,000 free leads →**](https://gmapsextractor.com?utm_source=github&utm_medium=banner&utm_campaign=gosom)\n\n---\n\n### [Scrap.io](https://scrap.io?utm_medium=ads&utm_source=github_gosom_gmap_scraper) - Extract ALL Google Maps listings at country-scale\n\n[![Scrap.io - Extract ALL Google Maps Listings](./img/premium_scrap_io.png)](https://scrap.io?utm_medium=ads&utm_source=github_gosom_gmap_scraper)\n\nNo keywords needed. No limits. Export millions of businesses in 2 clicks. [**Try it free →**](https://scrap.io?utm_medium=ads&utm_source=github_gosom_gmap_scraper)\n\n---\n\n### [SerpApi](https://serpapi.com/?utm_source=google-maps-scraper) - Google Maps API and 30+ search engine APIs\n\n[![SerpApi](./img/SerpApi-banner.png)](https://serpapi.com/?utm_source=google-maps-scraper)\n\nFast, reliable, and scalable. Used by Fortune 500 companies. [**View all APIs →**](https://serpapi.com/search-api)\n\n---\n\n### [SearchApi](https://www.searchapi.io/google-maps?via=gosom&utm_source=github&utm_medium=sponsorship&utm_campaign=gosom) - Google Maps API for SERP scraping\n\n[![SearchApi](./img/searchapi_google_maps.png)](https://www.searchapi.io/google-maps?via=gosom&utm_source=github&utm_medium=sponsorship&utm_campaign=gosom)\n\nReal-time Google Maps data with a simple integration. [**Explore the API →**](https://www.searchapi.io/google-maps?via=gosom&utm_source=github&utm_medium=sponsorship&utm_campaign=gosom)\n\n---\n\n### [Evomi](https://evomi.com?utm_source=github&utm_medium=banner&utm_campaign=gosom-maps) - Swiss quality proxies for scraping\n\n[![Evomi](https://my.evomi.com/images/brand/cta.png)](https://evomi.com?utm_source=github&utm_medium=banner&utm_campaign=gosom-maps)\n\nSwiss quality proxies from $0.49/GB across 150+ countries, with 24/7 support and 99.9% uptime. [**Visit Evomi →**](https://evomi.com?utm_source=github&utm_medium=banner&utm_campaign=gosom-maps)\n\n---\n\n### [HasData](https://hasdata.com/scrapers/google-maps?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom) - No-code Google Maps Scraper & Email Extraction\n\n[![HasData Google Maps Scraper](./img/hd-gm-banner.png)](https://hasdata.com/scrapers/google-maps?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom)\n\nExtract business leads, emails, addresses, phones, reviews and more. [**Get 1,000 free credits →**](https://hasdata.com/scrapers/google-maps?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom)\n\n---\n\n### [RapidProxy](https://www.rapidproxy.io/?ref=gosom) - High-Performance Proxy Solution\n\n[![RapidProxy](./img/rapidproxy-banner.png)](https://www.rapidproxy.io/?ref=gosom)\n\nUnlock global access with consistent, high-speed connections from $0.65/GB, 90M+ real residential IPs worldwide, and traffic that never expires. [**Try it free →**](https://www.rapidproxy.io/?ref=gosom)\n\n---\n\n### [TalorData](https://talordata.com/?campaignid=f01u8cHondg2qA47&utm_source=github&utm_term=googlemaps) - Fast SERP API for Google Maps and Search Data\n\n[![TalorData](./img/talordata.png)](https://talordata.com/?campaignid=f01u8cHondg2qA47&utm_source=github&utm_term=googlemaps)\n\nReal-time SERP data APIs for Google Maps and search results, with structured JSON / HTML responses and 1,000 free API responses to start. [**Start using TalorData →**](https://talordata.com/?campaignid=f01u8cHondg2qA47&utm_source=github&utm_term=googlemaps) | [Learn more](talordata.md)\n\n---\n\n### [Webshare](https://www.webshare.io/?referral_code=0q3l81eet8mp) - Premium proxies for scraping at scale\n\n[![Webshare](./img/webshare-banner.png)](https://www.webshare.io/?referral_code=0q3l81eet8mp)\n\nThe most affordable premium proxies across 195 countries & 80+ million IPs, plus a FREE plan for new users. [Learn more](webshare.md)\n\n---\n\n### [BirdProxies](https://birdproxies.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom-google-maps-scraper) - Residential and ISP proxies\n\n[![BirdProxies](./img/birdproxies.png)](https://birdproxies.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom-google-maps-scraper)\n\nHey, we built BirdProxies because proxies shouldn't be complicated or overpriced. Fast residential and ISP proxies in 195+ locations, fair pricing, and real support. Try our FlappyBird game on the landing page for free data!\n\n[**Visit BirdProxies →**](https://birdproxies.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=gosom-google-maps-scraper) | [Join Discord](https://discord.com/invite/birdproxies)\n\n---\n\n### [Proxidize](https://proxidize.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=google_maps_scraper&utm_content=gosom) - Proxies for Google Maps Scraping\n\n[![Proxidize | Proxies for Google Maps Scraping](https://imagedelivery.net/r4caA8hJ3Ww3j8uyC_NNCA/23ee92b0-9fae-4c55-6865-9ca35387fb00/public)](https://proxidize.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=google_maps_scraper&utm_content=gosom)\n\nMobile and residential proxies for Google Maps scraping, local SEO, lead generation, and data collection. Use code `gmaps20` for 20% off. [**Visit Proxidize →**](https://proxidize.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=google_maps_scraper&utm_content=gosom)\n\n---\n\n### [NodeMaven](https://go.nodemaven.com/GoogleMapsScrapperaugust)\n\n[![NodeMaven - The most efficient proxy provider for Web Scraping and Automation](./img/nodemaven.png)](https://go.nodemaven.com/GoogleMapsScrapperaugust)\n\n[**NodeMaven**](https://go.nodemaven.com/GoogleMapsScrapperaugust): The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market.\n\nWhy [**NodeMaven**](https://go.nodemaven.com/GoogleMapsScrapperaugust)?\n\n- ZIP targeting\n- 99.9% uptime\n- IP filtering: all proxies have fraud score <97%\n- No KYC required\n- Unique free tools: Proxy Bandwidth Checker, Meta Tag Checker, IP Lookup and others!\n\n**Special codes for Google Maps Scraper users:**\n\n- `MAPS35` - 35% off to Mobile and Residential Proxies\n- `MAPS40` - 40% off to ISP (Static) Proxies\n\n[**Visit NodeMaven →**](https://go.nodemaven.com/GoogleMapsScrapperaugust)\n\n---\n\n<p align=\"center\">\n  <a href=\"#sponsored-by\">View all sponsors</a> | <a href=\"https://github.com/sponsors/gosom\">Become a sponsor</a>\n</p>\n\n---\n\n## Why Use This Scraper?\n\n| | |\n|---|---|\n| **Completely Free & Open Source** | MIT licensed, no hidden costs or usage limits |\n| **Multiple Interfaces** | CLI, Web UI, REST API - use what fits your workflow |\n| **High Performance** | ~120 places/minute with optimized concurrency |\n| **33+ Data Points** | Business details, reviews, emails, coordinates, and more |\n| **Production Ready** | Scale from a single machine to Kubernetes clusters |\n| **Flexible Output** | CSV, JSON, PostgreSQL, S3, LeadsDB, or custom plugins |\n| **Proxy Support** | Built-in SOCKS5/HTTP/HTTPS proxy rotation |\n\n---\n\n## What's Next After Scraping?\n\nOnce you've collected your data, you'll need to manage, deduplicate, and work with your leads. **[LeadsDB](https://getleadsdb.com/)** is a companion tool designed exactly for this:\n\n- **Automatic Deduplication** - Import from multiple scrapes without worrying about duplicates\n- **AI Agent Ready** - Query and manage leads with natural language via MCP\n- **Advanced Filtering** - Combine filters with AND/OR logic on any field\n- **Export Anywhere** - CSV, JSON, or use the REST API\n\nThe scraper has [built-in LeadsDB integration](#export-to-leadsdb) - just add your API key and leads flow directly into your database.\n\n**[Start free with 500 leads](https://getleadsdb.com/)**\n\n---\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n  - [Command Line](#command-line)\n  - [Web UI](#web-ui)\n  - [REST API](#rest-api)\n  - [SaaS Edition](#saas-edition)\n- [AI Agent Skill](#ai-agent-skill)\n- [Recipes](docs/recipes.md)\n- [Proxy Sponsors](docs/proxies.md)\n- [Installation](#installation)\n- [Features](#features)\n- [Extracted Data Points](#extracted-data-points)\n- [Configuration](#configuration)\n  - [Command Line Options](#command-line-options)\n  - [Using Proxies](#using-proxies)\n  - [Email Extraction](#email-extraction)\n  - [Fast Mode](#fast-mode)\n- [Export to LeadsDB](#export-to-leadsdb)\n- [Advanced Usage](#advanced-usage)\n  - [PostgreSQL Database Provider](#postgresql-database-provider)\n  - [Kubernetes Deployment](#kubernetes-deployment)\n  - [Custom Writer Plugins](#custom-writer-plugins)\n- [Performance](#performance)\n- [Support the Project](#support-the-project)\n- [Community](#community)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Quick Start\n\n### Command Line\n\n```bash\nmkdir -p gmaps-output\n\ndocker run \\\n  -v gmaps-playwright-cache:/opt \\\n  -v \"$PWD/example-queries.txt:/queries.txt:ro\" \\\n  -v \"$PWD/gmaps-output:/out\" \\\n  gosom/google-maps-scraper \\\n  -input /queries.txt \\\n  -results /out/results.csv \\\n  -depth 1 \\\n  -exit-on-inactivity 3m\n```\n\nUseful options:\n\n| Need | Flag |\n|---|---|\n| Extract emails from business websites | `-email` |\n| Write JSON instead of CSV | `-json -results /out/results.json` |\n| Collect extra reviews | `-extra-reviews -json -results /out/results.json` |\n| Increase concurrency | `-c 4`, `-c 8`, or `-c 16` |\n| Run multiple pages per browser | `-pages-per-browser 4` |\n| Limit browser processes | `-browser-pool-size 2` |\n| Use proxies | `-proxies \"http://user:pass@host:port,socks5://host:port\"` |\n| Read proxies from a credentials file | `-proxies-file /path/to/proxies.txt` |\n\n`-c` controls how many scrape jobs run in parallel. Higher concurrency can finish large input files faster, but it also uses more CPU/RAM and can increase blocking or failures, especially without proxies. Start with the default for a first run. For larger jobs on a capable machine, try `-c 4`, `-c 8`, or `-c 16` and measure the result.\n\n**Want to skip CSV files?** Send leads directly to [LeadsDB](https://getleadsdb.com/):\n\n```bash\ndocker run \\\n  -v gmaps-playwright-cache:/opt \\\n  -v \"$PWD/example-queries.txt:/queries.txt:ro\" \\\n  gosom/google-maps-scraper \\\n  -input /queries.txt \\\n  -depth 1 \\\n  -leadsdb-api-key \"your-api-key\" \\\n  -exit-on-inactivity 3m\n```\n\n### Web UI\n\nStart the web interface with a single command:\n\n```bash\nmkdir -p gmapsdata\n\ndocker run \\\n  -v \"$PWD/gmapsdata:/gmapsdata\" \\\n  -p 8080:8080 \\\n  gosom/google-maps-scraper \\\n  -data-folder /gmapsdata\n```\n\nThen open http://localhost:8080 in your browser.\n\nOr download the [binary release](https://github.com/gosom/google-maps-scraper/releases) for your platform.\n\n> **Note:** Results take at least 3 minutes to appear (minimum configured runtime).\n> \n> **macOS Users:** Docker command may not work. See [MacOS Instructions](MacOS%20instructions.md).\n\n### REST API\n\nWhen running the web server, a full REST API is available:\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/api/v1/jobs` | POST | Create a new scraping job |\n| `/api/v1/jobs` | GET | List all jobs |\n| `/api/v1/jobs/{id}` | GET | Get job details |\n| `/api/v1/jobs/{id}` | DELETE | Delete a job |\n| `/api/v1/jobs/{id}/download` | GET | Download results as CSV |\n\nFull OpenAPI 3.0.3 documentation available at http://localhost:8080/api/docs\n\n### SaaS Edition\n\nNeed a multi-user platform with API keys, admin UI, job queue, workers, and cloud provisioning? Use the optional self-hosted SaaS edition:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/gosom/google-maps-scraper/main/PROVISION | sh\n```\n\nSee [SaaS documentation](docs/saas.md) for deployment and operations details.\nThere is also a [5-minute deployment walkthrough](https://gosom.dev/deploy-your-own-maps-scraping-api-in-5-minutes/) and a [YouTube video walkthrough](https://www.youtube.com/watch?v=STG9mZw_nac).\n\nMore examples are available in [Recipes](docs/recipes.md). If you need proxies for larger jobs, see [Proxy Sponsors](docs/proxies.md).\n\n---\n\n## AI Agent Skill\n\nThe AI Agent Skill turns a natural-language lead request into a guided local scraping workflow. It is designed for nontechnical users as well as developers and keeps you in control of the search scope, proxy choice, and output.\n\nIf you have not installed it yet:\n\n```bash\nnpx skills add gosom/google-maps-scraper\n```\n\nThen just ask your agent:\n\n> Find me all dentists in Berlin with their emails\n\nThe agent will:\n\n1. Noninteractively check for the latest skill and Docker image.\n2. Infer sensible search defaults and ask only for missing essentials.\n3. Let you use your own proxy, continue without one, or choose from three randomly selected proxy sponsors.\n4. Collect proxy credentials through a masked local terminal prompt instead of chat.\n5. Run a small validation scrape before the full job.\n6. Start and monitor the Docker crawl in the background.\n7. Present the results with options to save, filter, analyze, or export.\n\nProxy sponsor recommendations are clearly disclosed and shown with equal placement. Any discount or offer is displayed only when it is configured in the skill's [active sponsor registry](skills/google-maps-scraper/references/proxy-sponsors.json). You can always use another provider or no proxy.\n\nRequires Docker and Node.js on macOS, Linux, or Windows through WSL. See the [skill definition](skills/google-maps-scraper/SKILL.md) for details.\n\n---\n\n## Installation\n\n### Using Docker (Recommended)\n\nThe published Docker image uses Playwright:\n\n```bash\ndocker pull gosom/google-maps-scraper\n```\n\n### Build from Source\n\nRequirements: Go 1.26.6+\n\n```bash\ngit clone https://github.com/gosom/google-maps-scraper.git\ncd google-maps-scraper\ngo mod download\n\ngo build\n./google-maps-scraper -input example-queries.txt -results results.csv -exit-on-inactivity 3m\n```\n\n> First run downloads required browser libraries for Playwright.\n\n---\n\n## Features\n\n| Feature | Description |\n|---------|-------------|\n| **33+ Data Points** | Business name, address, phone, website, reviews, coordinates, and more |\n| **Email Extraction** | Optional crawling of business websites for email addresses |\n| **Multiple Output Formats** | CSV, JSON, PostgreSQL, S3, LeadsDB, or custom plugins |\n| **Proxy Support** | SOCKS5, HTTP, HTTPS with authentication |\n| **Scalable Architecture** | Single machine to Kubernetes cluster |\n| **REST API** | Programmatic control for automation |\n| **Web UI** | User-friendly browser interface |\n| **Fast Mode (Beta)** | Quick extraction of up to 21 results per query |\n| **AWS Lambda** | Serverless execution support (experimental) |\n\n---\n\n## Extracted Data Points\n\n<details>\n<summary><strong>Click to expand all 36 data points</strong></summary>\n\n| # | Field | Description |\n|---|-------|-------------|\n| 1 | `input_id` | Internal identifier for the input query |\n| 2 | `link` | Direct URL to the Google Maps listing |\n| 3 | `title` | Business name |\n| 4 | `category` | Business type (e.g., Restaurant, Hotel) |\n| 5 | `address` | Street address |\n| 6 | `open_hours` | Operating hours |\n| 7 | `popular_times` | Visitor traffic patterns |\n| 8 | `website` | Official business website |\n| 9 | `phone` | Contact phone number |\n| 10 | `plus_code` | Location shortcode |\n| 11 | `review_count` | Total number of reviews |\n| 12 | `review_rating` | Average star rating |\n| 13 | `reviews_per_rating` | Breakdown by star rating |\n| 14 | `latitude` | GPS latitude |\n| 15 | `longitude` | GPS longitude |\n| 16 | `cid` | Google's unique Customer ID |\n| 17 | `status` | Business status (open/closed/temporary) |\n| 18 | `descriptions` | Business description |\n| 19 | `reviews_link` | Direct link to reviews |\n| 20 | `thumbnail` | Thumbnail image URL |\n| 21 | `timezone` | Business timezone |\n| 22 | `price_range` | Price level ($, $$, $$$) |\n| 23 | `data_id` | Internal Google Maps identifier |\n| 24 | `street_view_url` | Street View URL |\n| 25 | `place_id` | Google's unique place id |\n| 26 | `images` | Associated image URLs |\n| 27 | `reservations` | Reservation booking link |\n| 28 | `order_online` | Online ordering link |\n| 29 | `menu` | Menu link |\n| 30 | `owner` | Owner-claimed status |\n| 31 | `complete_address` | Full formatted address |\n| 32 | `credit_cards_accepted` | Accepted credit card networks |\n| 33 | `about` | Additional business info |\n| 34 | `user_reviews` | Customer reviews (text, rating, timestamp) |\n| 35 | `user_reviews_extended` | Extended reviews up to ~300 (requires `-extra-reviews`) |\n| 36 | `emails` | Extracted email addresses (requires `-email` flag) |\n\n</details>\n\n**Custom Input IDs:** Define your own IDs in the input file:\n```\nMatsuhisa Athens #!#MyCustomID\n```\n\n**Direct Google Maps URLs:** Input lines can be regular search queries or direct Google Maps URLs. Supported URL formats include:\n\n```text\nhttps://www.google.com/maps/search/pizza\nhttps://www.google.com/maps/place/Empire+State+Building/@40.7484405,-73.9856632\nhttps://maps.google.com/maps?z=16&q=Empire+State+Building\nmaps.app.goo.gl/abc123\n```\n\nURLs on `google.com` subdomains must include a scheme (`http://` or `https://`) and a `/maps` path. Short `maps.app.goo.gl` links are also supported without a scheme.\n\n---\n\n## Configuration\n\n### Command Line Options\n\n```\nUsage: google-maps-scraper [options]\n\nCore Options:\n  -input string       Path to input file with queries (one per line)\n  -results string     Output file path (default: stdout)\n  -json              Output JSON instead of CSV\n  -depth int         Max scroll depth in results (default: 10)\n  -c int             Concurrency level (default: half of CPU cores)\n\nEmail & Reviews:\n  -email             Extract emails from business websites\n  -extra-reviews     Collect extended reviews (up to ~300)\n\nLocation Settings:\n  -lang string       Language code, e.g., 'de' for German (default: \"en\")\n  -geo string        Coordinates for search, e.g., '37.7749,-122.4194'\n  -zoom int          Zoom level 0-21 (default: 15)\n  -radius float      Search radius in meters (default: 10000)\n  -grid-bbox string  Bounding box for grid scraping, format: \"minLat,minLon,maxLat,maxLon\"\n  -grid-cell float   Grid cell size in km (default: 1.0, used with -grid-bbox)\n\nWeb Server:\n  -web               Run web server mode\n  -addr string       Server address (default: \":8080\")\n  -data-folder       Data folder for web runner (default: \"webdata\")\n\nDatabase:\n  -dsn string        PostgreSQL connection string\n  -produce           Produce seed jobs only (requires -dsn)\n\nProxy:\n  -proxies string    Comma-separated proxy list\n                     Format: protocol://user:pass@host:port\n  -proxies-file      Path to a file containing one proxy URL per line\n\nExport:\n  -leadsdb-api-key   Export directly to LeadsDB (get key at getleadsdb.com)\n\nAdvanced:\n  -exit-on-inactivity duration    Exit after inactivity (e.g., '5m')\n  -fast-mode                      Quick mode with reduced data\n  -debug                          Show browser window\n  -writer string                  Custom writer plugin (format: 'dir:pluginName')\n  -browser-pool-size int          Number of browser processes to launch (default: 0, derived from -c and -pages-per-browser)\n  -pages-per-browser int          Max concurrent pages per browser process (default: 1)\n\nNotes:\n  -grid-bbox requires a valid zoom level (1-21)\n  -fast-mode cannot be used together with -grid-bbox\n```\n\nRun `./google-maps-scraper -h` for the complete list.\n\n### Using Proxies\n\nFor larger scraping jobs, proxies help avoid rate limiting. Here's how to configure them:\n\n```bash\n./google-maps-scraper \\\n  -input queries.txt \\\n  -results results.csv \\\n  -proxies 'socks5://user:pass@host:port,http://host2:port2' \\\n  -depth 1 -c 2\n```\n\n**Supported protocols:** `socks5`, `socks5h`, `http`, `https`\n\nCurrent proxy sponsors are listed in [Proxy Sponsors](docs/proxies.md). Using those links helps fund project maintenance.\n\n### Email Extraction\n\nEmail extraction is **disabled by default**. When enabled, the scraper visits each business website to find email addresses.\n\n```bash\n./google-maps-scraper -input queries.txt -results results.csv -email\n```\n\n> **Note:** Email extraction increases processing time significantly.\n\n### Fast Mode\n\nFast mode returns up to 21 results per query, ordered by distance. Useful for quick data collection with basic fields.\n\n```bash\n./google-maps-scraper \\\n  -input queries.txt \\\n  -results results.csv \\\n  -fast-mode \\\n  -zoom 15 \\\n  -radius 5000 \\\n  -geo '37.7749,-122.4194'\n```\n\n> **Warning:** Fast mode is in Beta. You may experience blocking.\n\n### Grid Scraping (BBox)\n\nGrid mode splits a bounding box into cells and runs one search per cell. This is useful when a single search does not return enough places.\n\n`queries.txt` example:\n\n```text\ncafes in Peristeri, Greece\n```\n\nCommand example:\n\n```bash\n./google-maps-scraper \\\n  -input queries.txt \\\n  -results peristeri-cafes.csv \\\n  -grid-bbox \"38.0077,23.6719,38.0257,23.6947\" \\\n  -grid-cell 0.5 \\\n  -zoom 16 \\\n  -depth 1 \\\n  -c 4\n```\n\nNotes:\n- `-grid-bbox` guides where searches are launched from, but results are not strictly clipped to the box.\n- For strict distance filtering, use `-fast-mode` with `-geo` + `-radius` (or post-filter by latitude/longitude).\n\n---\n\n### Browser Page Concurrency\n\nWith the default `-pages-per-browser 1`, each concurrent job (`-c`) effectively uses its own browser process with a single page tab. This can be inefficient because browser pages can be CPU- and memory-heavy, and each browser process adds overhead.\n\nThe `-pages-per-browser` flag lets you run multiple page tabs inside the same browser process, reducing overhead. Leave `-browser-pool-size` at `0` to derive the browser count from concurrency and pages per browser, or set it explicitly to cap the number of browser processes independently of concurrency.\n\n**How the flags interact:**\n\n| Flag | What it controls |\n|------|------------------|\n| `-c` | Total number of concurrent scrape jobs |\n| `-browser-pool-size` | Number of browser processes to launch (default: `0`, derived from `-c` and `-pages-per-browser`) |\n| `-pages-per-browser` | Number of page tabs per browser process (default: 1) |\n\nWhen `-pages-per-browser` is greater than 1, the scraper opens multiple tabs within each browser process and routes jobs through a shared page pool. This can significantly increase job throughput on the same hardware.\n\n**Example — 8 concurrent jobs across 2 browsers with 4 tabs each:**\n\n```bash\n./google-maps-scraper \\\n  -c 8 \\\n  -browser-pool-size 2 \\\n  -pages-per-browser 4 \\\n  -input queries.txt \\\n  -results results.csv \\\n  -depth 1\n```\n\n**Tuning guidance:**\n\n- Start with `-c 4 -browser-pool-size 1 -pages-per-browser 4` for a 4:1 page-to-browser ratio.\n- Monitor CPU and RAM usage with `htop` or `docker stats`; browser resource use varies significantly by workload, Chromium version, and page count.\n- If memory is the bottleneck, keep `-browser-pool-size` low and reduce `-c` or `-pages-per-browser`.\n- If CPU is the bottleneck, reduce the total number of active pages by lowering `-c` or `-pages-per-browser`.\n- The product `-browser-pool-size × -pages-per-browser` should roughly equal or exceed `-c` to keep all jobs busy.\n- Setting an explicit `-browser-pool-size` is most useful in containerized environments (Docker, Kubernetes) where you want predictable resource usage.\n\n---\n\n## Export to LeadsDB\n\nSkip the CSV files and send leads directly to a managed database. [LeadsDB](https://getleadsdb.com/) handles deduplication, filtering, and provides an API for your applications.\n\n**Using Docker:**\n```bash\ndocker run \\\n  -v gmaps-playwright-cache:/opt \\\n  -v \"$PWD/example-queries.txt:/queries.txt:ro\" \\\n  gosom/google-maps-scraper \\\n  -input /queries.txt \\\n  -depth 1 \\\n  -leadsdb-api-key \"your-api-key\" \\\n  -exit-on-inactivity 3m\n```\n\n**Using binary:**\n```bash\n./google-maps-scraper \\\n  -input queries.txt \\\n  -leadsdb-api-key \"your-api-key\" \\\n  -exit-on-inactivity 3m\n```\n\nOr via environment variable:\n```bash\nexport LEADSDB_API_KEY=\"your-api-key\"\n./google-maps-scraper -input queries.txt -exit-on-inactivity 3m\n```\n\n<details>\n<summary><strong>Field Mapping</strong></summary>\n\n| Google Maps | LeadsDB |\n|-------------|---------|\n| Title | Name |\n| Category | Category |\n| Categories | Tags |\n| Phone | Phone |\n| Website | Website |\n| Address | Address, City, State, Country, PostalCode |\n| Latitude/Longitude | Coordinates |\n| Review Rating | Rating |\n| Review Count | ReviewCount |\n| Emails | Email |\n| Thumbnail | LogoURL |\n| CID | SourceID |\n\nAdditional fields (Google Maps link, plus code, price range, etc.) are stored as custom attributes.\n\n</details>\n\nGet your API key at [getleadsdb.com/settings](https://getleadsdb.com/settings) after signing up.\n\n---\n\n## Advanced Usage\n\n### PostgreSQL Database Provider\n\nFor distributed scraping across multiple machines:\n\n**1. Start PostgreSQL:**\n```bash\ndocker-compose -f docker-compose.dev.yaml up -d\n```\n\n**2. Seed the jobs:**\n```bash\n./google-maps-scraper \\\n  -dsn \"postgres://postgres:postgres@localhost:5432/postgres\" \\\n  -produce \\\n  -input example-queries.txt \\\n  -lang en\n```\n\n**3. Run scrapers (on multiple machines):**\n```bash\n./google-maps-scraper \\\n  -c 2 \\\n  -depth 1 \\\n  -dsn \"postgres://postgres:postgres@localhost:5432/postgres\"\n```\n\n### Kubernetes Deployment\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: google-maps-scraper\nspec:\n  replicas: 3  # Adjust based on needs\n  selector:\n    matchLabels:\n      app: google-maps-scraper\n  template:\n    metadata:\n      labels:\n        app: google-maps-scraper\n    spec:\n      containers:\n      - name: google-maps-scraper\n        image: gosom/google-maps-scraper:latest\n        args: [\"-c\", \"1\", \"-depth\", \"10\", \"-dsn\", \"postgres://user:pass@host:5432/db\"]\n        resources:\n          requests:\n            memory: \"512Mi\"\n            cpu: \"500m\"\n```\n\n> **Note:** The headless browser requires significant CPU/memory resources.\n\n### Custom Writer Plugins\n\nCreate custom output handlers using Go plugins:\n\n**1. Write the plugin** (see `examples/plugins/example_writer.go`)\n\n**2. Build:**\n```bash\ngo build -buildmode=plugin -tags=plugin -o myplugin.so myplugin.go\n```\n\n**3. Run:**\n```bash\n./google-maps-scraper -writer ~/plugins:MyWriter -input queries.txt\n```\n\n---\n\n## Performance\n\n**Expected throughput:** ~120 places/minute (with `-c 8 -depth 1`)\n\n| Keywords | Results/Keyword | Total Jobs | Estimated Time |\n|----------|-----------------|------------|----------------|\n| 100 | 16 | 1,600 | ~13 minutes |\n| 1,000 | 16 | 16,000 | ~2.5 hours |\n| 10,000 | 16 | 160,000 | ~22 hours |\n\nFor large-scale scraping, use the PostgreSQL provider with Kubernetes.\n\n### Telemetry\n\nAnonymous usage statistics are collected for improvement purposes. Opt out:\n```bash\nexport DISABLE_TELEMETRY=1\n```\n\n---\n\n## Support the Project\n\nThis project is free and open source. Stars, sponsorships, and sponsor referrals help fund maintenance.\n\n- Star the repository: [github.com/gosom/google-maps-scraper](https://github.com/gosom/google-maps-scraper)\n- Sponsor development: [GitHub Sponsors](https://github.com/sponsors/gosom)\n- Need proxies? See [Proxy Sponsors](docs/proxies.md)\n- Deploying the self-hosted platform? See [SaaS deployment options](docs/saas.md)\n- Managing scraped leads? See [LeadsDB](https://getleadsdb.com/)\n\n---\n\n## Community\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20Our%20Server-7289DA?logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/fpaAVhNCCu)\n\nJoin our Discord to:\n- Get help with setup and configuration\n- Share your use cases and success stories\n- Request features and report bugs\n- Connect with other users\n\n---\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Open an issue to discuss your idea\n2. Fork the repository\n3. Create a pull request\n\nSee [AGENTS.md](AGENTS.md) for development guidelines.\n\n---\n\n## References\n\n- [How to Extract Data from Google Maps Using Golang](https://blog.gkomninos.com/how-to-extract-data-from-google-maps-using-golang)\n- [Distributed Google Maps Scraping](https://blog.gkomninos.com/distributed-google-maps-scraping)\n- [Deploy your own Maps scraping API in 5 minutes (includes video walkthrough)](https://gosom.dev/deploy-your-own-maps-scraping-api-in-5-minutes/)\n- [Video walkthrough (YouTube)](https://www.youtube.com/watch?v=STG9mZw_nac)\n- [scrapemate](https://github.com/gosom/scrapemate) - The underlying web crawling framework\n- [omkarcloud/google-maps-scraper](https://github.com/omkarcloud/google-maps-scraper) - Inspiration for JS data extraction\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## Star History\n\n<a href=\"https://www.star-history.com/?repos=gosom%2Fgoogle-maps-scraper&type=date&legend=top-left\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=gosom/google-maps-scraper&type=date&theme=dark&legend=top-left&sealed_token=Yr-6oa5yTlmDhKxqKB2hmq1BmacSXwVftAnHxVCYmn7c4GiYaBtbLGZIZufr71ZfE4jkDpnt75NiAK4fBXP9FPuusVh3L0ofCigowkfI_OxlShvmkys9esorL4X5DRFPCCEVfdt0P0PV-52Qq61fiZSVkUKRjWYT8lhKUkwcXeCH8H8aIbc9NiLItTXz\" />\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=gosom/google-maps-scraper&type=date&legend=top-left&sealed_token=Yr-6oa5yTlmDhKxqKB2hmq1BmacSXwVftAnHxVCYmn7c4GiYaBtbLGZIZufr71ZfE4jkDpnt75NiAK4fBXP9FPuusVh3L0ofCigowkfI_OxlShvmkys9esorL4X5DRFPCCEVfdt0P0PV-52Qq61fiZSVkUKRjWYT8lhKUkwcXeCH8H8aIbc9NiLItTXz\" />\n   <img alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=gosom/google-maps-scraper&type=date&legend=top-left&sealed_token=Yr-6oa5yTlmDhKxqKB2hmq1BmacSXwVftAnHxVCYmn7c4GiYaBtbLGZIZufr71ZfE4jkDpnt75NiAK4fBXP9FPuusVh3L0ofCigowkfI_OxlShvmkys9esorL4X5DRFPCCEVfdt0P0PV-52Qq61fiZSVkUKRjWYT8lhKUkwcXeCH8H8aIbc9NiLItTXz\" />\n </picture>\n</a>\n\n---\n\n## Legal Notice\n\nPlease use this scraper responsibly and in accordance with applicable laws and regulations. Unauthorized scraping may violate terms of service.\n\n---\n\n<p align=\"center\">\n  <sub>Banner generated using OpenAI's DALL-E</sub>\n</p>\n\n<p align=\"center\">\n  <sub><strong>SPONSOR DISCLAIMER:</strong> Sponsor listings and referral links do not constitute an endorsement. This project and its maintainers are not responsible for sponsors' products, services, representations, conduct, or any resulting loss or damage. Users engage with sponsors at their own risk.</sub>\n</p>\n",
  "bytes": 34677,
  "sha": "2dc658cc7da8719119085a8ecff7dc78529684ceea640e6cd5fb229690eb29aa",
  "repo_slug": "gosom/google-maps-scraper",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_gosom_google_maps_scraper_google_maps_sc_df63c1d3/readme"
}