Google New Text Search (API) doesn't return expected response

20 Views Asked by At

I am using the new Google Text Search API with a FieldMask to get the placeid of a specific location.

curl --location 'https://places.googleapis.com/v1/places:searchText' \ --header 'X-Goog-Api-Key: XXXXX' \ --header 'Content-Type: application/json' \ --header 'X-Goog-FieldMask: places.id' \ --data '{ "textQuery": "Bootsanleger & Camping Neu Göhren", "maxResultCount": 10, "languageCode": "de" }'

The location name in the textQuery is the actual location name also in Google Maps. Even when I expand the textQuery with the address, it's not found.

I am using the new TextSearch API becoz it has FieldMask & getting only the placeId is free-of-cost in Google.

The Old API, doesn't have this FieldMask & therefore is expensive for me.

Can someone pls help as to how I should fine tune my query to find the location?

0

There are 0 best solutions below