---
title: Common
slug: bluecartapi/walmart-product-data-api/parameters/common
docTags: 
createdAt: 2024-07-28T10:43:16.588Z
---

# Common Parameters

<font color="#52c41a">`GET`</font>  `/request`

The following parameters are used to configure your request to the Walmart Product Data API. They should be appended as querystring parameters to a  `GET` HTTP request to the  `/request`  endpoint.

For example, to request search results, for the search term  `highlighter pens` , sorted by  `best_seller` , on  `walmart.com`  the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.bluecartapi.com/request?api_key=demo&type=search&search_term=highlighter+pens&sort_by=best_seller
```

```curl
curl -L --get https://api.bluecartapi.com/request \
-d api_key="demo" \
-d type="search" \
-d search_term="highlighter+pens" \
-d sort_by="best_seller"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  type: "search",
  search_term: "highlighter pens",
  sort_by: "best_seller"
}

// make the http GET request to BlueCart API
axios.get('https://api.bluecartapi.com/request', { params })
  .then(response => {

    // print the JSON response from BlueCart API
    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',
  'type': 'search',
  'search_term': 'highlighter pens',
  'sort_by': 'best_seller'
}

# make the http GET request to BlueCart API
api_result = requests.get('https://api.bluecartapi.com/request', params)

# print the JSON response from BlueCart API
print(json.dumps(api_result.json()))
```

```php
<?php
      
# set up the request parameters
$queryString = http_build_query([
  'api_key' => 'demo',
  'type' => 'search',
  'search_term' => 'highlighter pens',
  'sort_by' => 'best_seller'
]);

# make the http GET request to BlueCart API
$ch = curl_init(sprintf('%s?%s', 'https://api.bluecartapi.com/request', $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 from BlueCart API
echo $api_result;

?>
```
:::

:::hint{type="info"}
**Request-Specific Parameters**
Additional parameters are available depending on the type of request being made (as-determined by the  `type`  parameter).
:::

***

### Common Parameters

The following common parameters are required for all requests to the Walmart Product Data API.

| `Parameter`                   | `Required` | `Description`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key`                     | `required` | The API key for your BlueCart API account.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `walmart_domain`              | `optional` | The Walmart domain to target. The value of the walmart\_domain parameeter determines which additional parameters are available. For example, `walmart.ca` supports only `type=search` and `type= product` at this time. <br />defaults to `walmart.com`<br />Valud values for `walmart_domain` are:<br />1) `walmart_domain=walmart.com`&#x20;
2) target walmart.com domain<br /><br />1) `walmart_domain=walmart.ca`
2) target walmart.ca domain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `type`                        | `required` | The type of Walmart data to retrieve. The value of the `type` parameter determines which additional parameters are available. For example, if you make a request with `type=search` then additional [Search Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/search), specific to `search` requests, are available.  <br />Valid values for `type` are:<br />1) `search`
2) Request search results for a `search_term` or Walmart search results page `url` . See additional [Search Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/search).<br /><br />1) `category`
2) Request category-listing results for a `category_id` or Walmart search results page `url` . See additional [Category Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/category).<br /><br />1) `product`
2) Request data from a Walmart product page via an `item_id` or Walmart product page `url` . See additional [Product Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/product).<br /><br />1) `reviews`
2) Request customer reviews for an `item_id` or Walmart product page `url` . See additional [Reviews Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/reviews).<br /><br />1) `seller_profile`
2) Request seller profile data for an `seller_id` or Walmart seller profile page `url` . See additional [Seller Profile Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/seller-profile).<br /><br />1) `autocomplete`
2) Request autocomplete data for an `search_term` . See additional [Autocomplete Parameters ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/autocomplete). |
| `store_id`<br />`walmart.com` | `optional` | To use the store\_id parameter, you must [look up the store](https://docs.trajectdata.com/bluecartapi/store-ids) you want to target your request. <br />**Note**: this is optional for .com. If you include a store\_id param, it cannot be combined with customer\_zipcode. this does not require any setup.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `store_id`<br />`walmart.ca`  | `required` | To use the store\_id parameter, you must [look up the store](https://docs.trajectdata.com/bluecartapi/store-ids) you want to target your request. <br />**Note**: <br />1/ `store_id` is required for `type=product`. <br />2/ `store_id` is NOT required for `type=search`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `customer_zipcode`            | `optional` | Determines the specific customer zipcode location of the request. This is useful, for example, for seeing details highly localized listings.  <br />To use the `customer_zipcode` parameter you must first setup the zipcode in the [zipcodes section ](https://app.bluecartapi.com/zipcodes)of the Dashboard.  <br />****<br />**Note:** Zipcodes cannot be combined with store\_id. <br />For more information please see the [Customer Zipcode Reference ](https://docs.trajectdata.com/bluecartapi/zipcodes-api/overview).<br />**Store data coverage is provided on a best-effort basis. Due to variations in retailer listings and geographic availability, we cannot guarantee 100% accuracy or completeness. Some requests may return partial or no results.**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `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 ](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/reference/csv-fields).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `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**
     [Search Parameters](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/search)
     [Category Parameters](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/category)
     [Product Parameters](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/product)
     [Reviews Parameters](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/reviews)
     [Autocomplete Parameters](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/parameters/autocomplete)
