Core APIs
...
Google
Shopping & Products
Search
3min
google shopping parameters get get /search?search type=shopping the google shopping parameters are applicable when making a request with search type=shopping to retrieve shopping results for a given search term the search term is specified in the q parameter and the optional location parameter can be used to geo locate the shopping request (locations can be retrieved via the locations api https //docs trajectdata com/valueserp/locations api/overview ) for example, to request shopping results for the keyword pizza in the location united states , the request would be http https //api valueserp com/search?api key=demo\&search type=shopping\&q=pizza\&location=united+statescurl l get https //api valueserp com/search \\ d api key="demo" \\ d q="pizza" \\ d search type="shopping" \\ d location="united+states"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", search type "shopping", 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' 'shopping', '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' => 'shopping', '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; ?> google shopping parameters the following parameters are available for all requests made when search type=shopping parameter required description search type required should be set to search type=shopping q required the keyword you want to use to perform the shopping search location optional determines the geographic location in which the query is executed you can enter any location as free text, but if you choose one of 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 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 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 num parameter is not always honoured by google for search type=shopping requests when using the num parameter you are requesting that number of results per page there is no guarantee that that number of results will necessarily be served sort by optional sets the sort ordering of the shopping results returned valid values are relevance sort shopping results by relevance to the search term supplied in the q parameter, the default price low to high sort shopping results by lowest to highest price price high to low sort shopping results by highest to lowest price review score sort shopping results by review score, highest review score first shopping buy on google optional determines whether the "buy on google" option is selected when running a search type=shopping search valid values are true or false shopping filter optional a shopping filter (i e "brand") to filter the results to shopping filter values are returned in the filters property of the shopping response https //docs trajectdata com/valueserp/search api/results/google/shopping shopping price min optional the minimum price of products for example shopping price min=4 99 shopping price max optional the maximum price of products returned for example shopping price max=29 99 shopping condition optional the condition of products returned can be set to new or used shopping merchants optional a comma separated list of merchant ids to retrieve shopping results merchant id's can be found in the merchagg section of any google shopping url next steps google shopping results https //docs trajectdata com/valueserp/search api/results/google/shopping