Git Product home page Git Product logo

hosythach / google-maps-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omkarcloud/google-maps-scraper

0.0 0.0 0.0 9.08 MB

๐Ÿ‘‹ HOLA ๐Ÿ‘‹ HOLA ๐Ÿ‘‹ HOLA ! ENJOY OUR GOOGLE MAPS SCRAPER ๐Ÿš€ TO EFFORTLESSLY EXTRACT DATA SUCH AS NAMES, ADDRESSES, PHONE NUMBERS, REVIEWS, WEBSITES, AND RATINGS FROM GOOGLE MAPS WITH EASE! ๐Ÿค–

Home Page: https://www.omkar.cloud/

License: MIT License

JavaScript 0.29% Python 99.62% Dockerfile 0.10%

google-maps-scraper's Introduction

Google Maps Scraper Feautred Image

โœจ Google Maps Scraper ๐Ÿค–

(Programming Language - Python 3)

google-maps-scraper forks Repo stars google-maps-scraper License issues

View

Open in Gitpod


Disclaimer for Google Maps Scraper Project

This Google Maps Scraper is provided for educational and research purposes only. By using this Google Maps Scraper, you agree to comply with local and international laws regarding data scraping and privacy. The authors and contributors are not responsible for any misuse of this software. This tool should not be used to violate the rights of others, for unethical purposes, or to use data in an unauthorized or illegal manner.

We take the concerns of the Google Maps Scraper Project very seriously. For any concerns, please contact Chetan Jain at [email protected]. We will promptly reply to your emails.

Explore Our Other Awesome Products

  • โœ… BOTASAURUS: The All-in-One Web Scraping Framework with Anti-Detection, Parallelization, Asynchronous, and Caching Superpowers.

  • โœ… GOOGLE SCRAPER: Discover Search Results from Google.

  • โœ… AMAZON SCRAPER: Discover Search Results and Product Data from Amazon.

  • โœ… TRIP ADVISOR SCRAPER: Discover search results of hotels and restaurants from TripAdvisor.


Google Maps Scraper helps you find Business Profiles from Google Maps.

โšก Benefits

  1. Limitless Scraping, Say No to costly subscriptions or expensive pay-per-result fees.

  2. Sort, select, and filter results.

  3. Scrape cities across countries.

  4. Scrape reviews while ensuring the privacy of reviewers is maintained.

In the next 5 minutes, you'll extract 120 Search Results from Google Maps.

Google Maps Data Scraper CSV Result

๐ŸŽฅ Video Demo

If you'd like to see a demo before using the tool, I encourage you to watch this short video.

Google Maps Video Tutorial

๐Ÿ“ฆ Requirements

To use the tool, you must have Node.js 16+ and Python installed on your PC.

๐Ÿš€ Getting Started

Let's get started by following these super simple steps:

1๏ธโƒฃ Clone the Magic ๐Ÿง™โ€โ™€๏ธ:

git clone https://github.com/omkarcloud/google-maps-scraper
cd google-maps-scraper

2๏ธโƒฃ Install Dependencies ๐Ÿ“ฆ:

python -m pip install -r requirements.txt

3๏ธโƒฃ Get the results by running ๐Ÿ˜Ž:

python main.py

Once the scraping process is complete, you will find the search results in the output directory.

Google Maps Data Scraper CSV Result

Note: If you don't have Node.js 16+ and Python installed or you are facing errors, follow this Simple FAQ here, and you will have your search results in the next 5 Minutes

๐Ÿค” Questions

โ“ How to Scrape a Specific Search Query?

Open the main.py file, and update the queries list with your desired query.

queries = ["web developers in delhi"]
Gmaps.places(queries, max=5)

โ“ How to Scrape Multiple Queries?

Add multiple queries to the queries list as follows:

queries = [
   "web developers in bangalore",
   "web developers in delhi",
]
Gmaps.places(queries, max=5)

โ“ The scraper is only retrieving 5 results. How can I scrape all Google Maps search results?

A: Remove the max parameter.

