Spaces:
Sleeping
Sleeping
|
Download README.md from bugrahans/google-maps-leads-scraper: direct link, hf CLI and curl.
- Browser
- Download file 4.4 kB
-
https://huggingface.co/spaces/bugrahans/google-maps-leads-scraper/resolve/main/README.md
- Command line
-
hf download hf://spaces/bugrahans/google-maps-leads-scraper/README.md
-
curl -L -o README.md https://huggingface.co/spaces/bugrahans/google-maps-leads-scraper/resolve/main/README.md
4.4 kB
| title: Google Maps Leads Scraper | |
| short_description: Google Maps businesses, place details and reviews as data | |
| emoji: 📍 | |
| colorFrom: blue | |
| colorTo: gray | |
| sdk: gradio | |
| sdk_version: 6.0.2 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| tags: | |
| - google-maps | |
| - google-maps-scraper | |
| - lead-generation | |
| - local-business | |
| - reviews | |
| - places | |
| - web-scraping | |
| - scraper | |
| - data-extraction | |
| - smolagents | |
| - tool | |
| - scrape.do | |
| # Google Maps Leads Scraper — Powered by Scrape.do | |
| Search Google Maps for a category around any point and get every business as a lead: name, category, | |
| rating, review count, phone, website, address, coordinates, opening hours and place ID. Open any place for | |
| its plus code, rating breakdown and attributes, and pull its reviews with owner replies. Everything downloads | |
| as CSV or JSON. | |
| ## 🔑 Get your free API token | |
| 👉 **[Sign up free on Scrape.do](https://dashboard.scrape.do/sign-up?utm_source=huggingface&utm_medium=google-maps-leads-scraper)** — 1,000 free credits per month, no credit card required. Every call costs 10 credits. | |
| ## Three tabs | |
| | Tab | Input | Output | | |
| |---|---|---| | |
| | **Search** | A query (`dentist`, `coffee shop in Austin, TX`), an optional `lat,lng` centre, a page (1-6) | 20 places per page with contact details, rating, hours and IDs. Cards, a table and a CSV. | | |
| | **Place** | A place ID (`ChIJ...`), CID, feature ID (`0x...:0x...`) or Google Maps place link | Full details: categories, plus code, coordinates, weekly hours, rating breakdown, attributes | | |
| | **Reviews** | A place ID or feature ID, an order, a number of pages | About 10 reviews per page: rating, date, text, author, Local Guide flag, owner reply, plus Google's review topics | | |
| ## Why an API instead of requesting google.com/maps | |
| Google Maps is a JavaScript app: the HTML has no business data. The endpoints the app calls answer in a nested | |
| protobuf-over-JSON array with an anti-XSSI prefix and no field names, and scripts that send many requests get | |
| consent walls, CAPTCHAs and rate limits. The [Scrape.do](https://scrape.do/?utm_source=huggingface&utm_medium=google-maps-leads-scraper) | |
| Google Maps API makes each request from a residential IP and returns parsed JSON (`local_results`, `place_results`, `reviews`). | |
| Good to know: | |
| - **One query stops at about 120 places** (6 pages of 20). In a test, "coffee shop" around downtown Austin returned 104 places in 6 calls (60 credits): 77 with a phone, 96 with a website. To cover a city, repeat the search around other points. | |
| - **`place_id` feeds the place lookup, `data_id` feeds reviews.** Both come back with every search result. | |
| - **Reviews paginate with a token**, about 10 at a time, newest first by default. | |
| ## Use as a smolagents Tool | |
| ```python | |
| from smolagents import CodeAgent, InferenceClientModel | |
| from tool import ScrapeDoGoogleMapsTool | |
| agent = CodeAgent( | |
| tools=[ScrapeDoGoogleMapsTool(api_token="YOUR_SCRAPEDO_TOKEN")], | |
| model=InferenceClientModel(), | |
| ) | |
| agent.run("Find dentists around 30.2672,-97.7431 on Google Maps and list the ones without a website.") | |
| ``` | |
| You can also set `SCRAPE_DO_API_TOKEN` in your environment and instantiate `ScrapeDoGoogleMapsTool()` with no arguments. | |
| ## Inputs | |
| - `mode` *(required)* — `search`, `place` or `reviews`. | |
| - `query` *(required)* — Search terms for `search`; a place ID, CID, feature ID or Maps link for `place` and `reviews`. | |
| - `location` *(optional)* — `lat,lng` centre for `search`. | |
| - `page` *(optional)* — Result page (1-6) for `search`; number of review pages for `reviews`. | |
| - `sort_by` *(optional)* — For `reviews`: `newest`, `most_relevant`, `highest_rating` or `lowest_rating`. | |
| ## Responsible use | |
| Business listings are public, but reviews include the names of the people who wrote them. Store only what you | |
| need, follow the privacy rules that apply to you (GDPR, CCPA), and respect opt-outs before contacting anyone. | |
| --- | |
| Prefer plain Python? `pip install google-maps-leads-scraper` ([GitHub](https://github.com/bugrahansss/google-maps-leads-scraper)) · No-code: [Apify actor](https://apify.com/scrapedo/google-maps-leads-scraper) · Guide: [Google Maps Scraper: How to Scrape Google Maps for Leads](https://scrape.do/blog/google-maps-scraping/?utm_source=huggingface&utm_medium=google-maps-leads-scraper) · [scrape.do](https://scrape.do/?utm_source=huggingface&utm_medium=google-maps-leads-scraper) · [Documentation](https://scrape.do/documentation/) | |