Core APIs
...
Search API
Parameters

Common

2min

Common Parameters

GET /search

The following parameters are used to configure your Search API request. They should be appended as querystring parameters to the Search API GET HTTP request.

An example request is below:

HTTP
Curl
Node.js
Python
PHP


Parameter

Required

Description

api_key

required

The API key for your Scale SERP account.

search_type

optional

The type of request to make. The value of the type parameter determines which additional parameters are available. For example, if you make a request with search_type= news then additional Google News Parameters , specific to news requests, are available.

Valid values for search_type are:

  1. (not set)
  2. If the search_type parameter is omitted then a regular web search is performed. See additional Google Search Parameters .



  1. news
  2. Perform a Google News request. See additional See additional Google News Parameters .



  1. images
  2. Perform a Google Images request. See additional See additional Google Images Parameters .



  1. videos
  2. Perform a Google Videos request. See additional See additional Google Videos Parameters .



  1. scholar
  2. Perform a Google Scholar request. See additional See additional Google Scholar Parameters .



  1. autocomplete
  2. Perform a Google Autocomplete request. See additional See additional Google Autocomplete Parameters .



  1. places
  2. Perform a Google Places request. See additional See additional Google Places Parameters .



  1. place_details
  2. Perform a Google Place Details request to get further information on a given Place. See additional See additional Google Place Details Parameters .



  1. place_photos
  2. Perform a Google Place Photos request to get Place Photos for a given Place. See additional See additional Google Place Photos Parameters .



  1. place_reviews
  2. Perform a Google Place Reviews request to get Place Reviews for a given Place. See additional See additional Google Place Reviews Parameters .



  1. place_products
  2. Perform a Google Place Products request to get Place Products for a given Place. See additional See additional Google Place Products Parameters .



  1. place_posts
  2. Perform a Google Place Posts request to get Place Posts for a given Place. See additional See additional Google Place Posts Parameters .



  1. shopping
  2. Perform a Google Shopping search results. See additional See additional Google Shopping Parameters .



  1. product
  2. Perform a Google Product results for a single product. See additional See additional Google Product Parameters . Note that when making a search_type=product request the product_type parameter determines the type of Product request, available values for product_type are:

url

optional

Specifies the URL to open (instead of specifying a query using the q parameter).

Note To specify the type of parsing applied to the results from the url parameter, use the search_type parameter.

Note The url parameter must be URL-encoded. The url parameter is not available for all search_type values.

device

optional

Determines the device to use to get results.

Can be set to desktop (default) to use a regular desktop web browser, tablet to use a tablet browser (use the tablet_type to choose the type of tablet device), or mobile to use a mobile browser (use the mobile_type to choose the type of mobile device).

Note that not all search_type values are parsed for each device (for example, some results are parsed in desktop only), see the individual results for more information.

mobile_type

optional

Applies when device=mobile and determines the type of mobile device used to get results.

Can be set to iphone for an iPhone mobile device, or android for an Android mobile device.

tablet_type

optional

Applies when device=tablet and determines the type of tablet device used to get results.

Can be set to ipad for an iPad device, or android for an Android tablet device.

output

optional

Determines the format in which results are returned. Can be set to json (default) to get the results as structured JSON, html to get the raw html retrieved or csv to return the results in CSV format. When using csv you can also use the csv_fields parameter to specify which fields to return in the CSV.

csv_fields

optional

Determines the fields that are returned when returning in csv mode (i.e. when the output parameter is set to csv ). Should be specified as a comma seperated list of fields (in nested field, dot notation, format). For more information on the csv_fields parameter please see the CSV Fields Reference .

include_html

optional

Determines whether raw HTML is included in the response (this can increase the size of the response). Can be set to true or false (the default).

Note When adding searches with include_html=true to a Batch the maximum number of searches is lower (100) because including the HTML within the response makes the Batch Result Sets much larger. The limit is in place to ensure Result Set files are of a manageable size. If you have need to run a large number of searches all with include_html=true then simply split the searches across multiple 100-search Batches.

skip_on_incident

optional

Instructs the API to not serve requests when a parsing incident is detected. Valid values are all (where the API will not serve a response if a "degraded" or "major" parsing incident is live) and major_only (where the API will not serve a response is a "major" parsing incident is live, but will if a "degraded service" parsing incident is live).

You can view service status via the status page .

Using skip_on_incident can be desirable if your system is making unsupervised requests to the API that you would like to gracefully fail in the event of an incident.

hide_base64_images

optional

Instructs the API to not include Base64 images in the response. Base64-encoded images from SERP pages can increase the size of the response considerably so sometimes it's desirable to have them excluded from the API response.

Note that this parameter is set to hide_base64_images=true by default when using Batches (to minimise the size of the Batch Result Sets).

cookie

optional

The cookie string to send along with the request. Should be URL-encoded. Use this parameter to send custom cookies along with the request made. It will be sent in the cookie HTTP Header made by the platform.

include_fields

optional

A comma-seperated list JSON field names to include in the JSON object the API returns. You can specify the field names in dot notation - i.e. include_fields=pagination will only include the the pagination property in the response JSON. Use include_fields if you only want to include specific fields in the API's JSON response.

exclude_fields

optional

A comma-seperated list of JSON field names to exclude from the JSON object the API returns. You can specify the field names in dot notation - i.e. exclude_fields=pagination will remove the pagination property from the response JSON. Use exclude_fields if there are specific fields you wish to exclude from the API's JSON response.



Next Steps      Google Search Parameters

Updated 22 Aug 2024
Did this page help you?