---
title: Autocomplete
slug: serpwow/search-api/searches/google/autocomplete
docTags: 
createdAt: 2024-08-05T14:13:33.938Z
---

# Google Autocomplete Parameters

<font color="#52c41a">`GET`</font>  `/search?engine=google&search_type=autocomplete`

The Google Autocomplete Parameters are applicable when making a request with  `search_type=autocomplete`  to retrieve autocomplete results for a given search term. The keyword searched can be specified in the  `q`  parameter and the optional  `location`  parameter can be used to geo-locate the autocomplete request (locations can be retrieved via the [Locations API](https://docs.trajectdata.com/serpwow/locations-api/overview)).

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

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

:::CodeblockTabs
HTTP

```HTTP
https://api.serpwow.com/live/search?api_key=demo&search_type=autocomplete&q=tree&location=United+States
```

```curl
curl -L --get https://api.serpwow.com/live/search \
-d api_key="demo" \
-d search_type="autocomplete" \
-d q="tree" \
-d location="United+States"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  search_type: "autocomplete",
  q: "tree",
  location: "United+States"
}

// make the http GET request
axios.get('https://api.serpwow.com/live"/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',
  'search_type': 'autocomplete',
  'q': 'tree',
  'location': 'United+States'
}

# make the http GET request
api_result = requests.get('https://api.serpwow.com/live/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',
  'search_type' => 'autocomplete',
  'q' => 'tree',
  'location' => 'United+States'
]);

# make the http GET request
$ch = curl_init(sprintf('%s?%s', 'https://api.serpwow.com/live/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 Autocomplete Parameters

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

| `Parameter`                 | `Required` | `Description`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `engine`                    | `required` | Should be set to `engine=google` .                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `search_type`               | `required` | Should be set to `search_type=autocomplete` .                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `q`                         | `required` | The keyword you want to use to perform the Autocomplete 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 SerpWow [built-in locations ](https://docs.trajectdata.com/serpwow/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 SerpWow [built-in location ](https://docs.trajectdata.com/serpwow/locations-api/overview)from the [Locations API ](https://docs.trajectdata.com/serpwow/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. SerpWow 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/serpwow/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/serpwow/search-api/reference/google-countries). Defaults to `us` .                                                                                                                                                                                                                                                                                  |
| `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/serpwow/search-api/reference/google-languages). Defaults to `en` .                                                                                                                                                                                                                                                                                 |
| `autocomplete_search_index` | `optional` | Optional parameter to determine on which index of the string provided in the `q` param the autocomplete operation is requested. Different autocomplete results are returned by Google depending on the index within the search term the user currently has their cursor set to.                                                                                                                                                                                                                           |

***

**Next Steps**
     [Google Autocomplete Results](https://docs.trajectdata.com/serpwow/search-api/results/google/autocomplete)
