Core APIs
...
Google
Google Places & Maps

Search

7min
google places parameters get get /search?search type=places value serp parses google local & maps results (i e local business listings) when the search type parameter is set to search type=places when this parameter is set value serp provides a places results array in the result json that contains the places or maps results https //docs trajectdata com/valueserp/search api/results/google/places google local vs google maps search type=places requests can be executed in two modes to retrieve data from a google local results page https //www google com/search?q=pizza\&gl=us\&hl=en\&uule=w+caiqicigtwfuagf0dgfule5ldybzb3jrlfvuaxrlzcbtdgf0zxm\&tbm=lcl or from a google maps results page https //www google com/maps/search/pizza/@43 437677, 3 8392765,15z you set the location of the search type=places request using the location request parameter and this can be expressed as either a text location name from the locations api https //docs trajectdata com/valueserp/locations api/overview (which will result in a google local result https //www google com/search?q=pizza\&gl=us\&hl=en\&uule=w+caiqicigtwfuagf0dgfule5ldybzb3jrlfvuaxrlzcbtdgf0zxm\&tbm=lcl ), or as a latitude, longitude and zoom level (which will result in a google maps result https //www google com/maps/search/pizza/@43 437677, 3 8392765,15z ) google local parameters if the location parameter is set to a location name from the locations api https //docs trajectdata com/valueserp/locations api/overview (or any other free form location name text) for example manhattan,new+york,united+states then results will be returned from a google local https //www google com/search?q=pizza\&gl=us\&hl=en\&uule=w+caiqicigtwfuagf0dgfule5ldybzb3jrlfvuaxrlzcbtdgf0zxm\&tbm=lcl page http https //api valueserp com/search?api key=demo\&search type=places\&q=pizza\&location=united+statescurl l get https //api valueserp com/search \\ d api key="demo" \\ d q="pizza" \\ d search type="places" \\ d location="united+states"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", search type "places", location "united+states" } // make the http get request axios get('https //api valueserp com"/search', { params }) then(response => { // print the json response console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza', 'search type' 'places', 'location' 'united+states' } \# make the http get request api result = requests get('https //api valueserp com/search', params) \# print the json response print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'q' => 'pizza', 'search type' => 'places', 'location' => 'united+states' ]); \# make the http get request $ch = curl init(sprintf('%s?%s', 'https //api valueserp com/search', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $api result = curl exec($ch); curl close($ch); \# print the json response echo $api result; ?> results are returned from a google local https //www google com/search?q=pizza\&gl=us\&hl=en\&uule=w+caiqicigtwfuagf0dgfule5ldybzb3jrlfvuaxrlzcbtdgf0zxm\&tbm=lcl page as shown below the following parameters are available for google local requests i e requests made when search type=places and the location value is provided as a full name location name from the locations api https //docs trajectdata com/valueserp/locations api/overview (or any other free form location name text) parameter required description q required the keyword you want to use to perform the local search location optional determines the geographic location in which the query is executed you can enter any location as free text, but if you full name value from the value serp built in locations https //docs trajectdata com/valueserp/locations api/overview then the google domain , gl and hl parameters are automatically updated to the domain, country and language that match the built in location (note that this behaviour can be disabled via the location auto parameter) location auto optional if the location field is set to a value serp built in location https //docs trajectdata com/valueserp/locations api/overview from the locations api https //docs trajectdata com/valueserp/locations api/overview , and location auto is set to true (default) then the google domain , gl and hl parameters are automatically updated to the domain, country and language that match the built in location valid values are true (default) to enable this behaviour or false to disable uule optional the google uule parameter use to pass through a custom uule parameter to google value serp automatically generates the uule when you use the location parameter but we allow you to overwrite it directly by specifying a uule directly google domain optional the google domain to use to run the search query view the full list of supported google domain values here https //docs trajectdata com/valueserp/search api/reference/google domains defaults to google com gl optional the gl parameter determines the google country to use for the query view the full list of supported gl values here https //docs trajectdata com/valueserp/search api/reference/google countries defaults to us hl optional the hl parameter determines the google ui language to return results view the full list of supported hl values here https //docs trajectdata com/valueserp/search api/reference/google languages defaults to en nfpr optional determines whether to exclude results from auto corrected queries that were spelt wrong can be set to 1 to exclude auto corrected results, or 0 (default) to include them page optional determines the page of results to return, defaults to 1 use in combination with the num parameter to implement pagination max page optional use the max page parameter to get multiple pages of results in one request the api will automatically paginate through pages and concatenate the results into one response see the pagination https //docs trajectdata com/valueserp/search api/pagination docs for more information num optional determines the number of results to show per page use in combination with the page parameter to implement pagination note the maximum number of results per page google allow, for places results, is 20 google maps parameters if the location parameter is set to a latitude, longitude and zoom value for example location=lat 43 437677,lon 3 8392765,zoom 15 then results will be returned from a google maps https //www google com/maps/search/pizza/@43 437677, 3 8392765,15z page http https //api serpwow\ com/live/search?api key=demo\&search type=places\&q=pizza\&location=location=lat 43 437677,lon 3 8392765,zoom 15curl l get https //api serpwow\ com/live/search \\ d api key="demo" \\ d q="pizza" \\ d search type="places" \\ d location="location=lat 43 437677,lon 3 8392765,zoom 15"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", type "places", location "location=lat 43 437677,lon 3 8392765,zoom 15" } // make the http get request axios get('https //api valueserp com"/search', { params }) then(response => { // print the json response console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza', 'search type' 'places', 'location' 'location=lat 43 437677,lon 3 8392765,zoom 15' } \# make the http get request api result = requests get('https //api valueserp com/search', params) \# print the json response print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'q' => 'pizza', 'search type' => 'places', 'location' => 'location=lat 43 437677,lon 3 8392765,zoom 15' ]); \# make the http get request $ch = curl init(sprintf('%s?%s', 'https //api valueserp com/search', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $api result = curl exec($ch); curl close($ch); \# print the json response echo $api result; ?> formatting the location parameter for google maps requests to get google maps results based on latitude and longitude coordinates you should specify your location parameter in the form location=lat 43 437677,lon 3 8392765,zoom 15 where 43 437677 is your latitude value, 3 8392765 is your longitude value and 15 is your zoom value delimit each section with a comma , , and delimit each name/value pair with a colon valid zoom values are between 3 (maximum zoom out) and 21 (maximum zoom in) google can return results outside the bounds of the zoom level in some instances if this behaviour is not desirable then specifying strict\ true in the location parameter will only return results within the current zoom level eg lat 39 58467741051493,lon 0 6752313712718961,zoom 15,strict\ true results are returned from a google maps https //www google com/maps/search/pizza/@43 437677, 3 8392765,15z page as shown below the following parameters are available for google maps requests i e requests made when search type=places and the location value is provided as a longitude, latitude and zoom level parameter required description q required the keyword you want to use to perform the google maps search location optional determines the geographic location in which the query is executed to get google maps results based on latitude and longitude coordinates you should specify your location parameter in the form location=lat 43 437677,lon 3 8392765,zoom 15 where 43 437677 is your latitude value, 3 8392765 is your longitude value and 15 is your zoom value delimit each section with a comma , , and delimit each name/value pair with a colon valid zoom values are between 3 (maximum zoom out) and 21 (maximum zoom in) note include the google domain and hl parameters to specify the google domain and the ui language of the search results by default, the google domain and language are not based on the geographic coordinates (latitude/longitude) of the target country google domain optional the google domain to use to run the search query view the full list of supported google domain values here https //docs trajectdata com/valueserp/search api/reference/google domains defaults to google com hl optional the hl parameter determines the google ui language to return results view the full list of supported hl values here https //docs trajectdata com/valueserp/search api/reference/google languages defaults to en page optional determines the page of results to return, defaults to 1 note that the number of results per page is fixed to 20 and that the num parameter has no effect when running google maps requests max page optional use the max page parameter to get multiple pages of results in one request the api will automatically paginate through pages and concatenate the results into one response see the pagination https //docs trajectdata com/valueserp/search api/pagination docs for more information next steps google places results https //docs trajectdata com/valueserp/search api/results/google/places