Ankur Vyas
Ankur Vyas

Reputation: 128

Google Places API returns different place_id for the same city

I am using Google Places API for android. In which I am getting different place_id for the same city. Earlier it returns ChIJwe1EZjDG5zsRaYxkjY_tpF0 as a place_id for MUMBAI but now it returns ChIJwe1EZjDG5zsRaYxkjY_tpF2aBhpNdW1iYWksIE1haGFyYXNodHJhLCBJbmRpYQ for MUMBAI.

Can someone please explain why this happens?

Upvotes: 1

Views: 1503

Answers (2)

xomena
xomena

Reputation: 32178

This is a fix that was introduced on December 22, 2016.

Please have a look at this bug in the public issue tracker and explanation in comment #30:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=11107#c30

The issue that many users experienced was that after cleanup of the data many duplicated place IDs were deleted and place autocomplete was changed to avoid zero_results for deleted places. So, this long place ID allows to resolve addresses or places even if the place ID was deleted to the correct short place ID.

Upvotes: 2

vidriloco
vidriloco

Reputation: 71

I am also having the same problem but with a whole lot of cities. Apparently the place_id changed for many cities without prior notice or it is a recent bug.

In any case, you can compare the current response (for Paris) here with Google's own documentation using Paris as example.

The place_id for both requests is different, however, the id of the object is the same. So, where does this inconsistency comes from?

Upvotes: 0

Related Questions