Core APIs
...
Google
Google Places & Maps

Search

7min

Google Places Parameters

GET /search?search_type=places

Scale 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 Scale SERP provides a places_results array in the result JSON that contains the Places or Maps results.

Google Local vs. Google Maps search_type=places requests can be executed in two modes to retrieve data from a Google Local results page or from a Google Maps results page.

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 (which will result in a Google Local result), or as a latitude, longitude and zoom level (which will result in a Google Maps result).



Google Local Parameters

If the location parameter is set to a location name from the Locations API (or any other free-form location name text) - for example Manhattan,New+York,United+States then results will be returned from a Google Local page.

HTTP
Curl
Node.js
Python
PHP


Results are returned from a Google Local page as shown below.

Google Local Page
Google Local Page


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 (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 Scale SERP built-in locations 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 Scale SERP built-in location from the Locations API , 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. Scale 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 . 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 . 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 . 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 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 page.

HTTP
Curl
Node.js
Python
PHP


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 page as shown below.

Google Maps Page
Google Maps Page


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 . 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 . 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 docs for more information.



Next Steps      Google Places Results

Updated 22 Aug 2024
Did this page help you?