{"id":20709911,"url":"https://github.com/oxylabs/google-maps-scraper","last_synced_at":"2025-04-14T02:57:30.664Z","repository":{"id":207718734,"uuid":"670956882","full_name":"oxylabs/google-maps-scraper","owner":"oxylabs","description":"Google Maps Scraper for collecting data from various Google Maps listings, including business profiles.","archived":false,"fork":false,"pushed_at":"2025-04-09T08:47:08.000Z","size":64,"stargazers_count":1494,"open_issues_count":1,"forks_count":23,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-14T02:57:27.166Z","etag":null,"topics":["google-map-scraper","google-maps","google-maps-api","google-maps-data-scraper","google-maps-reviews-scraper-python","google-maps-scrape","google-maps-scraper","google-maps-scraper-python","google-maps-scraping","google-scraper","google-search-scraper","googlemaps-api","googlemaps-scraper","scrap-google","scraping-reviews-from-googlemaps"],"latest_commit_sha":null,"homepage":"https://oxylabs.io/products/scraper-api/serp/google/maps","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxylabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-26T08:07:40.000Z","updated_at":"2025-04-12T23:46:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"e17445a9-35fe-44b6-aab0-69ba220c7999","html_url":"https://github.com/oxylabs/google-maps-scraper","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.5,"last_synced_commit":"bb00f464b3ab1897022cbca5f8a9940b7730e179"},"previous_names":["oxylabs/google-maps-scraper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fgoogle-maps-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fgoogle-maps-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fgoogle-maps-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fgoogle-maps-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxylabs","download_url":"https://codeload.github.com/oxylabs/google-maps-scraper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813786,"owners_count":21165632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-map-scraper","google-maps","google-maps-api","google-maps-data-scraper","google-maps-reviews-scraper-python","google-maps-scrape","google-maps-scraper","google-maps-scraper-python","google-maps-scraping","google-scraper","google-search-scraper","googlemaps-api","googlemaps-scraper","scrap-google","scraping-reviews-from-googlemaps"],"created_at":"2024-11-17T02:08:58.658Z","updated_at":"2025-04-14T02:57:30.653Z","avatar_url":"https://github.com/oxylabs.png","language":"Python","readme":"# Google Maps Scraper\n[![Oxylabs promo code](https://raw.githubusercontent.com/oxylabs/how-to-scrape-google-scholar/refs/heads/main/Google-Scraper-API-1090x275.png)](https://oxylabs.go2cloud.org/aff_c?offer_id=7\u0026aff_id=877\u0026url_id=112)\n\n[![](https://dcbadge.vercel.app/api/server/eWsVUJrnG5)](https://discord.com/invite/Pds3gBmKMH)\n\n- [Google Maps Scraper](#google-maps-scraper)\n  * [Free Google Maps Scraper](#free-google-maps-scraper)\n    + [Prerequisites](#prerequisites)\n    + [Installation](#installation)\n    + [Getting the URL for the Maps page to scrape](#getting-the-url-for-the-maps-page-to-scrape)\n    + [Scraping](#scraping)\n    + [Notes](#notes)\n  * [Oxylabs Google Maps Scraper](#oxylabs-google-maps-scraper)\n  * [How it works](#how-it-works)\n    + [Python code example](#python-code-example)\n    + [Output Example](#output-example)\n      \nIn this tutorial, we'll demonstrate how to extract data from Google Maps. In the first part of the tutorial, we'll use a free tool, built for smaller scale scraping. In the second part, we'll show how to use Oxylabs API for more effective, bigger scale scraping (you can get a free trial [here](https://dashboard.oxylabs.io/en/). \n\n## Free Google Maps Scraper\n\n### Prerequisites\n\nTo run this tool, you need to have Python 3.11 installed in your system.\n\n### Installation\n\nOpen up a terminal window, navigate to this repository and run this command:\n\n`make install`\n\n### Getting the URL for the Maps page to scrape\n\nThis tool is used to scrape Google Maps results from a given search results page.\n\nFirst of all, open up Google Maps and enter something to search for in the `Search` field. \n\nWe'll be searching for restaurants in Manhattan, New York.\n\n\u003cimg width=\"1216\" alt=\"image\" src=\"https://github.com/user-attachments/assets/cb49cafb-9d06-41e2-9320-aad209ea8fdf\"\u003e\n\nAfter pressing enter, copy and save the URL of the page you landed on. We'll be using it in the scraping tool.\n\nIn this example, we'll be using this URL: `https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu`\n\n### Scraping \n\nTo scrape Google Maps results from your provided URL, run this command in your terminal:\n`make scrape URL='\u003curl\u003e'`\n\nWith the URL we retrieved before, the command should look like this:\n\n`make scrape URL='https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu'`\n\nBy default, the tool will scrape a small number of results that are visible when you load the page.\n\nTo scrape the full results, add `FULL=True` to your command.\n\nThe full command should look like this:\n\n`make scrape URL='https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu' FULL=True`\n\nBe aware that this will take a bit longer, since the tool will automatically scroll to the bottom of the results list.\n\nAfter running the command, you should see this in your terminal:\n\n\u003cimg width=\"928\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d94124ac-6601-4680-8436-1b9c00010450\"\u003e\n\nWhen the tool has finished running, you should see a file named `locations.csv` in the directory you were running the tool.\n\nIf you open the generated CSV file, the data should look something like this:\n\n\u003cimg width=\"622\" alt=\"image\" src=\"https://github.com/user-attachments/assets/24928dd3-d610-4a7a-a5bb-6201522f4280\"\u003e\n\n### Notes\n\nIn case the code doesn't work or your project is of bigger scale, please refer to the second part of the tutorial. There, we showcase how to scrape public data with Oxylabs Scraper API.\n\n## Oxylabs Google Maps Scraper\n\nGoogle Maps Scraper enables effortless public data extraction with\ngeographic references from Google Maps and Google Places. This short\nguide will show you the process of scraping Google Maps using Oxylabs'\nScraper API.\n\n## How it works\n\nYou can retrieve Google Maps data by providing the URL to our service.\nOur API will return the results in JSON format.\n\n### Python code example\n\nThe below code examples demonstrate how you can get Google Maps results.\nFirst, you need to send the instructions to our service using the\n[\u003cu\u003ePush-Pull\u003c/u\u003e](https://developers.oxylabs.io/scraper-apis/serp-scraper-api/integration-methods/push-pull)\nmethod:\n\n```python\nimport requests\nfrom pprint import pprint\n\n# Structure payload.\npayload = {\n    'source': 'google',\n    'url': 'https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu',\n    'geo_location': 'New York,New York,United States',\n    'render': 'html'\n}\n\n# Get response.\nresponse = requests.request(\n    'POST',\n    'https://data.oxylabs.io/v1/queries',\n    auth=('USERNAME', 'PASSWORD'),\n    json=payload\n)\n\n# This will return a response with job status and results url.\npprint(response.json())\n\n```\n\nOnce the job is done, you can retrieve the results by making another\nrequest and including the **job ID** from the previous response, for\ninstance:\n\n```python\nimport requests\n\n# Get response.\nresponse = requests.request(\n    'GET',\n    'http://data.oxylabs.io/v1/queries/{job_id}/results',\n    auth=('USERNAME', 'PASSWORD')\n)\n\n# This will return the JSON response with results.\nprint(response.json())\n\n```\n\n### Output Example\n\nThe above code snippet will retrieve the results in JSON format:\n\n```json\n{\n    \"results\": [\n        {\n            \"content\": \"\u003c!doctype html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n\u003chead\u003e...\u003c/script\u003e\u003c/body\u003e\\n\u003c/html\u003e\\n\",\n            \"created_at\": \"2023-07-25 10:01:01\",\n            \"job_id\": \"7089545068712824833\",\n            \"page\": 1,\n            \"status_code\": 200,\n            \"updated_at\": \"2023-07-25 10:01:20\",\n            \"url\": \"https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu\"\n        }\n    ]\n}\n```\n\nFrom local landmarks to various businesses, with Oxylabs’ Google Maps\nScraper you’ll easily access the public data you need. If you have any\nquestions or need assistance, don’t hesitate to contact our 24/7 support\nteam via live chat or [\u003cu\u003eemail\u003c/u\u003e](mailto:support@oxylabs.io).\n\nRead More Google Scraping Related Repositories: [Google Sheets for Basic Web Scraping](https://github.com/oxylabs/web-scraping-google-sheets), [How to Scrape Google Shopping Results](https://github.com/oxylabs/scrape-google-shopping), [Google Play Scraper](https://github.com/oxylabs/google-play-scraper), [How To Scrape Google Jobs](https://github.com/oxylabs/how-to-scrape-google-jobs), [Google News Scrpaer](https://github.com/oxylabs/google-news-scraper), [How to Scrape Google Scholar](https://github.com/oxylabs/how-to-scrape-google-scholar), [How to Scrape Google Flights with Python](https://github.com/oxylabs/how-to-scrape-google-flights), [How To Scrape Google Images](https://github.com/oxylabs/how-to-scrape-google-images), [Scrape Google Search Results](https://github.com/oxylabs/scrape-google-python), [Scrape Google Trends](https://github.com/oxylabs/how-to-scrape-google-trends)\n\nAlso, check this tutorial on [pypi](https://pypi.org/project/google-maps-scraper-api/). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxylabs%2Fgoogle-maps-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxylabs%2Fgoogle-maps-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxylabs%2Fgoogle-maps-scraper/lists"}