By doing so, you can scrape all the Google Maps Listing. For example, to scrape all web developers in Bangalore, modify the code as follows:

queries = ["web developers in bangalore"]
Gmaps.places(queries)

You can scrape a maximum of 120 results per search, as Google does not display any more search results beyond that. However, don't worry about running out of results as there are thousands of cities in our world :).

โ“ How Can I Filter Google Map Search Results?

You can apply filters such as:

  1. min_reviews/max_reviews (e.g., 10)
  2. category_in (e.g., "Dental Clinic", "Dental Laboratory")
  3. has_website (e.g., True/False)
  4. has_phone (e.g., True/False)
  5. min_rating/max_rating (e.g., 3.5)

For instance, to scrape listings with at least 5 reviews and no more than 100 reviews, with a phone number but no website:

Gmaps.places(queries, min_reviews=5, max_reviews=100, has_phone=True, has_website=False)

To scrape listings that belong to specific categories:

Gmaps.places(queries, category_in=[Gmaps.Category.DentalClinic, Gmaps.Category.DentalLaboratory])

See the list of all supported categories here

โ“ How to Sort by Reviews, Rating, or Category?

We sort the listings using a really good sorting order, which is as follows:

  • Reviews [Businesses with more reviews come first]
  • Website [Businesses more open to technology come first]
  • LinkedIn [Businesses that are easier to contact come first]
  • Is Spending On Ads [Businesses already investing in ads are more likely to invest in your product, so they appear first.]

However, you also have the freedom to sort them according to your preferences as follows:

  • To sort by reviews:

    Gmaps.places(queries, sort=[Gmaps.SORT_BY_REVIEWS_DESCENDING])
  • To sort by rating:

    Gmaps.places(queries, sort=[Gmaps.SORT_BY_RATING_DESCENDING])
  • To sort first by reviews and then by those without a website:

    Gmaps.places(queries, sort=[Gmaps.SORT_BY_REVIEWS_DESCENDING, Gmaps.SORT_BY_NOT_HAS_WEBSITE])
  • To sort by name (alphabetically):

    Gmaps.places(queries, sort=[Gmaps.SORT_BY_NAME_ASCENDING])
  • To sort by a different field, such as category, in ascending order:

    Gmaps.places(queries, sort=[[Gmaps.Fields.CATEGORIES, Gmaps.SORT_ASCENDING]])
  • Or, to sort in descending order:

    Gmaps.places(queries, sort=[[Gmaps.Fields.CATEGORIES, Gmaps.SORT_DESCENDING]])

โ“ How to Scrape Additional Information like Website, Phone, Geo Coordinates, Price Range?

You may upgrade to the Pro Version of the Google Maps Scraper to scrape additional data points, like:

  • ๐ŸŒ Website
  • ๐Ÿ“ž Phone Numbers
  • ๐ŸŒ Geo Coordinates
  • ๐Ÿ’ฐ Price Range
  • And many more data points like Owner details, Photos, About Section, and many more!

Below is a sample search result scraped by the Pro Version:

Pro Result

View sample search results scraped by the Pro Version here

Also, see the list of fields scraped by Pro Version here.

๐Ÿ” Comparison:

See how the Pro Version stacks up against the free version in this comparison image:

Comparison Image

And here's the best part - the Pro Version comes with zero risk. That's right because we offer a 30-Day Refund Policy!

Also, Pro Version is not a Monthly Subscription but a One Time Risk-Free Investment Only.

โ“ How to Get the Pro Version?

Visit the Sponsorship Page here and pay $28 by selecting Google Maps Scraper Pro Option.

Pay

After payment, you'll see a success screen with instructions on how to use the Pro Version:

Success Screen

โ“ What if I Don't Get Value from It?

We wholeheartedly believe in the value our product brings, especially since it has successfully worked for hundreds of people like you.

But, we also understand the reservations you might have.

That's why we've put the ball in your court: If, within the next 30 days, you feel that our product hasnโ€™t met your expectations, don't hesitate. Reach out to us, and within 24 hours, we will gladly refund your money, no questions and no hassles.

