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

# Google Trends Parameters

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

The Google Trends Parameters are applicable when making a request with  `search_type=trends`  to retrieve Google's Interest Over Time trend or Interest by Subregion trend results for a given search term. The search term is specified in the  `q`  parameter. The trend is specified with the `data_type`  parameter.&#x20;

:::hint{type="info"}
**Localizing Google Trends Requests**
To localize Trends requests you should use the  `trends_geo`  request parameter. For a list of all available  `trends_geo`  values see the [Trends Geo Reference](https://docs.trajectdata.com/serpwow/search-api/reference/google-trends-geos).
:::

![](https://api.archbee.com/api/optimize/jtAIsxCBIs4n3NKUFk7ZE-I9KhFcYBu9H6RIAKd8ixw-20241009-185550.png "Google Trends")

:::hint{type="info"}
**Multiple Trends Keywords**
You can request comparative Trends results for up to 5 keywords in one request. Specify multiple trends keywords in comma-seperated notation in the  `q`  parameter. For example, to replicate the request shown in the screenshot below the  `q`  parameter would be  `q=pizza,burger,chips,sausages,bread` .

![](https://apiimages.imgix.net/serpwow/images/png/docs/google_trends_compare.png?auto=format&ixlib=react-9.5.1-beta.1&w=650)
:::

To request Trends results for the keyword  `pizza` , worldwide (i.e. without a  `trends_geo`  parameter), the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.serpwow.com/live/search?api_key=demo&search_type=trends&q=pizza&data_type=INTEREST_OVER_TIME
```

```curl
curl -L --get https://api.serpwow.com/live/search \
-d api_key="demo" \
-d q="pizza" \
-d search_type="trends"\
-d data_type="INTEREST_OVER_TIME"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  q: "pizza",
  search_type: "trends",
  data_type: "INTEREST_OVER_TIME"
}

// 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',
  'q': 'pizza',
  'search_type': 'trends',
  'data_type': 'INTEREST_OVER_TIME'
}

# 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',
  'q' => 'pizza',
  'search_type' => 'trends',
  'data_type' => 'INTEREST_OVER_TIME'
]);

# 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 Trends Parameters

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

| *`Parameter`*         | *`Required`*        | *`Description`*                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *`engine`*            | <u>*`required`*</u> | Should be set to `engine=google` .                                                                                                                                                                                                                                                                                                                                                                                                                    |
| *`search_type`*       | <u>*`required`*</u> | Should be set to `search_type=trends` .                                                                                                                                                                                                                                                                                                                                                                                                               |
| *`q`*                 | <u>*`required`*</u> | The keyword you want to use to perform the Trends search. You can request up to 5 Trends keywords to compare in one request. To specify multiple keywords, seperate each with a comma - i.e. `q=dog,cat` .                                                                                                                                                                                                                                            |
| *`data_type`*         | <u>*`required`*</u> | The type of trend you want results for, Interest over time or the Interest by subregion. Set data\_type to `data_type=INTEREST_OVER_TIME` or `data_type=INTEREST_BY_SUBREGION`.                                                                                                                                                                                                                                                                       |
| *`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` .                                                                                                                                                                                                                           |
| *`time_period`*       | *`optional`*        | Determines the time period of the results shown. It can be set to `last_hour` , `last_day` (for the last 24 hours), `last_week` (for the last 7 days), `last_month` , `last_year` or `custom` . When using `custom` you must also specifiy one or both of the `time_period_min` or `time_period_max` parameters to define the custom time period.                                                                                                     |
| *`time_period_min`*   | *`optional`*        | Determines the minimum (i.e. 'from') time to use when `time_period` is set to `custom` . Should be in the form `MM/DD/YYYY` , I.e. for 31st December 2018 `time_period_min` would be `12/31/2018` .                                                                                                                                                                                                                                                   |
| *`time_period_max`*   | *`optional`*        | Determines the maximum (i.e. 'to') time to use when `time_period` is set to `custom` . Should be in the form `MM/DD/YYYY` , I.e. for 31st December 2018 `time_period_max` would be `12/31/2018` .                                                                                                                                                                                                                                                     |
| *`trends_type`*       | *`optional`*        | Determines the Google property to search for Trends data. Valid values are `web` , `images` , `news` , `youtube` or `shopping` .                                                                                                                                                                                                                                                                                                                      |
| *`trends_resolution`* | *`optional`*        | Determines the resolution requested for the `trends_interest_by_subregion` section of SerpWow's Google Trends results. Valid values are `country` , `city` , `dma` or `region` .                                                                                                                                                                                                                                                                      |
| *`trends_geo`*        | *`optional`*        | A Google Trends Geo ID - typically a 2-letter country code, for example `trends_geo=DE` for Trends data for Germany. Can also specify a more specific `trends_geo` for a specific location within a country. View the full list of supported `trends_geo` values [here ](https://docs.trajectdata.com/serpwow/search-api/reference/google-trends-geos).  <br />Omit the `trends_geo` parameter entirely if you wish to run your query as "worldwide". |
| *`trends_category`*   | *`optional`*        | A Google Trends Category ID. View the full list of supported `trends_category` values [here ](https://docs.trajectdata.com/serpwow/search-api/reference/google-trends-categories).                                                                                                                                                                                                                                                                    |

***

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