Overview
Datascooper is a Google Sheets add-on that allows you to scrape business information from Google Maps™ and place it directly into a spreadsheet. You can quickly get details like business name, address, phone, email, website, ratings, and more, right from within Google Sheets.
Key Features
- Menu Integration: Adds a custom menu “Datascooper – Scoop Data From Maps to Spreadsheet” with an “Open Datascooper” item.
- Sidebar UI: Opens a sidebar where you can:
- View your plan details (daily/monthly limits, usage, subscription start/end).
- Enter a query (e.g., “Boutique in New York”).
- Execute the query to retrieve Google Maps data.
- Purchase or upgrade your subscription plan.
- Automatic Data Appending: Data (including headers) is appended below any existing rows in your sheet, starting at column A.
Using Datascooper
- Open the Sidebar:
From the menu, click Datascooper – Scoop Data From Maps to Spreadsheet > Open Datascooper. A sidebar appears on the right. - View Your Plan:
The sidebar shows:- Plan Name (e.g., “Demo,” “Starter,” “Plus”)
- Daily/Monthly Limit & Usage
- Subscription Start & End Dates
- A button to Purchase/Upgrade Plan
- Form Your Query:
In the Query text box, type a business type plus a location, for example:"Boutique in New York""Jewelry_store in New Jersey""Restaurant in Bangalore"Then click Execute Query.- For Places type, you can refer to https://developers.google.com/maps/documentation/places/web-service/supported_types
- Data Retrieval:
- Datascooper calls your Cloud Run endpoint, scraping data from Google Maps for the specified query.
- The data is appended to the active sheet in the following columns:
- Search Query
- Business Name
- Category
- Address
- Rating
- Reviews
- Opening Hours
- Website
- Phone
- Google Place ID
- Repeated Queries:
- Each new query is appended below existing rows in your sheet, so nothing is overwritten.
- If you enter multiple queries (e.g., separated by commas), each query is processed in turn, appending rows for each.
Code Highlights
onOpen()
- Runs automatically when the spreadsheet is opened.
- Creates a custom menu named “Datascooper – Scoop Data From Maps to Spreadsheet” with an Open Datascooper item.
jsCopyfunction onOpen() {
SpreadsheetApp.getUi()
.createMenu('Datascooper - Scoop Data From Maps to Spreadsheet')
.addItem('Open Datascooper', 'openSidebar')
.addToUi();
}
openSidebar()
- Called when the user selects Open Datascooper from the menu.
- Fetches the user’s plan data and loads
Sidebar.html. - Passes plan data to the sidebar via an appended
<script>tag.
submitQueryFromSidebar(query)
- Called when the user clicks Execute Query in the sidebar.
- Sends a payload to the Cloud Run endpoint to retrieve business data from Google Maps.
- Appends the results in the active sheet, including headers if it’s the first time.
Sidebar.html
- Provides the UI in the right-hand panel:
- Displays plan details.
- Shows instructions for forming queries.
- Allows the user to input a query and execute it.
- Shows status messages (“Executing…”, “Query executed”, or errors).
Common Questions
- How do I place the sidebar on the left?
- Google Sheets always anchors custom sidebars on the right. This cannot be changed.
- How do I append data in a different column or row?
- In
submitQueryFromSidebar, the code always writes to column A at the next available row. You can changestart_columnor modify the logic if needed.
- In
- What if I exceed my daily or monthly limit?
- The script disables the Execute button if you reach your daily limit. You may also see an upgrade prompt in the sidebar.
- How do I pass multiple queries at once?
- If you type
"Boutique in New York, Jewelry_store in New Jersey"in the Query box, the backend code splits it by commas and processes each portion. The results are appended to the sheet.
- If you type
- How do I upgrade my plan?
- Click Purchase/Upgrade Plan in the sidebar. It opens the relevant purchase page, after which your subscription is updated in Firestore and recognized by the add-on.
Troubleshooting
- No Data Returned: Check your query format. Ensure you have a valid business type and location, e.g.,
"Pizza in London". - Error: “API request failed”: Try again later. Possibly a network issue or the Cloud Run service is momentarily down.
- Data Overwritten: This code appends data at the bottom. If you see overwriting, confirm no one else is editing or your sheet has the correct last row index.
Conclusion
Datascooper simplifies retrieving Google Maps data directly into Google Sheets. By following this guide, you can:
- Install the add-on in your spreadsheet.
- Use the Datascooper menu to open the sidebar.
- Enter your query and get your data appended at the bottom of the sheet.
For any further assistance or customizations, refer to the code or contact the developer. Enjoy faster, more convenient data collection from Google Maps!
In case of any questions, Please send an email to kumar@datascoopservices.com
