---
title: Search
slug: valueserp/search-api/searches/google/shopping
docTags: 
createdAt: 2024-08-03T11:00:15.050Z
---

# Google Shopping Parameters

<font color="#52c41a">`GET`</font>  `/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)).

![](https://apiimages.imgix.net/valueserp/images/png/docs/google_shopping_search.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=600 "Google Shopping Results")

For example, to request shopping results for the keyword  `pizza`  in the location  `United States` , the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.valueserp.com/search?api_key=demo&search_type=shopping&q=pizza&location=United+States
```

```curl
curl -L --get https://api.valueserp.com/search \
-d api_key="demo" \
-d q="pizza" \
-d search_type="shopping" \
-d location="United+States"
```

```nodejs
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);
  })
```

```python
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
<?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` .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `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.  <br />See the [Pagination ](https://docs.trajectdata.com/valueserp/search-api/pagination)docs for more information.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `sort_by`                | `optional` | Sets the sort ordering of the shopping results returned. Valid values are:<br />::Image[]{src="https://apiimages.imgix.net/valueserp/images/png/docs/google_shopping_search_sort_by.png?auto=format&ixlib=react-9.5.1-beta.1&w=200" size="100" width="200" height="137" position="center" showCaption="false" indent="2"}<br />1) `relevance`&#x20;
2) Sort shopping results by relevance to the search term supplied in the `q` parameter, the default.<br /><br />1) `price_low_to_high`&#x20;
2) Sort shopping results by lowest to highest price.<br /><br />1) `price_high_to_low`&#x20;
2) Sort shopping results by highest to lowest price.<br /><br />1) `review_score`&#x20;
2) 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` .<br />::Image[]{src="https://apiimages.imgix.net/valueserp/images/png/docs/shopping_buy_on_google.png?auto=format&ixlib=react-9.5.1-beta.1&w=200" size="100" width="200" height="25" position="center" showCaption="false" indent="2"}                                                                                                                                                                                                                                                                                                                                                                          |
| `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).<br />::Image[]{src="https://apiimages.imgix.net/valueserp/images/png/docs/google_shopping_search_filter.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" size="100" width="150" height="211" position="center" showCaption="false" indent="2"}                                                                                                                                                                                                                                                                              |
| `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)