The risk is entirely on us because we're confident in what we've created.

โ“ How Do I Get a Refund?

We are ethical and honest people, and we will never keep your money if you are not happy with our product. Requesting a refund is a simple process that should only take about 5 minutes. To request a refund, ensure you have one of the following:

Next, follow these steps to initiate a refund:

  1. Send an email to [email protected] using the following template:

    • To request a refund via PayPal:

      Subject: Request Refund
      Content: Please send a refund to my PayPal email: [email protected]
      
    • To request a refund via UPI (For India Only):

      Subject: Request Refund
      Content: Please send a refund to my UPI ID: myname@bankname
      

    Email Image

  2. Next, go to the discussion here and comment to request a refund using this template:

    I have sent a refund request from my email: [email protected].
    

    Discussion Image

  3. You can expect to receive your refund within 1 day. We will also update you in the GitHub Discussion here :)

    PayPal Image

All $28 will be refunded to you within 24 hours, without any questions and without any hidden charges.

โ“ Before purchasing the Pro Version, I would like to see the search results for my queries to ensure they meet my expectations.

We understand the importance of ensuring our service meets your expectations before making a purchase. To help you evaluate the quality of our search results, you're welcome to send us a query, such as "South Indian restaurants in Delhi". We will then perform the search and provide you with a zip file containing the search results.

This way, you can sure of the data quality and relevance before deciding to purchase the PRO Version.

You may send us your search query via WhatsApp here.

โ“ How Do I Scrape Social Details of Profiles like Email, Facebook, Twitter, etc.?

To scrape social details from profiles like Email, Facebook, Twitter, follow these steps to use our Website Social Scraper API which allows you to scrape contact details from up to 50 profiles for free:

  1. Sign up on RapidAPI by visiting this link.

Sign Up on RapidAPI

  1. Subscribe to the Free Plan by visiting this link.

Subscribe to Free Plan

  1. Copy the API key. Copy the API Key

  2. Use it in the scraper as follows:

queries = ["web developers in bangalore"]
Gmaps.places(queries, max=5, key="YOUR_API_KEY") 
  1. Run the script, and you'll find emails, Facebook, Twitter, and LinkedIn details of the Business in your output file.
python main.py

Please note that scraping social details like Email, Facebook, Twitter is available in Both Free and Pro Versions.

Also, The first 50 contact details are free to scrape with the API. After that, you can upgrade to the Pro Plan to scrape 1,000 contacts for $9, which is affordable considering if you land just one B2B client, you could easily make hundreds of dollars, easily covering the investment.

Disclaimer: This API should not be used for bulk automated mailing, for unethical purposes, or in an unauthorized or illegal manner.

โ“ How to scrape all cities in my country?

Consider this example, to scrape web developers from 100 cities in India, use the following example:

queries = Gmaps.Cities.India("web developers in")[0:100]
Gmaps.places(queries) 

After running the code, an india-cities.json file will be generated in the output directory with a list of all the Indian cities.

You can prioritize certain cities by editing the cities JSON file in the output folder and moving them to the top of the list.

We recommend scraping only 100 cities at a time, as countries like India have thousands of cities, and scraping them all could take a considerable amount of time. Once you've exhausted the outreach in 100 cities, you can scrape more.

See the list of all supported countries here

โ“ Can I Interrupt the Scrape While It's Running?

Yes, you can. The scraper is smart like you and will resume from where it left off if you interrupt the process.

โ“ How to select more fields? [For Pro Users Only]

Seeing a lot of fields can be intimidating, so we have only kept the most important fields in the output.

However, you can select from up to multiple fields.

Also, to select all the fields, use the following code:

queries = [
   "web developers in bangalore"
]
Gmaps.places(queries, fields=Gmaps.ALL_FIELDS)

To select specific fields only, use the following code:

queries = [
   "web developers in bangalore"
]

