1

I have the following request url:

https://maps.googleapis.com/maps/api/place/textsearch/json?input=London&inputtype=textquery&type=pet_store&key=API_KEY

I am trying to disable locationbias but have no luck. I tried adding &locationbias=point:lat,long to my request but the results are still biased to the location of the IP address

I also tried adding location=0,0 and radius=1 parameters as suggested in another thread.

Can someone point me in the right direction?

evan
  • 5,443
  • 2
  • 11
  • 20
MrWhite
  • 179
  • 3
  • 11

1 Answers1

0

The Text Search service does not have a locationbias parameter, nor input for that matter; only the Find Place service does. If you're actually using Find Place, then note that this service only gives you 1 result/place per query, and since you're querying a city (London) then whatever value you set to locationbias won't really matter. In any case, locationbias cannot be "turned off". If you do not specify it, results will always be IP biased by default.

Based on your query, it seems that what you're trying to do is to get multiple places (pet stores) within London. You should use Text Search (or better, Nearby Search) for such use case. And if you wish to bias results to a specific region, then you can use the location and radius parameters as follows:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=123+main+street&location=42.3675294,-71.186966&radius=10000&key=YOUR_API_KEY

Nearby Search example:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=YOUR_API_KEY

Dharman
  • 30,962
  • 25
  • 85
  • 135
evan
  • 5,443
  • 2
  • 11
  • 20