How to scrape Google Maps Reviews?

Hi everyone,

I'm trying to scrape all the Google Maps reviews for my restaurant so I can sort, filter, and eventually respond to them using AI tools. So far, my setup only extracts basic data like the reviewer's name and the visible text from each review.

However, I'm facing a few issues:

  1. Star Rating: I can't figure out how to extract the star rating (1–5). It seems to be represented as a colored star image rather than a numerical value. How can I reliably capture this?

  2. Full Review Text: Some reviews are longer than the initially displayed snippet, and there's a "More" button you have to click to see the full text. How can I make sure I'm scraping the entire content of each review?

  3. Images in Reviews: A few reviews include user-uploaded images. Is there a way to detect and extract the URLs of these images as well?

  4. Auto-Scrolling: When you're on the Google Maps review section, the review list on the left only loads more entries as you scroll down. So the scraper needs to automatically scroll to load all available reviews. What's the best approach for that?

5.Overview Data (One-Time Scrape): I also want to scrape the current overall rating (e.g. 4.3 stars) and the total number of reviews as a one-time snapshot of the current state. What's the most reliable way to extract this summary data?

My sitemap or scraping structure is not fully developed yet – I'm still experimenting. I'd really appreciate it if someone could point me in the right direction, or even share a sample setup. :pray:

Thanks a lot in advance!

Url: Google Maps

Sitemap: not ready yet because I fail at the start with the "rating/stars"
{id:"sitemap code"}

Hi,

Please try this setup and let me know if you have any questions

{"_id":"google-maps-reviews","startUrl":["https://www.google.de/maps/place/Pizza+Peppino/@52.5242722,13.3926174,17z/data=!3m1!5s0x47a851e870f1924b:0xe692e0d49a0ac3c6!4m8!3m7!1s0x47a851e87407e931:0xf438ae0ae57f6a4a!8m2!3d52.524456!4d13.3923919!9m1!1b1!16s%2Fg%2F1tfk80_f?entry=ttu&g_ep=EgoyMDI1MDUxNS4wIKXMDSoJLDEwMjExNDU1SAFQAw%3D%3D"],"selectors":[{"id":"average-review","multiple":false,"parentSelectors":["_root"],"regex":"","selector":"div.fontDisplayLarge","type":"SelectorText"},{"id":"review-count","multiple":false,"parentSelectors":["_root"],"regex":"","selector":"div.fontBodySmall:contains('review')","type":"SelectorText"},{"elementLimit":0,"id":"review-wrapper","multiple":true,"parentSelectors":["_root"],"scroll":true,"selector":"[aria-label=\"Refine reviews\"] + div > [data-review-id]","type":"SelectorElement"},{"clickActionType":"real","clickElementSelector":"[aria-label=\"See more\"]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"do-not-discard","id":"click-more","multiple":true,"parentSelectors":["review-wrapper"],"selector":"_parent_","type":"SelectorElementClick"},{"extractAttribute":"aria-label","id":"rating","multiple":false,"parentSelectors":["click-more"],"selector":"span[aria-label*=\"star\"]","type":"SelectorElementAttribute"},{"id":"review-text","multiple":false,"parentSelectors":["click-more"],"regex":"","selector":"div:has(>\tspan[aria-label*=\"star\"]) + div","type":"SelectorText"},{"extractAttribute":"style","id":"images","multiple":true,"parentSelectors":["click-more"],"selector":"button[data-photo-index]","type":"SelectorElementAttribute"}]}

Hi Jan Thank you very much!

I tried and startet the scrape but there is shown only 1 entry at the first try and no data at the second try. It opens a new window and close it again directly.

Try clearing cookies and browser cache.

Here is improved version:

{"_id":"google-maps-reviews2","startUrl":["https://www.google.de/maps/place/Pizza+Peppino/@52.5242722,13.3926174,17z/data=!3m1!5s0x47a851e870f1924b:0xe692e0d49a0ac3c6!4m8!3m7!1s0x47a851e87407e931:0xf438ae0ae57f6a4a!8m2!3d52.524456!4d13.3923919!9m1!1b1!16s%2Fg%2F1tfk80_f?entry=ttu&g_ep=EgoyMDI1MDUxNS4wIKXMDSoJLDEwMjExNDU1SAFQAw%3D%3D"],"selectors":[{"id":"average-review","multiple":false,"parentSelectors":["_root"],"regex":"","selector":"div.fontDisplayLarge","type":"SelectorText"},{"id":"review-count","multiple":false,"parentSelectors":["_root"],"regex":"","selector":"div.fontBodySmall:contains('review')","type":"SelectorText"},{"elementLimit":0,"id":"scroll","multiple":true,"parentSelectors":["_root"],"scroll":true,"selector":"[aria-label=\"Refine reviews\"] + div > [data-review-id]","type":"SelectorElement"},{"elementLimit":0,"id":"review-wrapper","multiple":true,"parentSelectors":["_root"],"scroll":false,"selector":"[aria-label=\"Refine reviews\"] + div > [data-review-id]","type":"SelectorElement"},{"clickActionType":"real","clickElementSelector":"[aria-label=\"See more\"]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"do-not-discard","id":"click-more","multiple":true,"parentSelectors":["review-wrapper"],"selector":"_parent_","type":"SelectorElementClick"},{"extractAttribute":"aria-label","id":"rating","multiple":false,"parentSelectors":["review-wrapper"],"selector":"span[aria-label*=\"star\"]","type":"SelectorElementAttribute"},{"id":"review-text","multiple":false,"parentSelectors":["review-wrapper"],"regex":"","selector":"div:has(>\tspan[aria-label*=\"star\"]) + div","type":"SelectorText"},{"extractAttribute":"style","id":"images","multiple":true,"parentSelectors":["review-wrapper"],"selector":"button[data-photo-index]","type":"SelectorElementAttribute"}]}