Ensure you have the following dependencies installed before running the script:
-
Clone this repository:
git clone https://github.com/SeptiawanAjiP/google-maps-scrapping.git cd your-repo
-
Install the required npm packages:
npm install
-
Open the
index.js
file and update thequery
variable with your desired search query:const query = "Laundry di Jakarta";
-
Run the script:
node index.js
The script will launch a headless browser, perform the Google Maps search, and scrape relevant business information.
-
The scraped data will be saved in a CSV file named
places.csv
in the project directory.
This script is based on @adrianhorning08. Special thanks for providing the initial code.