I am using the Google Geocoding API to retrieve place_id (and other) information to use with the Places API. Most addresses return an expected 27-character place_id value, i.e.:
ChIJUXJ61wrsFogR3jv6yBBFlQY
However, a small percentage of addresses which otherwise return seemingly good data (formatted_address
, etc.) are returning 50-character values with the prefix E
like:
EjA1Mjk1IFB1bGxleWJsYW5rIFN0LCBXaW5kc29yLCBPTiBOOU
These 50-char place_ids throw errors on Google's other APIs (i.e. Distance Matrix using the place_id as origin and/or destination):
Invalid request. Invalid 'origins' parameter. 'EiU5MDAxIFJpbGV5IFN0LCBaZWVsYW5kLCBNSSA0OTQ2NCwgVV'
is not a valid Place ID.
When I look at Google's responses, I see they all fall into three categories:
- location_type=RANGE_INTERPOLATED, types=street_address
- location_type=ROOFTOP, types=subpremise
- location_type=APPROXIMATE, types=intersection
All three indicate addresses with "issues" in some way (bogus street number, subsection of larger area, approximate location). So, I guess my question is:
Are 50-character place_id values always garbage?