Google Places API Text Search Example Using JavaScript
Last modified on April 17th, 2023
Raja Tamil
Text search is part of Google Places API as well.
Text Search Request returns a set of places based on the text query string.
For Example: “Restaurants in Toronto“
Text Search Request Base URL
https://maps.googleapis.com/maps/api/place/textsearch/
Request URL Parameter (Required)
name | description |
---|---|
JSON or XML | Output format (json recommended) |
[blog-in-between-card]
Request Query Parameters (Required)
name | description |
---|---|
key | Your API Key from Google Cloud Platform |
query | The value can be single or multiple words. For Example: “Restaurants in Toronto” |
Sample URL Request To Text Search
https://maps.googleapis.com/maps/api/place/textsearch/json?key=[YOURAPIKEY]&query=restaurants-in-toronto
Text Search Response JSON Object

Show/Post Comments