0

My requirement is to get all the place names under a specific place category from address_components within 500m of a location specified by latitude and longitude. I am using Google Places API (Classic) and I am able to get the intended result using the following url call:

url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?keyword=" & myKeyword & "&location=" & mylatitude & "," & mylongitude & "&radius=" & myRadius & "&type=" & myplaceType & "&key=" & myApiKey

I hope the variable names are self-explanatory. I am passing a keyword, location using lat-long, required type and my API key. It is working.

The issue is that I am being billed for (1) Places - Nearby Search, (2) Contact Data and (3) Atmosphere Data. Actually, I need only the result from Places - Nearby Search and I am unnecessarily paying for Contact Data and Atmospheric Data usage.

I googled extensively and there are mentions at many places that we can restrict the call through specifying "Fields" in the API call, but I could not find how to specify that to compose the url. Please help on this...

Please note that. I don't need Autocomplete solutions - most of the googled result give solutions in Autocomplete using places API. I am not looking for that. I just need the json which contains names of the places. Rest I can do.

0

Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.