I have a query for google places API but I think I am being inefficient with the query. I want to get more granular with the search and was hoping someone could take a look at the query I am running and advise me on how to make it better or if it is what it is. Obviously it costs money so when I have bad results it == a lot of wasted money.
I want to query for two different place types
(coworking and cafe) and then I wanted to throw in some key words like “good wifi” and “healthy food”.
I am open to not using place/nearbysearch
if you think something else is better like place/findplacefromtext
or place/details/
or place/textsearch
.
Here is my current queries:
const urlCafe =
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=" +
latitude +
"," +
longitude +
"&radius=" +
radMetter +
"&type=" +
cafeKeyword +
"&keyword=" +
googWifiKeywordCoffee +
"&key=" +
config.API_KEY;
const urlCoworking =
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=" +
latitude +
"," +
longitude +
"&radius=" +
radMetter +
"&keyword=" +
coworkingKeyword +
"&key=" +
config.API_KEY;
I fetch on both of these and then concat their results to be displayed on a map.
Any input would be appreciated.