interestByRegion = function (t, r){var o=(0,n.constructObj)(t,r),i=o.cbFunc,u=o.obj;return u instanceof Error?Promise.reject(i(u)):(0,n.getResults)( e,u).then(function(e){return i(null,e)})["catch"](function(e){return Promise.reject(i(e))})}
...
<hr>
#### interestByRegion
*See in which location your term was most popular during the specified time frame. Values are calculated on a scale from 0 to 100
, where 100 is the location with the most popularity as a fraction of total searches in that location.*
#####Syntax
`googleTrends.interestByRegion({keyword: string, startTime: Date, endTime: Date, geo:
string, resolution: string}, cbFunc)`
Requires an `object` as the first parameter with the following keys:
* `keyword` - **required** - type `string` or `array` - the search term(s) of interest
* `startTime` - *optional* - type `Date` object - the start of the time range of interest (defaults to `new Date('2004-01-01
')` if not supplied)
* `endTime` - *optional* - type `Date` object - the end of the time range of interest (defaults to `new Date(Date.now())` if not
supplied)
* `geo` - *optional* - type `string` - geocode for a country, region, or DMA depending on the granularity required (defaults to
worldwide). For example, `geo: 'US-CA-800'` will target the Bakersfield, California, United States or `geo: 'US
x27;` will just target the US.
* `resolution` - *optional* - type `enumerated string` either `COUNTRY`, `REGION`, `CITY` or `DMA`. Resolution is selected by default
otherwise. Trying to select a resolution larger than a specified `geo` will return an error.
...
interestOverTime = function (t, r){var o=(0,n.constructObj)(t,r),i=o.cbFunc,u=o.obj;return u instanceof Error?Promise.reject(i(u)):(0,n.getResults)( e,u).then(function(e){return i(null,e)})["catch"](function(e){return Promise.reject(i(e))})}
...
<hr>
## API
### Promises
By default, all the API's return a promise for the results. Example:
```js
googleTrends.interestOverTime({keyword: 'Women\'s march'})
.then(function(results){
console.log('These results are awesome', results);
})
.catch(function(err){
console.error('Oh no there was an error', err);
});
```
...
relatedQueries = function (t, r){var o=(0,n.constructObj)(t,r),i=o.cbFunc,u=o.obj;return u instanceof Error?Promise.reject(i(u)):(0,n.getResults)( e,u).then(function(e){return i(null,e)})["catch"](function(e){return Promise.reject(i(e))})}
...
<hr>
#### relatedQueries
*Users searching for your term also searched for these queries.*
#####Syntax
`googleTrends.relatedQueries({keyword: string, startTime: Date, endTime: Date, geo: string
}, cbFunc)`
Requires an `object` as the first parameter with the following keys:
* `keyword` - **required** - type `string` or `array` - the search term(s) of interest
* `startTime` - *optional* - type `Date` object - the start of the time range of interest (defaults to `new Date('2004-01-01
')` if not supplied)
* `endTime` - *optional* - type `Date` object - the end of the time range of interest (defaults to `new Date(Date.now())` if not
supplied)
* `geo` - *optional* - type `string` - geocode for a country, region, or DMA depending on the granularity required (defaults to
worldwide). For example, `geo: 'US-CA-800'` will target the Bakersfield, California, United States or `geo: 'US
x27;` will just target the US.
* `hl` - *optional* - type `string` - preferred language code for results (defaults to english)
...
relatedTopics = function (t, r){var o=(0,n.constructObj)(t,r),i=o.cbFunc,u=o.obj;return u instanceof Error?Promise.reject(i(u)):(0,n.getResults)( e,u).then(function(e){return i(null,e)})["catch"](function(e){return Promise.reject(i(e))})}
...
<hr>
#### relatedTopics
*Users searching for your term also searched for these topics*
#####Syntax
`googleTrends.relatedTopics({keyword: string, startTime: Date, endTime: Date, geo: string
}, cbFunc)`
Requires an `object` as the first parameter with the following keys:
* `keyword` - **required** - type `string` or `array` - the search term(s) of interest
* `startTime` - *optional* - type `Date` object - the start of the time range of interest (defaults to `new Date('2004-01-01
')` if not supplied)
* `endTime` - *optional* - type `Date` object - the end of the time range of interest (defaults to `new Date(Date.now())` if not
supplied)
* `geo` - *optional* - type `string` - geocode for a country, region, or DMA depending on the granularity required (defaults to
worldwide). For example, `geo: 'US-CA-800'` will target the Bakersfield, California, United States or `geo: 'US
x27;` will just target the US.
* `hl` - *optional* - type `string` - preferred language code for results (defaults to english)
...