Spaces:
Sleeping
Sleeping
|
Download README.md from bugrahans/google-maps-scraper: direct link, hf CLI and curl.
- Browser
- Download file 3.84 kB
-
https://huggingface.co/spaces/bugrahans/google-maps-scraper/resolve/main/README.md
- Command line
-
hf download hf://spaces/bugrahans/google-maps-scraper/README.md
-
curl -L -o README.md https://huggingface.co/spaces/bugrahans/google-maps-scraper/resolve/main/README.md
3.84 kB
| title: Google Maps Scraper | |
| short_description: Google Maps businesses, details and reviews as CSV/JSON | |
| emoji: 📍 | |
| colorFrom: red | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 6.0.2 | |
| app_file: app.py | |
| pinned: false | |
| tags: | |
| - google-maps | |
| - google-maps-scraper | |
| - google-places | |
| - local-business | |
| - lead-generation | |
| - reviews | |
| - google-reviews | |
| - web-scraping | |
| - scraper | |
| - data-extraction | |
| - smolagents | |
| - tool | |
| - scrape.do | |
| # Google Maps Scraper — Powered by Scrape.do | |
| Search Google Maps the way you normally would ("dentists in Kadıköy, Istanbul") | |
| and get every business back as a clean list: name, category, rating, review | |
| count, phone number, website, address, opening hours and GPS coordinates. | |
| Download it as CSV, then open any place for its full profile and its reviews. | |
| ## 🔑 Get your free API token | |
| 👉 **[Sign up free on Scrape.do](https://dashboard.scrape.do/sign-up?utm_source=huggingface&utm_medium=google-maps-scraper)** — 1,000 free credits per month, no credit card required. Every Google Maps call costs 10 credits, so that's about 100 calls. | |
| ## Three tabs | |
| | Tab | Input | Output | | |
| | --- | --- | --- | | |
| | **Find businesses** | A search, e.g. `coffee shops in Austin TX` | Up to 120 places (20 per page) as cards, a table and a CSV lead list | | |
| | **Place details** | A Google Maps link, place ID or business name | Hours, rating breakdown, popular times, service options, photos, menu and review highlights | | |
| | **Reviews** | A Google Maps link, place ID or business name | Up to 100 reviews, sortable by newest or rating, filterable by keyword, with owner replies and a CSV | | |
| Any place from the search results can be sent to the other two tabs with one | |
| click. All three tabs work in 14 countries, each with its own Google domain and | |
| language. | |
| ## What you can paste | |
| The Details and Reviews tabs accept whatever you have: | |
| - a full Google Maps link, or a short `maps.app.goo.gl` share link | |
| - a place ID (`ChIJ…`), a data ID (`0x…:0x…`) or a numeric CID | |
| - just the business name, e.g. `Joe's Pizza Carmine St New York` (costs one extra search to find it) | |
| ## Why an API instead of a headless browser | |
| Google Maps is a heavy JavaScript app that blocks automated browsers quickly and | |
| changes its page code often. This Space uses the | |
| [Scrape.do Google Maps API](https://scrape.do/documentation/google-scraper-api/maps/), | |
| which handles proxies and CAPTCHAs and returns the same field names whatever | |
| Google changes. | |
| ## 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("List the 10 best-rated coffee shops in Kadikoy, Istanbul that have a website, with their phone numbers.") | |
| ``` | |
| 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)* — For `search`: what to look for. For `place` and `reviews`: a Google Maps link, place ID, data ID, CID or business name. | |
| - `country` *(optional)* — Two-letter code (`us`, `gb`, `de`, `tr`…). Defaults to `us`. | |
| - `pages` *(optional, search)* — 1–6 pages of 20 places. 10 credits each. | |
| - `location` *(optional, search)* — Map center as `latitude,longitude`, e.g. `41.0082,28.9784`. | |
| - `max_reviews` *(optional, reviews)* — 1–100. Up to 20 per 10-credit call. | |
| - `sort_by` *(optional, reviews)* — `relevance`, `newest`, `highest` or `lowest`. | |
| - `keyword` *(optional, reviews)* — Only reviews that mention this word. | |
| --- | |
| Learn more at [scrape.do](https://scrape.do/) · [Documentation](https://scrape.do/documentation/) · [Google Maps scraping guide](https://scrape.do/blog/google-maps-scraping/) | |