I need to get the list of shops(place ids) in a shopping mall. I am trying to use the api,
https://places.googleapis.com/v1/places:searchText
with payload,
{
"textQuery": "Westfield Sydney, 188 Pitt St, Sydney NSW 2000",
"pageSize": 10
}
Field Mask : places.id,places.displayName,places.formattedAddress,nextPageToken
The response is returing place details with only the shopping mall and not all the shops, eventhoug all shops having the textQuery text in their formattedAddress.
{
"places": [
{
"id": "ChIJwWBUqD-uEmsRl9SNDJ2L86M",
"formattedAddress": "Cnr Pitt St Mall and, Market St, Sydney NSW 2000, Australia",
"displayName": {
"text": "Westfield Sydney",
"languageCode": "en"
}
}
],
"nextPageToken": "AUc7tXVeeqRcXzB8O_AUjzpcKCSNxkhoV5QP5LXYKpT7-pxd4F32PNclv972tgUbVz2ILaWhm59CR8q9dNjWq0PikcQFjFgLenj-4VNX4wwS0kJJ"
}
Please let me know is there any other API I need to use to get the list of places ids of the shops in a shopping mall. Thanks
Expected Result,
{
"places": [
{
"id": "ChIJwWBUqD-uEmsRl9SNDJ2L86M",
"formattedAddress": "Cnr Pitt St Mall and, Market St, Sydney NSW 2000, Australia",
"displayName": {
"text": "Westfield Sydney",
"languageCode": "en"
}
},
{
"id": "ChIJrT6HsT-uEmsRrG0FjdLcygE",
"formattedAddress": "Westfield Sydney, Shop 3012 - 4004/188 Pitt St, Sydney NSW 2000, Australia",
"displayName": {
"text": "Gucci - Sydney Flagship, Westfield",
"languageCode": "en"
}
},
{
"id": "ChIJXYArsj-uEmsR9CdQCmKG3J8",
"formattedAddress": "Level 1, Shop 1024 Westfield Sydney, Pitt St, Sydney NSW 2000, Australia",
"displayName": {
"text": "Nike Sydney Pitt Street",
"languageCode": "en"
}
}...
],
"nextPageToken": "AUc7tXVeeqRcXzB8O_AUjzpcKCSNxkhoV5QP5LXYKpT7-pxd4F32PNclv972tgUbVz2ILaWhm59CR8q9dNjWq0PikcQFjFgLenj-4VNX4wwS0kJJ"
}