Google My Business is a key ally for your business and potential customers from local results.
When users search for products or services in a specific area, Google My Business listings stand out because they offer and provide essential information about your business, such as contact information, products, services, hours, and reviews.
That’s why I want to share a resource I developed some weeks ago, which will help you find a way to extract information from your competitors. Using the script will save you a lot of time extracting information one by one, with no doubt a time-consuming activity.
You can download a CSV file with your competitors’ titles, descriptions, and ratings in specific cities according to the keyword you indicate.
You’ll first need to create a free account in SerpApi to get that information. One of my articles explains how to register and create an account.
The code you’ll be using on Google Colab
pythonCopy code!pip install google-search-results
import requests
import pandas as pd
from serpapi import GoogleSearch
params = {
"engine": "google_local",
"location": "Colombia",
"gl": "co",
"hl" : "es",
"api_key": "YOUR_API_KEY",
}
queries = ['seo agency in medellin', 'seo agency in cali', 'seo agency in bogota', 'seo agency in bucaramanga']
local_organic_results = []
for query in queries:
params['q'] = query
search = GoogleSearch(params)
fetch = search.get_dict()
data = fetch['local_results']
local_organic_results.append(data)
selected_terms = ['position', 'title', 'rating', 'reviews', 'description']
data_filtered = []
for keyword, result_list in zip(queries, local_organic_results):
extracted_data = [{var: r.get(var, None) for var in selected_terms} for r in result_list]
data_filtered.append(extracted_data)
for data in extracted_data:
data['Keyword'] = keyword
print(data_filtered)
Why Extracting GMB Data is Vital
Now, let’s underscore the significance of extracting data from GMB competitors.
- Market Intelligence: Analyzing your local competitors can provide valuable insights on how to improve your own GMB.
- Performance: This is a great way to extract metrics such as ratings, reviews, and search visibility against competitors.
- Reputation Management: Analyzing competitor reviews on GMB helps identify areas for improvement, especially in your narrative and presentation of your products or services.
Here is the whole code on Google Colab to extract and get data from your competitors on GMB.
I am a skilled and self-motivated marketing and SEO professional with 11+ years of experience in different digital marketing areas: content planning, information architecture, and primarily creating, leading, and tracking SEO strategies. In the last six years, I have specialized my career in developing processes to redesign and launch websites successfully using Hubspot’s Growth-Driven Design methodology.
Leave a Reply