openapi-specification icon indicating copy to clipboard operation
openapi-specification copied to clipboard

Nearbysearch requires radius param

Open vlazzle opened this issue 2 years ago • 1 comments

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.

vlazzle avatar Aug 21 '22 02:08 vlazzle

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.

google-cla[bot] avatar Aug 21 '22 02:08 google-cla[bot]

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 avatar Oct 26 '22 18:10 wangela

@wangela done: https://issuetracker.google.com/issues/256666227

vlazzle avatar Nov 01 '22 00:11 vlazzle

@vlazzle although you edited it, please take care to delete the API key above and replace it in any projects that use it.

wangela avatar Aug 09 '23 23:08 wangela