Does anybody know how to find a company's CID and/or LRD using the Google Places API?
The best solution I've come up with so far is this:
- Go to https://maps.google.com and search for the business
- Find the
data
parameter in the browser's URL and extract the component that matches this pattern:0x[HEX_CODE1]:0x[HEX_CODE2]
- The 2-part number we just extracted is the company's LRD. Now, take
HEXCODE_2
from that number and convert the hex to decimal. This gives us the company's CID.
Obviously this process isn't officially supported by Google, and wouldn't scale well if I needed to do it for many businesses. Does anybody have a better method?
Read this article to obtain the CID: How to get the cid in the Google Place URL?
Two API requests and you'll have the CID of a business programmatically.
EDIT ----------
The LRD is CID in hexadecimal. You can use this function to:
So you can build the Google Review Url like this: