Google Places API Web Service allow the user to query for place information on a variety of categories, such as establishments, prominent points of interest, geographic locations, and more. One can search for places either by proximity or a text string. A Place Search returns a list of places along with summary information about each place; additional information is available via a Place Details query.
Text Search Service of Google Places Api is used here, which is a web service that returns information about a set of places based on a string. For example “Hotels in Delhi” or “shoe stores near Oshawa”. The service responds with a list of places matching the text string and any location bias that has been set.
To use this service, the user must need an API key, which one can get form here.
Let’s try to use this API service using Python. The modules which will be used are
Below is the implementation :
Search query: Hotels in delhi ITC Maurya Le Meridien New Delhi The Imperial New Delhi Radisson Blu Hotel New Delhi Paschim Vihar The Lalit New Delhi Crowne Plaza New Delhi Rohini Shangri-La's Eros Hotel, New Delhi Pride Plaza Hotel Aerocity, New Delhi The Claridges The Leela Ambience Convention Hotel, Delhi Radisson Blu Plaza Delhi Airport Hotel City Park Radisson Blu New Delhi Dwarka The Ashok Hotel Novotel New Delhi Aerocity Mapple Emerald The Metropolitan Hotel and Spa The Umrao Pullman New Delhi Aerocity Welcome Hotel Dwarka
- Python | Calculate geographic coordinates of places using google geocoding API
- Python | Calculate distance and duration between two places using google distance matrix API
- Python | Calculate Distance between two places using Geopy
- Performing Google Search using Python code
- Python Program for Anagram Substring Search (Or Search for all permutations)
- Python | Get a google map image of specified location using Google Static Maps API
- Python | Filtering data with Pandas .query() method
- Python | Search Key from Value
- Python | re.search() vs re.match()
- Binary Search (bisect) in Python
- Python | Search elements in a Matrix
- Python Program for Linear Search
- Python | Search in Nth Column of Matrix
- Python | Search in Nth column in list of tuples
- Python | Linear search on list or tuples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.