Derek
Derek

Reputation: 41

Google Places API (text search) result different from Google Maps

I have gone through the possible related questions on this topic I can find but there is no confirmation or satisfactory answer on what I am asking.

I am using Google Places API Web Service text search in my program.
This is an example of a generated query to the API, https://maps.googleapis.com/maps/api/place/textsearch/xml?query=D-Marie%20Hair%20Boutique%20united%20states&key=xxx

The results from the API is different from Google Maps. Eg. when i search for 'D-Marie Hair Boutique united states', the API return 2 records while Google Maps return only 1 record, which match with 1 of the API record.

Is Google Places API using a different database from Google Maps? If both are using the same database, is there any query parameter I have to use for the API such that it's result match with Google Maps?

Upvotes: 3

Views: 10115

Answers (1)

KENdi
KENdi

Reputation: 7751

It is true that you will get two results by using the Places API.

The Google Places API Text Search Service is a web service that returns information about a set of places based on a string — for example "pizza in New York" or "shoe stores near Ottawa" or "123 Main Street". The service responds with a list of places matching the text string and any location bias that has been set.

Lets take your example "D-Marie Hair Boutique united states". So it is only natural for the API to result a place in where there is a Hair Boutique in the United States.

The result will be Daniella Marie Hair Boutique and Christina Marie Hair Boutique.

So just check this documentation to know more how the Text Search Service works.

Hope this information helps you.

Upvotes: 1

Related Questions