fields = [
   Gmaps.Fields.PLACE_ID, 
   Gmaps.Fields.NAME, 
   Gmaps.Fields.MAIN_CATEGORY, 
   Gmaps.Fields.RATING, 
   Gmaps.Fields.REVIEWS, 
   Gmaps.Fields.WEBSITE, 
   Gmaps.Fields.PHONE, 
   Gmaps.Fields.ADDRESS,
   Gmaps.Fields.LINK, 
]

Gmaps.places(queries, fields=fields)

Please note that selecting more or fewer fields will not affect the scraping time; it will remain exactly the same. So, don't fall into the trap of selecting fewer fields thinking it will decrease the scraping time, because it won't.

For examples of CSV/JSON formats containing all fields, you can download this file.

Also, see the list of all supported fields here

โ“ Could you share resources that would be helpful to me, as I am sending personalized emails and providing useful services?

โ“ Are There Other Sources of Profiles That I Can Use?

Also, if hotel and restaurant owners are your primary target audience, consider using TripAdvisor instead of Google Maps due to the lower competition.

Our TripAdvisor Scraper allows you to easily gather contact information and descriptions from TripAdvisor.

See our Tripadvisor Scraper here. Here's a revised version of your text with improved sentence flow and grammar:

โ“ How Does It Work?

Below are some of the smart features:

  • Instead of visiting each search result through a browser, which can result in up to 10,000 requests for just 100 results, we utilize HTTP requests. This approach leads to only 100 requests for 100 results, saving time and bandwidth while also placing a minimal load on Google's servers.

  • Rather than first scrolling and then visiting search results, our system scrolls and retrieves results simultaneously in parallel. This feature would have been challenging to implement using only Python Threads. However, thanks to the Botasaurus Async Queue Feature, it was really simple.

For web scrapers interested in understanding how this works in more detail, you can read this tutorial. Here, we guide you through creating a simplified version of a Google Maps Scraper.

โ“ Your Scraper is Really Robust. I Tried Many Scrapers, Most Don't Work. How Did You Build It?

Thanks! We used Botasaurus, which is the secret behind our Google Maps Scraper.

It's a Web Scraping Framework that makes life easier for Web Scrapers.

Botasaurus handled the hard parts of our Scraper, such as:

  • Caching
  • Parallel and Asynchronous Scraping
  • Creation and Reuse of Drivers
  • Writing output to CSV and JSON files

If you are a Web Scraper, we highly recommend that you learn about Botasaurus here, because Botasaurus will really save you countless hours in your life as a Web Scraper.

botasaurus

โ“ Advanced Questions

Having read this page, you have all the knowledge needed to effectively utilize the tool.

You may choose to explore the following questions based on your interests:

For Knowledge

  1. Do I Need Proxies?
  2. Does Running a Scraper on a Bigger Machine Scrape Data Faster?

For Technical Usage

  1. I Don't Have Python, or I'm Facing Errors When Setting Up the Scraper on My PC. How to Solve It?
  2. How to Scrape Reviews?
  3. What Are Popular Snippets for Data Scientists?
  4. How to Change the Language of Output?
  5. I Have Google Map Places Links, How to Scrape Links?
  6. How to Scrape at Particular Coordinates and Zoom Level?
  7. When Setting the Lang Attribute to Hindi/Japanese/Chinese, the Characters Are in English Instead of the Specified Language. How to Transform Characters to the Specified Language?

โ“ Need More Help or Have Additional Questions?

For further assistance, feel free to reach out to us through:

  • WhatsApp: If you prefer WhatsApp, simply send a message here.

    Contact Us on WhatsApp about Google Maps Scraper

  • GitHub Discussions: If you believe your question could benefit the community, feel free to post it in our GitHub discussions here.

    Contact Us on GitHub Discussion

  • Email: If you prefer email, kindly send your queries to [email protected].

    Contact Us on Email about Google Maps Scraper

We look forward to helping you!

Become one of our amazing stargazers by giving us a star โญ on GitHub!

It's just one click, but it means the world to me.

Stargazers for @omkarcloud/google-maps-scraper

Made with โค๏ธ using Botasaurus Web Scraping Framework

google-maps-scraper's People

Contributors

noreply avatar chetan11-dev avatar chetanjainsirsa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.