---
title: Autocomplete
slug: bluecartapi/walmart-product-data-api/parameters/autocomplete
docTags: 
createdAt: 2024-07-27T17:51:31.976Z
---

# Autocomplete Parameters

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

When making a request with the  `type`  parameter set to  `type=autocomplete`  BlueCart API will return autocomplete suggestions for the search term specified in the  `search_term`  parameter.

:::hint{type="warning"}
`type=autocomplete` is not supported for `walmart.ca`
:::



![](https://apiimages.imgix.net/bluecartapi/images/png/docs/autocomplete.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=600 "Autocomplete Suggestions")

For example, to request autocomplete suggestions for the search term  `memory`  the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.bluecartapi.com/request?api_key=demo&type=autocomplete&search_term=memory
```

```curl
curl -L --get https://api.bluecartapi.com/request \
-d api_key="demo" \
-d type="autocomplete" \
-d search_term="memory"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  type: "autocomplete",
  search_term: "memory"
}

// 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': 'autocomplete',
  'search_term': 'memory',
}

# 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' => 'autocomplete',
  'search_term' => 'memory',
]);

# 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;

?>
```
:::

***

### Autocomplete Parameters

The following parameters are available for all requests made when  `type=autocomplete` .

| `Parameter`   | `Required` | `Description`                                        |
| ------------- | ---------- | ---------------------------------------------------- |
| `search_term` | `required` | The search term to get autocomplete suggestions for. |

***

**Next Steps**
     [Autocomplete Results](https://docs.trajectdata.com/bluecartapi/walmart-product-data-api/results/autocomplete)
