In any app which tries to find information like that, it needs to have an integration with a third party. Local data like pubs, resturants, ATMs and others, can be fetched from these third parties like Google Place, FourSquare etc. They provide Rest APIs which can be fed to mobile apps.
If the restaurant is registered with the third party that has been integrated with the smartphone, then it will show as a search result. If it is not registered, then it will not come as a search result.
If the app is made by a company which has its own database, then the smartphone will be integrated to its own information. There is no codified way of showing information on searches like these.