openapi-specification
openapi-specification copied to clipboard
Nearbysearch requires radius param
Sorry I didn't file an issue, I didn't think there was much to discuss here, but maybe I was wrong :P
Specifying location and radius params works:
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522%2C151.1957362&radius=1500&key=SOME_KEY'
But specifying only location doesn't:
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522%2C151.1957362&key=SOME_KEY'
[edit]
I just noticed that radius
is only required when not rankby
isn't specified, or set to its default value of prominence
. So omitting radius
but setting rankby
to distance
works:
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522%2C151.1957362&rankby=distance&key=SOME_KEY'
Btw, by "doesn't work" I mean this response:
{
"html_attributions": [],
"results": [],
"status": "INVALID_REQUEST"
}
Anyway, I'm not sure this PR is mergable any more, but I hope it's useful in getting to the bottom of this bug, whether it's in the documentation or behavior. Maybe it's just a matter of updating the nearby search developer guide.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Please open this as a bug in the Nearby Search documentation in our Public Issue Tracker: https://issuetracker.google.com/issues/new?component=188872&template=787713
@wangela done: https://issuetracker.google.com/issues/256666227
@vlazzle although you edited it, please take care to delete the API key above and replace it in any projects that use it.