Skip to content

Free, open-source Google Maps scraper for lead generation (Python, no API key, no Docker). Exports name, phone, email, website, rating and Instagram/Facebook/LinkedIn/TikTok/YouTube/X links to CSV. 100 places with emails in 44 s; --grid beats Google's 120 cap. MX email check, ad-pixel detection. Skill for Claude Code, Codex and Cursor.

feat(ui): What also offers Google's 4,053 category names, after the kit's 201 popular types

Mahan Jafaric498048daba5
diff --git a/CREDITS.md b/CREDITS.md
index 2d8ff2c..24e898b 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -33,7 +33,12 @@ people (name, region, country, coordinates), from the [GeoNames](https://www.geo
`cities1000` dump, licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
`engine/presets/cities.tsv.gz` is that data, cut to those five fields, one row per city label.
-The What box's business types (`engine/presets/business-types.json`) are a hand-picked list for this kit.
+The What box offers a hand-picked list of popular business types for this kit
+(`engine/presets/business-types.json`), then Google's business category names (4,053, US English)
+from [lobstrio/google-business-categories](https://github.com/lobstrio/google-business-categories)
+by lobstr.io. Your browser loads that list from GitHub at runtime, pinned to one commit in
+`engine/serve.py`, and caches it for 30 days. This repository does not contain or redistribute it,
+because that repository has no license file. Offline, the box offers the kit's own list only.
## Website signals adapted from OpenLeadFinder
diff --git a/README.md b/README.md
index c7c72b9..e3666cc 100644
--- a/README.md
+++ b/README.md
@@ -237,12 +237,14 @@ One keyword per line. One job. One CSV.
CSV, JSON and Delete buttons. Downloads are named after the search, for example
`bakery-in-portland-or-c063a815.csv`. It downloads the raw CSV or JSON, and its email and
social options read homepages only, so the scripts find more emails and return the clean lead
- fields. Its What and Where boxes take only picks from their lists: about 200 business types
- (`engine/presets/business-types.json`, add a niche there) and about 168,000 cities from GeoNames,
- so a search never names a place that does not exist. Each type is searched in each city, one
- job per city, with the map centred on that city. The page loads one static file from GitHub
+ fields. Its What and Where boxes take only picks from their lists: about 4,100 business types
+ (the kit's 201 popular ones in `engine/presets/business-types.json`, add a niche there, then
+ Google's own category names) and about 168,000 cities from GeoNames, so a search never names a
+ place or a type that does not exist. Each type is searched in each city, one job per city, with
+ the map centred on that city. The page loads two static files from GitHub
(`raw.githubusercontent.com`), with no tracking: the sponsor box's
- `assets/sponsors/sponsors.json` from this repo (cached for a day). Scraped data stays on your machine.
+ `assets/sponsors/sponsors.json` from this repo (cached for a day), and Google's category names
+ for the What box (cached for 30 days). Scraped data stays on your machine.
- **Service-area businesses often have no address.** Plumbers, cleaners and other mobile services
often hide their street address on Google, so `address` is empty for them. The city and the phone
usually remain.
diff --git a/SETUP.md b/SETUP.md
index 1f9522a..562b544 100644
--- a/SETUP.md
+++ b/SETUP.md
@@ -110,7 +110,8 @@ web UI and API docs in the browser:
http://localhost:8080/api/openapi.json). Neither needs the API key.
The page has a form. Up front are "What" and "Where": type a few letters, then pick a business type
-(about 200, such as "Dentists") and a city (about 168,000 from GeoNames, such as "Austin, Texas, US").
+(about 4,100: the kit's 201 popular ones, such as "Dentists", then Google's own category names, which
+the page loads from GitHub) and a city (about 168,000 from GeoNames, such as "Austin, Texas, US").
Both boxes take only picks from their lists, so a search never names a place or a type that does not
exist; add as many of each as you like. Each type is searched in each city, one job per city, with the
map centred on that city ("Dentists in Austin, Texas, US"). Pressing Enter in either box adds the pick
diff --git a/engine/serve.py b/engine/serve.py
index 696bb33..82a1471 100644
--- a/engine/serve.py
+++ b/engine/serve.py
@@ -37,6 +37,11 @@ SPONSORS = "https://raw.githubusercontent.com/Mahanaicoach/google-maps-scraper-k
# The web UI's What and Where boxes offer only these, so nobody searches for a business type or a
# place that does not exist: presets/business-types.json (hand-picked; add a niche there) and
# presets/cities.tsv.gz (GeoNames cities1000, CC BY 4.0: name, region, country code, lat, lon, biggest first).
+# What also offers Google Business Profile's category names (4,053, US English) from
+# lobstrio/google-business-categories, pinned to one commit. The browser loads that list from GitHub,
+# like the sponsor box; the kit ships no copy, because that repository has no licence file.
+CATEGORIES = ("https://raw.githubusercontent.com/lobstrio/google-business-categories/"
+ "4ee1c4788d07c812a32986177c2a51c28957062f/data/google-business-categories.txt")
PRESETS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "presets")
with open(os.path.join(PRESETS, "business-types.json"), encoding="utf-8") as _f:
TYPES = json.load(_f)
@@ -498,8 +503,28 @@ function combo(input, box, source, choose) {{ // a box that takes only picks fr
}} else if (ev.key === 'Escape') show([]);
}});
}}
-combo($('what'), $('what-opts'), (q, show) => show(TYPES.filter(t => t.toLowerCase().includes(q.toLowerCase())).map(t => ({{label: t}}))),
- t => {{ if (!whats.includes(t.label)) whats.push(t.label); tags($('whats'), whats); }});
+combo($('what'), $('what-opts'), (q, show) => {{ // names that start with q first, then the rest; 50 at most
+ q = q.toLowerCase();
+ const hit = TYPES.filter(t => t.toLowerCase().includes(q)), first = hit.filter(t => t.toLowerCase().startsWith(q));
+ show(first.concat(hit.filter(t => !first.includes(t))).slice(0, 50).map(t => ({{label: t}})));
+}}, t => {{ if (!whats.includes(t.label)) whats.push(t.label); tags($('whats'), whats); }});
+(function () {{ // What also offers Google's own category names, cached for 30 days, as text only
+ const key = 'gmskit-categories', month = 30 * 86400000, base = s => s.toLowerCase().replace(/s$/, '');
+ function add(names) {{ // after the kit's own list; "Dentist" is dropped when "Dentists" is there
+ const have = new Set(TYPES.map(base));
+ for (const n of names) if (!have.has(base(n))) {{ have.add(base(n)); TYPES.push(n); }}
+ }}
+ try {{
+ const c = JSON.parse(localStorage.getItem(key) || 'null');
+ if (c && Date.now() - c.t < month && Array.isArray(c.names)) return add(c.names);
+ }} catch (e) {{}}
+ fetch('{categories}', {{credentials: 'omit'}}).then(r => r.ok ? r.text() : '').then(t => {{
+ const names = t.split('\\n').map(s => s.trim()).filter(s => s && s.length <= 80).slice(0, 5000);
+ if (!names.length) return;
+ add(names);
+ try {{ localStorage.setItem(key, JSON.stringify({{t: Date.now(), names}})); }} catch (e) {{}}
+ }}).catch(() => {{}});
+}})();
let timer = 0;
combo($('where'), $('where-opts'), (q, show) => {{ // the biggest cities that start with q; nothing typed, the biggest US ones
clearTimeout(timer);
@@ -699,7 +724,8 @@ class Handler(BaseHTTPRequestHandler):
"connect-src 'self' https://raw.githubusercontent.com; img-src 'self' data:; "
"form-action 'self'; base-uri 'none'; "
"frame-ancestors 'none'")
- page = PAGE.format(nonce=nonce, version=VERSION, repo=REPO, sponsors=SPONSORS, types=TYPES_JS).encode()
+ page = PAGE.format(nonce=nonce, version=VERSION, repo=REPO, sponsors=SPONSORS, types=TYPES_JS,
+ categories=CATEGORIES).encode()
return self.reply(200, page, "text/html; charset=utf-8", [("Content-Security-Policy", csp)])
self.fail(404, "not found")
diff --git a/engine/test_engine.py b/engine/test_engine.py
index 49e5d4d..a25de61 100644
--- a/engine/test_engine.py
+++ b/engine/test_engine.py
@@ -1239,7 +1239,9 @@ class ApiP3(Server):
self.assertIn('id="country"', ui)
self.assertIn('<input id="what" role="combobox"', ui)
self.assertIn('<input id="where" role="combobox"', ui)
- self.assertIn("const TYPES = " + json.dumps(serve.TYPES) + ";", ui) # the What list is in the page, no download
+ self.assertIn("const TYPES = " + json.dumps(serve.TYPES) + ";", ui) # the kit's own types work offline
+ self.assertIn(serve.CATEGORIES, ui) # Google's category names: loaded by the browser from GitHub, pinned
+ self.assertRegex(serve.CATEGORIES, r"/[0-9a-f]{40}/")
front = ui.split("<details>")[0] # what a beginner sees before opening a section
self.assertIn('<input type="checkbox" id="email" checked>', front)
self.assertIn('<input type="checkbox" id="socials" checked>', front) # socials on by default
@@ -1256,7 +1258,7 @@ class ApiP3(Server):
"is not in the list", "is not picked yet", "whats.map(w => w + ' in ' + c.label)",
"lat: c.lat, lon: c.lon", "for (const c of wheres)", "'/api/v1/cities?q=' + encodeURIComponent(q)"):
self.assertIn(rule, ui)
- for gone in ('id="keywords"', 'id="coords"', 'id="kwpick"', "<datalist", "Start anyway", "raw.githubusercontent.com/lobstrio"):
+ for gone in ('id="keywords"', 'id="coords"', 'id="kwpick"', "<datalist", "Start anyway"):
self.assertNotIn(gone, ui)
self.assertIn("a.download = fileName(j) + '.' + fmt", ui)
self.assertIn("toLocaleString", ui)