Instructions to use the search endpoint to retrieve just top trends (i.e. The most popular searches)
You can search using the empathize function.
empathize (term, start, rows, options, callback) |
Parameter | Description | Data Type | Mandatory |
---|---|---|---|
terms | The query typed by the user | String | Yes |
start | This parameter is used to paginate results from a query | Integer | No |
rows | This parameter is used to paginate results from a query | Integer | No |
options | Object that may contain information about filters and other required data for example: scope | Object | No |
callback | Function that will be executed after sending data | Function | No |
Notes:
|
var options = { lang:'en', scope:'desktop' } empathySearch.empathize('term', 1, 10, options, function(data){ //the data object will contain top trends alert('test'); }); |