Audit your local competitors with Google Maps data
A Google Business Profile competitor analysis does not need a spreadsheet and a dozen open tabs. One Maps call returns the ranked businesses for your query and place, with rating, review count, categories, website, photos and hours. A short Python script then scores your client against the top three rivals and prints a fix-first list.
Short answer: For one client and a handful of queries, save one Maps Quick call per query (up to 20 places) and run the script below. If the client ranks past 20, use a Maps search with limit up to 100, and expect the places beyond detail to arrive without categories, photos or hours. For position over time, use a rank tracker instead. Review text, Q&A and posts stay a manual check.
What should a local competitor audit compare?
Compare the fields a searcher can see on each profile, and be clear about what Google says drives the ranking. Google's help page says "Local results are mainly based on relevance, distance, and popularity." It adds that "More reviews and positive ratings can help your business's local ranking," and that "There's no way to request or pay for a better local ranking on Google."
On categories, Google's page says "Categories help your customers find accurate, specific results for services they're interested in." It also says to "Choose the fewest number of categories it takes to describe your overall core business." That second sentence is why the audit below flags a category gap as something to check, never as something to add blindly.
The three vendor guides I read all describe a manual job. BrightLocal's guide says "Look through each profile carefully and note as much as you can." It lists review count, average score and images, and the page is marked "Last updated: October 2025". MarTech suggests you "Create a spreadsheet with a column for your business location and a column for the top-ranked competitor" for your search phrase. Search Engine Journal's competitor guide adds "Pay close attention to their posting frequency."
None of the three pulls the top rivals for you in one step, and none says how much each field is worth. MarTech's title asks which metrics matter most, but the page I read does not rank them with data. So this audit makes no claim about weights. It measures gaps, and it says which gaps are cheap to fix.
Which list of rivals are you auditing?
You are auditing the ranked list one call returned, for one query, from one place. Change location, the lat and lng pair or zoom and the list changes, so write "for this query from this place" in any report you hand a client. Which Google surface that list corresponds to is a separate question, and local pack vs Google Maps rankings covers it. To watch a position move over time, see local SEO rank tracking.
MarTech also claims that "Local rankings alter significantly based on which businesses are open or closed at any given time." It shows no data for that, so treat it as a vendor claim. It is a reasonable reason to note the time of day when you repeat an audit.
How do you pull the rivals in one call?
I run Serpent, the API this site sells, so the example below uses it. Send the query and place to Maps Quick. It returns up to 20 ranked place records, and the pricing page describes it as "Up to 20 places, all enriched".
curl --get "https://api.apiserpent.com/api/maps/search/quick" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "q=emergency dentist" \
--data-urlencode "location=Austin, TX" \
--data-urlencode "country=us"
The response carries a places list in rank order. These are the fields the audit uses, as the docs define them. Every key is always present on every place record, so test the value and never the key.
| Field | What the docs say | Empty value |
|---|---|---|
rank | 1-based position in the ranked list this place came back in | null |
rating | Star rating from 0 to 5 | null |
review_count | Number of public reviews Google reports | null |
categories | Business category labels | [] |
website | Public website URL | null |
image_count | Number of public photos | null |
opening_hours | Weekly hours and current open or closed state | {} |
detail_status | complete when enrichment finished, core_only when only the ranked core record came back | null |
A Maps search (GET /api/maps/search) takes the same parameters, except start, and adds two. detail sets how many places come back fully enriched, 0 to 100, default 20. limit sets how many places come back, 1 to 100.
Places past detail arrive as core_only records with name, address, coordinates, rating, review count, phone and website. With detail=0 you get the ranked list alone, nothing enriched, so use it for rank checks and not for this audit.
A Quick call costs from $7.35 per 1K API calls (pay as you go, no subscription; see pricing, checked 25 November 2026), and a new account has 10 free API calls. One query is one call, so 50 audited queries is 50 calls: 50 × $0.00735 is about $0.37. The pricing page also says prices are likely to rise from December 2026, so re-check it before you budget a long run.
How do you score the gaps?
Pick the three best-ranked places that are not your client, take the median of each number, and compare. The three-rival median is a choice of this method. No page I read says it is the right benchmark, so change TOP_N if you disagree. These are the measures:
- Rating gap: the client's rating minus the rivals' median rating. Flagged at 0.2 stars or more below.
- Review-count ratio: the client's
review_countdivided by the rivals' median. Flagged below 0.5. - Photo ratio: the same division on
image_count. Flagged below 0.5. - Category gap: categories that at least two of the three rivals use and the client does not.
- Website and hours: a yes or no for each. An empty
opening_hoursobject means Google exposes no hours.
The 0.5 and 0.2 flags are also my choices. The order of the fix-first list follows how quickly an owner can act, so a missing website comes before a review gap that takes months to close. It is not a ranking weight, because none of the pages I read gives one.
In the made-up sample below, the client ranks 5th of 6. Its rating is 4.4 against a rival median of 4.8, a gap of 0.4. It has 58 reviews against 268, a ratio of 0.22, and 9 photos against 54. It has no website and no hours, and all three rivals list "Emergency dental service" while it does not.
What does the Python look like?
Two files, standard library only. fetch.py saves one Quick search to places.json. It reads your key from SERPENT_API_KEY.
"""Save one Maps Quick search (up to 20 ranked places) to places.json."""
import json
import os
import sys
import urllib.parse
import urllib.request
BASE_URL = os.getenv("SERPENT_BASE_URL", "https://api.apiserpent.com")
def fetch(query, location, out="places.json"):
params = urllib.parse.urlencode({"q": query, "location": location, "country": "us"})
request = urllib.request.Request(
BASE_URL + "/api/maps/search/quick?" + params,
headers={"X-API-Key": os.environ["SERPENT_API_KEY"], "User-Agent": "competitor-audit/1.0"},
)
with urllib.request.urlopen(request, timeout=90) as response:
body = json.load(response)
with open(out, "w", encoding="utf-8") as fh:
json.dump(body, fh, indent=2)
print("saved %d places to %s" % (len(body.get("places", [])), out))
if __name__ == "__main__":
if len(sys.argv) < 3:
raise SystemExit('usage: python fetch.py "emergency dentist" "Austin, TX"')
fetch(sys.argv[1], sys.argv[2])
audit.py reads a saved file, finds your client by place_id, and prints the scorecard and the fix-first list. Records whose detail_status is not complete are treated as unknown for categories, hours and photos, for the reason in the next section.
"""Score one business against the top-ranked rivals in a saved Maps search result."""
import json
import sys
from collections import Counter
from statistics import median
TOP_N = 3 # how many rivals form the benchmark (a choice of this method)
RATIO_FLAG = 0.5 # flag review or photo counts below half the rivals' median
RATING_FLAG = -0.2 # flag a rating more than 0.2 stars below the rivals' median
def load_places(path):
with open(path, encoding="utf-8") as fh:
body = json.load(fh)
places = body.get("places") or []
return sorted(places, key=lambda p: (p.get("rank") is None, p.get("rank") or 0))
def enriched(place):
# Only a "complete" record is evidence for categories, hours and photo count.
# On a "core_only" record those values are unknown, not confirmed absent.
return place.get("detail_status") == "complete"
def number(place, key):
value = place.get(key)
ok = isinstance(value, (int, float)) and not isinstance(value, bool)
return value if ok else None
def med(values):
values = [v for v in values if v is not None]
return median(values) if values else None
def labels(place):
return {c.lower(): c for c in (place.get("categories") or [])}
def audit(places, client_id):
client = next((p for p in places if p.get("place_id") == client_id), None)
if client is None:
raise SystemExit("%s is not in this ranked list: nothing to compare." % client_id)
rivals = [p for p in places if p.get("place_id") != client_id][:TOP_N]
known = [p for p in rivals if enriched(p)]
r_rating = med([number(p, "rating") for p in rivals])
r_reviews = med([number(p, "review_count") for p in rivals])
r_photos = med([number(p, "image_count") for p in known])
c_rating = number(client, "rating")
c_reviews = number(client, "review_count")
c_photos = number(client, "image_count") if enriched(client) else None
category_gap = None
if enriched(client) and len(known) >= 2:
used = Counter(key for p in known for key in labels(p))
mine = labels(client)
names = {key: label for p in known for key, label in labels(p).items()}
category_gap = sorted(names[key] for key, n in used.items() if n >= 2 and key not in mine)
return {
"client_name": client.get("name"),
"client_rank": client.get("rank"),
"list_size": len(places),
"rivals": [p.get("name") for p in rivals],
"rating": c_rating,
"rival_median_rating": r_rating,
"rating_gap": round(c_rating - r_rating, 2) if None not in (c_rating, r_rating) else None,
"reviews": c_reviews,
"rival_median_reviews": r_reviews,
"review_ratio": round(c_reviews / r_reviews, 2) if c_reviews is not None and r_reviews else None,
"photos": c_photos,
"rival_median_photos": r_photos,
"photo_ratio": round(c_photos / r_photos, 2) if c_photos is not None and r_photos else None,
"has_website": bool(client.get("website")),
"has_hours": bool(client.get("opening_hours")) if enriched(client) else None,
"category_gap": category_gap,
}
def fix_first(r):
# Order = how quickly the owner can fix it, not a ranking-factor weight.
todo = []
if not r["has_website"]:
todo.append("Add a website: the profile has none.")
if r["has_hours"] is False:
todo.append("Add opening hours: the profile shows none.")
if r["category_gap"]:
todo.append("Check categories: 2+ of the top %d use %s and you do not. Add one only if it "
"describes your core business." % (TOP_N, ", ".join(r["category_gap"])))
if r["photo_ratio"] is not None and r["photo_ratio"] < RATIO_FLAG:
todo.append("Add photos: %s vs a rival median of %s." % (r["photos"], r["rival_median_photos"]))
if r["review_ratio"] is not None and r["review_ratio"] < RATIO_FLAG:
todo.append("Ask for reviews: %s vs a rival median of %s." % (r["reviews"], r["rival_median_reviews"]))
if r["rating_gap"] is not None and r["rating_gap"] <= RATING_FLAG:
todo.append("Look at what the lower ratings say by hand: %s vs a rival median of %s."
% (r["rating"], r["rival_median_rating"]))
return todo
def show(r):
print("%s: rank %s of %d for this query and place" % (r["client_name"], r["client_rank"], r["list_size"]))
print("Benchmark: " + ", ".join(r["rivals"]))
print("rating %s vs median %s (gap %s)" % (r["rating"], r["rival_median_rating"], r["rating_gap"]))
print("review count %s vs median %s (ratio %s)" % (r["reviews"], r["rival_median_reviews"], r["review_ratio"]))
print("photos %s vs median %s (ratio %s)" % (r["photos"], r["rival_median_photos"], r["photo_ratio"]))
print("website %s" % ("yes" if r["has_website"] else "no"))
print("hours %s" % {True: "yes", False: "no", None: "unknown"}[r["has_hours"]])
gap = r["category_gap"]
print("category gap %s" % ("unknown" if gap is None else (", ".join(gap) or "none")))
print("Fix first:")
for i, line in enumerate(fix_first(r), 1):
print(" %d. %s" % (i, line))
if __name__ == "__main__":
if len(sys.argv) < 3:
raise SystemExit("usage: python audit.py places.json CLIENT_PLACE_ID")
show(audit(load_places(sys.argv[1]), sys.argv[2]))
To try it without an account, save this made-up file as sample.json. The businesses and numbers are invented, in the documented shape, and the contents of opening_hours are shortened because the audit only tests whether the object is empty.
{
"success": true,
"type": "maps",
"places": [
{"rank": 1, "place_id": "example_a", "name": "Example Dental A",
"categories": ["Emergency dental service", "Dentist"],
"website": "https://example-a.test", "rating": 4.8, "review_count": 412,
"opening_hours": {"monday": "08:00-18:00"}, "image_count": 96, "detail_status": "complete"},
{"rank": 2, "place_id": "example_b", "name": "Example Dental B",
"categories": ["Dentist", "Emergency dental service", "Cosmetic dentist"],
"website": "https://example-b.test", "rating": 4.7, "review_count": 268,
"opening_hours": {"monday": "07:00-19:00"}, "image_count": 54, "detail_status": "complete"},
{"rank": 3, "place_id": "example_c", "name": "Example Dental C",
"categories": ["Dentist", "Emergency dental service"],
"website": "https://example-c.test", "rating": 4.9, "review_count": 175,
"opening_hours": {"monday": "09:00-17:00"}, "image_count": 31, "detail_status": "complete"},
{"rank": 4, "place_id": "example_d", "name": "Example Dental D",
"categories": ["Dentist"],
"website": "https://example-d.test", "rating": 4.6, "review_count": 120,
"opening_hours": {"monday": "09:00-17:00"}, "image_count": 22, "detail_status": "complete"},
{"rank": 5, "place_id": "example_e", "name": "Example Dental E (the client)",
"categories": ["Dentist"],
"website": null, "rating": 4.4, "review_count": 58,
"opening_hours": {}, "image_count": 9, "detail_status": "complete"},
{"rank": 6, "place_id": "example_f", "name": "Example Dental F",
"categories": [],
"website": "https://example-f.test", "rating": 4.5, "review_count": 40,
"opening_hours": {}, "image_count": null, "detail_status": "core_only"}
]
}
Then run it for the client, which is example_e:
python3 audit.py sample.json example_e
For the sample, on Python 3.15.2 on 25 November 2026, it prints this. It is the output for invented data, not a real market:
Example Dental E (the client): rank 5 of 6 for this query and place
Benchmark: Example Dental A, Example Dental B, Example Dental C
rating 4.4 vs median 4.8 (gap -0.4)
review count 58 vs median 268 (ratio 0.22)
photos 9 vs median 54 (ratio 0.17)
website no
hours no
category gap Emergency dental service
Fix first:
1. Add a website: the profile has none.
2. Add opening hours: the profile shows none.
3. Check categories: 2+ of the top 3 use Emergency dental service and you do not. Add one only if it describes your core business.
4. Add photos: 9 vs a rival median of 54.
5. Ask for reviews: 58 vs a rival median of 268.
6. Look at what the lower ratings say by hand: 4.4 vs a rival median of 4.8.
With real data, save a search with python3 fetch.py "emergency dentist" "Austin, TX", find your client's place_id in places.json, and pass it as the second argument. If the client is not in the returned list, the script says so and stops, and that is a finding in itself for that query and place.
What happens when a record is partial?
A partial record is still a delivered, billable one, and the docs spell out how to read it. Each place carries detail_status, counts.fully_enriched says how many places came back enriched, and meta.partial is true when a response came back short of full enrichment. The docs say to treat the nullable detail fields of a core_only record "as unknown, not as confirmed absence".
That is why audit.py never reads categories, opening_hours or image_count from a place unless it is complete. Try the other record in the sample: python3 audit.py sample.json example_f prints "unknown" for hours and for the category gap and "None" for the photo ratio, instead of reporting an empty profile that may not be empty. Rivals with unknown fields are left out of those medians, and the category gap stays unknown if fewer than two rivals are complete.
When a record you care about is partial, fetch that one place with GET /api/maps/place, which takes a place_id and returns one richest-available record, from $0.74 per 1K API calls. Then merge it into places.json by hand.
What can this audit not see?
Rating and review count are the numbers Google displays; review quality and recency are not in this audit. A rival with 268 reviews could have a strong or a weak record on what those reviews say, and these fields cannot tell you which.
It also cannot see Google Posts, Q&A, attributes or photo quality. Search Engine Journal and BrightLocal both list posting activity as a thing to watch, so check those by hand on the profiles the script flags. It gives no ranking-factor weights, and a gap is not proof that closing it will move the client up. Google's own page says rank is "relevance, distance, and popularity", and a scorecard of public fields only partly describes any of the three.
Finally, this is not a rank tracker and not a lead list. For position over time, see local SEO rank tracking. For picking businesses to sell to, see finding local businesses without websites.
Which setup should you pick?
- One client, a few queries: Maps Quick, one call per query,
audit.pyon each saved file. The pricing page describes Quick as "Up to 20 places, all enriched", and the docs example showsfully_enrichedat 19 of 20 withpartial: true, so the code handlescore_onlyitems. - The client ranks past 20: a Maps search with
limitup to 100 anddetail20. The client's own record may arrive ascore_only, so expect "unknown" for its categories, hours and photos, and fetch it with a Place call. - An agency running many clients: loop the same two files over a list of queries and places, and keep every saved
places.jsonwith the date, query and place in its filename. - Tracking, not auditing: use a rank tracker. The local rank tracking tutorial and the free local rank tracker post cover it.
For a field-by-field tour of the Maps record, see the Place Details post. For exporting to CSV, see the Python Maps export guide. For what an enriched record costs, see cost per enriched place, and for a vendor comparison, the best Maps business data APIs.
How we checked this
I read three vendor guides (BrightLocal, MarTech, Search Engine Journal) and two Google Business Profile help pages on 25 November 2026, and quote them verbatim. Product facts come from our Maps docs and the pricing page as they stood that day. The Python ran only against the made-up sample on Python 3.15.2, so the printed output shows the script's logic and not a live market. I did not run fetch.py against the live API for this post.
What I could not verify: which Google pages rank for this topic (the vendor list came from a web search, not from a Google results page); a Search Engine Land article on the same topic returned an error, so I did not read it; I did not read BrightLocal's help page on comparing profiles; whether categories, image_count and opening_hours come back filled on a given search record (the docs describe them, and I made no live call to confirm); the contents of opening_hours; and whether a three-rival median is the right benchmark, or how much any field weighs in ranking. No source I read says.
Run the audit on your own client
Maps Quick is from $7.35 per 1K API calls, pay as you go, no subscription, and a new account has 10 free API calls. One call per query returns up to 20 ranked places.
Get Your Free API KeyExplore: Google Maps API · Playground · Docs · Pricing
FAQ
How many competitors should I compare in a Google Business Profile audit?
This post compares the top three places that are not your client, and takes the median of each number. That is a choice of the method, not a rule from Google or a vendor. A Maps Quick call returns up to 20 places, so you can raise TOP_N in the script. A wider set smooths out one unusually strong rival, but it also mixes in businesses that rank lower for a reason.
Does Google rank on rating, review count and categories?
Google says local results are "mainly based on relevance, distance, and popularity", that more reviews and positive ratings "can help" local ranking, and that categories help customers find specific services. It gives no weights, and it says you cannot pay for a better local ranking. So treat each gap as a thing to check, not a guaranteed lever.
Why does the audit leave out review text and how recent reviews are?
The fields it reads are the rating and the review count, which are the numbers Google displays on the profile. Review quality and recency are not in this audit. If you want to judge them, open the flagged rivals by hand and read what customers wrote.
How much does it cost to audit 50 queries?
One Maps Quick call covers one query and returns up to 20 places. It is from $7.35 per 1K API calls, so 50 queries is 50 calls, about $0.37 at that rate, and a new account has 10 free API calls. The pricing page says prices are likely to rise from December 2026, so check pricing before you plan a long run.
Why do some fields show as unknown?
A place that arrives as core_only carries name, address, coordinates, rating, review count, phone and website. Its categories, hours and photo count are unknown, and the docs say to treat them that way. The script prints "unknown" for them instead of reporting an empty profile. Fetch that one place with the Place endpoint if you need the missing fields.
Sources
Google's own help pages (checked 25 November 2026):
- Google Business Profile Help: Improve your local ranking on Google
- Google Business Profile Help: Choose a business category
Vendor and publisher guides (read 25 November 2026):
- BrightLocal: local competitor analysis
- MarTech: Google Business Profile metrics in multi-location competitive research
- Search Engine Journal: competitor analysis for local SEO
Serpent API docs and pricing (checked 25 November 2026): Maps Quick, Maps search, Place Details and pricing.





