bsmith95610
bsmith95610

Reputation: 73

Google Maps Details Endpoint not returning street_number

I am currently making a call to the google maps autocomplete API and am getting back a description of 396 mango Street, Mercer Island, WA, United States and a place_id of EjIzOTYgbWFuZ28gU3RyZWV0LCBNZXJjZXIgSXNsYW5kLCBXQSwgVW5pdGVkIFN0YXRlcw

But when I take that place_id and pass it to the details endpoint the JSON I get back is not showing the street_number even though the autocomplete endpoint is showing the street number.

Does anyone know why the details endpoint would return less detailed information than the autocomplete endpoint?

AutoComplete Request https://maps.googleapis.com/maps/api/place/autocomplete/json?key=YOUR_GOOGLE_API_KEY_HERE&input=396%20Mango%20Street,%20Mercer%20Island&types=address

Details Request https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_GOOGLE_API_KEY_HERE&placeid=EjIzOTYgbWFuZ28gU3RyZWV0LCBNZXJjZXIgSXNsYW5kLCBXQSwgVW5pdGVkIFN0YXRlcw

Upvotes: 3

Views: 2565

Answers (2)

betofarina
betofarina

Reputation: 1094

Could be data missing in Google, in fact I recreated your issue and I see that mango street is a really small street( maybe not very known st.) and found out that in fact they have this same id or location for the whole street, (what I mean is that, I tried doing a lot of querys for example, 04 mango street, 200 mango street, 400 mango street, and they all pointed out to the exact same location).

another red flag is the long place_id which sometimes indicated that is interpolated so not very reliable (as you can see place_id can be in this 2 ways https://developers.google.com/places/place-id#id-overview)

Solution: If this is very important to you, you could contact Google in the issue tracker and explain your case so they can correct the data. https://issuetracker.google.com

You can read about your issue here: https://issuetracker.google.com/issues/35823492

Upvotes: 1

bsmith95610
bsmith95610

Reputation: 73

I opened up a ticket with Google on this and they marked it as a duplicate to the below. Below is the text from the duplicate ticket.

The autocomplete request for 720 Johnsville Boulevard returns the place ID Ejc3MjAgSm9obnN2aWxsZSBCb3VsZXZhcmQsIFdhcm1pbnN0ZXIsIFBBLCBVbml0ZWQgU3RhdGVz.

When I check this place ID with geocoding service https://maps.googleapis.com/maps/api/geocode/json?place_id=Ejc3MjAgSm9obnN2aWxsZSBCb3VsZXZhcmQsIFdhcm1pbnN0ZXIsIFBBLCBVbml0ZWQgU3RhdGVz&key=

I can see that the result has a type GEOMETRIC_CENTER. That means there is no ROOFTOP address for 720 Johnsville Boulevard in our database.

The autocomplete service, in general, it will allow users entering numbers that aren't known to exist. We accept that you might know 720 before we do and we wouldn't stop accepting that input just because it doesn't match our data. However, our output will be based on addresses we know of, so we'd only return "Johnsville Boulevard" because that's the address we know it exists.

You can use Map Maker to create the missing address. Google MapMaker (http://mapmaker.google.com) is a tool that allows public users to add, modify and remove data from the Geo repositories at Google. Map Maker was designed to help us collect information about places and geographic features from people with local knowledge.

You can read about Map Maker on https://support.google.com/mapmaker#topic=3180752

The autocomplete service currently is working as intended and adding the street address via Map Maker should solve your issue in the future.

Upvotes: 1

Related Questions