Reputation: 941
I'm trying to develop a location based app using google places, but repeatedly get ZERO_RESULTS on every query.
{
"html_attributions" : [],
"results" : [],
"status" : "ZERO_RESULTS"
}
I intially tried with the URL from my code, using the the lat and lon of Atlanta, GA: https://maps.googleapis.com/maps/api/place/search/json?location=33.7489,-84.3881&radius=50&keyword=coin|numismatic|silver|gold|dealer|pawn&sensor=false&key=
Then tried something a bit more generic and ubiquitous (Mickey D's) to no avail... https://maps.googleapis.com/maps/api/place/search/json?location=33.7489,-84.3881&radius=50&keyword=mcdonalds&sensor=false&key=
and then even more generic. This returns results, but erroneous (somewhere in Africa)... https://maps.googleapis.com/maps/api/place/search/json?location=33.7489,-84.3881&radius=50&type=bank&sensor=false&key=
I know my key is valid, since im not getting request denied and i know my structure is correct since I'm not getting Invalid Request. Anyone know what I'm doing wrong? Thank you in advance
Upvotes: 4
Views: 8156
Reputation: 6805
Adding my answer even though it's pretty late: I got zero results quite often when I was using locationbias
and setting just a single point.
I ended up using circle
with a radius of 2000 meters and started getting results consistently
Example: circle:radius@lat,lng
, mentioned in the docs here: https://developers.google.com/maps/documentation/places/web-service/search-find-place#maps_http_places_findplacefromtext_mca-sh
Upvotes: 0
Reputation: 51
In my case, it's the wrong coordinates. Don't use LatLongs from Google Search. Only use the ones which are retrieved from Places API.
Upvotes: 0
Reputation: 4050
One possible reason is that you exceeded the limit of number of requests. Google places api has a limit of 1,000 free requests per 24 hour period. You can extend limit to 150,000 requests per 24 hour period without any payment. But you will have to add your credit card information. Google says that it is only to verify your identity, not to charge you.
If you pay, you can increase the limit more than that.
This information is added on 08/02/2017. Limits may change in time.
Upvotes: 0
Reputation: 4425
I am receiving one result for the first query, zero for the second and 20 for the third. If I increase the radius from 50 meters to something a bit more realistic like 5000 meters, I receive many more results on the first two queries.
I also noticed that you are trying to filter by multiple keywords which is currently not supported by the Google Places API and is also a likely reason to reduce the number and quality of results returned.
There is a feature request for this in the Places API issue tracker here. Please click the 'star' icon to be notified of future changes, and to let us know you are interested in seeing it resolved.
You should also never post your API key publicly as it is directly linked to your Google account and you are responsible for its use. Please login to the Google APIs Console and generate a new key to avoid users stealing your key and abusing it.
Upvotes: 2
Reputation: 5757
I tried your query with my API key and I get no response either.
I tried to increase the radius and still no result.
I have not used the keyword
before, try using type
instead. I don´t think there is anything wrong with your query, the problem is that google does actually return 0 result for that query.
Upvotes: 0