Scraping Google My Business


Hi Guys,

I know there are some regex/xpath wizards out here that can probably help.

I am trying to scrape the Google My Business knowledge graph and hoping to get the following elements:

  • Business type (Hamburger restaurant)
  • Address
  • Phone

An example business of what I mean by GMB knowledge graph can be seen here:

GMB is heavily Javascript and a lot of the are unique. If any clever people here can help out with this it would not only be useful to myself but i'm sure a lot of people.

I plan to use phantomJS cloud technology as it can handle the JS.



This XPath worked for me to get Business type. Can you confirm that it works for you on this and other result pages?

=XPathOnUrl(A1;"//div[@data-attrid='kc:/local:one line summary']")


Hi diskborste,

Thanks for the response. Odd; that doesn't seem to be working for me.


Can you inspect the element and see if you can find the div with the data-attrid attribute? Perhaps it is named differently and requires a contains() Xpath?