5

Requirement:

  • Need to search business through the address and in the result list Business name should return.

Problem: When we search by only address of the business ( without business name ), then in the result list it returns only the address or place and does not return business name. To get the business name in the result list, I had passed "Opennow = true" in the request, which works well and return business name in the results set whenever we search through only address. But the challenge here is that, the Opennow = true returns only those businesses which opening hours are open at the search time, out of the opening hours it returns blank data.

I need the list of businesses with their name whenever we search through address only regardless of opening hours open or closed.

This is the API I am using to get text search data: "https://maps.googleapis.com/maps/api/place/textsearch/json?query=&opennow=true&types=establishment&region=us&key="

Vik
  • 5,931
  • 3
  • 31
  • 38

1 Answers1

0

I found resolution for your query in the google documentation:

https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-hotelsearch

Could you try the above, surely, it requires modifications. Hope that will solve your problem Thanks

Chetan Tete
  • 130
  • 1
  • 2
  • 9
  • Thanks Chetan for your inputs, actually It provides the list of Hotels in a particular city, and doesn't provide text search to find any specific hotel within that country. However the text search should return business/hotel name if we search with specific address, not only city/country but with complete address. So overall, it doesn't solve my problem. – Vik Apr 04 '22 at 06:44