1

A client has given me a giant list of google URLs, and they would like me to get the business name, address, and phone numbers of each location.

They found the URLs using the google maps website, selected location, pressed "share", and copied the link.

The links look something like this.

They resolve to URLs like this.

Is there any way to get the place ID from this page? From there, I can retrieve the details I need. I basically need to do the exact opposite of Getting Google Maps link from place_id

Code Wiget
  • 1,540
  • 1
  • 23
  • 35

1 Answers1

1

Found the answer, albeit a poor one. Pull the latitude and longitude from the URL, then use Google’s place search, and search using the query="category", location=lat/long. Category is the general search term of the type of establishment you're searching, such as "barbershop". Pull the lat/long from the very end of the resolved URL: 35.065461, -80.773431. Google will return plenty of results, but the first one should be the one you're looking for. The result will contain the place ID.

Code Wiget
  • 1,540
  • 1
  • 23
  • 35
  • Your question was how to get the place I'd, not the latitude/longitude, did you change your mind on what was needed? – geocodezip Jul 19 '21 at 04:28
  • Sorry, updated my answer for clarity. You can pull the latitude and longitude from the URL, and with a successful places search you will find the place id – Code Wiget Jul 19 '21 at 11:12
  • Oh wow. Wild that it's so annoying. – Alper Nov 14 '22 at 18:58