# soclosesociety/googlemapscraper architecture

> Architecture diagram of the GitHub repository soclosesociety/googlemapscraper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/soclosesociety/googlemapscraper
- Repository: https://github.com/soclosesociety/googlemapscraper

## Overview

Google Maps Scraper is a command-line browser-automation tool that turns a Maps query or URL into business-data CSVs. The main workflow resolves input, gathers place links by scrolling results, visits each place to extract details, and saves progress. It also supports links-only output and resuming detail extraction from a links CSV. The README documents headless operation and anti-detection behavior; sampled source shows the browser setup and extraction mechanics. The implementation is concentrated in main.py, so some relationships are supported by README documentation rather than sampled call sites.

Main entry points: [`main.py`](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py) (Collect place links)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["CLI and browser"]
  node_cli["CLI options<br/>[main.py]"]
  node_resolve["Input resolution<br/>[main.py]"]
  node_browser["Chrome driver<br/>[main.py]"]
end

subgraph group_collection["Maps collection"]
  node_collect["Collect place links<br/>[main.py]"]
  node_scroll["Feed scrolling<br/>[main.py]"]
  node_parse["Page parsing<br/>[main.py]"]
  node_extract["Extract place details<br/>[main.py]"]
  node_scrape["Detail scrape loop<br/>[main.py]"]
end

subgraph group_outputs["CSV outputs"]
  node_links_input["Resume links CSV<br/>[main.py]"]
  node_links_output["Links CSV"]
  node_results["Results CSV"]
end

node_user(("CLI user"))
node_maps["Google Maps"]

node_user -->|"provides options"| node_cli
node_cli -->|"selects input"| node_resolve
node_resolve -->|"starts search"| node_collect
node_resolve -->|"selects resume file"| node_links_input
node_cli -->|"configures mode"| node_browser
node_collect -->|"loads search"| node_browser
node_browser -->|"opens pages"| node_maps
node_collect -->|"scrolls feed"| node_scroll
node_collect -->|"parses page source"| node_parse
node_collect -->|"saves links"| node_links_output
node_links_input -->|"supplies links"| node_scrape
node_collect -->|"passes links"| node_scrape
node_scrape -->|"calls per place"| node_extract
node_extract -->|"loads place page"| node_browser
node_extract -->|"reads place details"| node_maps
node_scrape -->|"saves progress"| node_results

click node_cli "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_resolve "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_browser "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_collect "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_scroll "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_parse "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_links_input "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_extract "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"
click node_scrape "https://github.com/soclosesociety/googlemapscraper/blob/main/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_resolve,node_browser,node_user toneBlue
class node_collect,node_scroll,node_parse,node_extract,node_scrape toneAmber
class node_links_input,node_links_output,node_results toneMint
class node_maps toneIndigo
```

## Components

### CLI and browser

- [CLI options](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Input resolution](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Chrome driver](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`

### Maps collection

- [Collect place links](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Feed scrolling](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Page parsing](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Extract place details](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- [Detail scrape loop](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`

### CSV outputs

- [Resume links CSV](https://github.com/soclosesociety/googlemapscraper/blob/main/main.py): `main.py`
- **Links CSV**
- **Results CSV**

### Other components

- **CLI user**
- **Google Maps**

## Connections

- CLI user → CLI options: provides options (evidence: `readme.md`)
- CLI options → Input resolution: selects input (evidence: `main.py`)
- Input resolution → Collect place links: starts search (evidence: `readme.md`)
- Input resolution → Resume links CSV: selects resume file (evidence: `main.py`)
- CLI options → Chrome driver: configures mode (evidence: `readme.md`)
- Collect place links → Chrome driver: loads search (evidence: `main.py`)
- Chrome driver → Google Maps: opens pages (evidence: `readme.md`)
- Collect place links → Feed scrolling: scrolls feed (evidence: `main.py`)
- Collect place links → Page parsing: parses page source (evidence: `main.py`)
- Collect place links → Links CSV: saves links (evidence: `main.py`)
- Resume links CSV → Detail scrape loop: supplies links (evidence: `main.py`)
- Collect place links → Detail scrape loop: passes links (evidence: `readme.md`)
- Detail scrape loop → Extract place details: calls per place (evidence: `main.py`)
- Extract place details → Chrome driver: loads place page (evidence: `main.py`)
- Extract place details → Google Maps: reads place details (evidence: `readme.md`)
- Detail scrape loop → Results CSV: saves progress (evidence: `main.py`)
