Recent Searches API
The Recent Searches API returns the recent searches for for a particular time period.
There are two ways to get recent searches. One is to specify 'day', 'month', 'year', 'hour' or 'minute' parameters to get recent searches in the last number of days, months, years, hours or minutes.
The other is to specify a timestamp for 'start' and 'end' to search within a specific date range.
Minimum Tag
{{ _api.search.getRecentSearches.templateId('3') }}
Example Tags
Get the recent searches in the last 4 days.
{{ _api.search.getRecentSearches.templateId('3').days('4') }}
Gets the recent searches between the dates that the starting and ending timestamps represent.
{{ _api.search.getRecentSearches.templateId('3').start('1249684194').end('1331563683') }}
API Tag Parameters
Parameter | Description |
---|---|
days |
The number of recent days to get results for. Defaults to 0. Type: Integer Example: days('3') |
end |
The timestamp for the ending value of the date range to return results for. Type: Integer Example: end('1331563683') |
hours |
The number of recent hours to get results for. Defaults to 0. Type: Integer Example: hours('12') |
limit l |
The number of results to return. Defaults to return all matching results (no limit). You can alternately use the short form "l" instead of "limit" Type: Integer Examples: limit(5) |
minutes |
The number of recent minutes to get results for. Defaults to 0. Type: Integer Example: minutes('30') |
months |
The number of recent months to get results for. Defaults to 0. Type: Integer Example: months('2') |
responseFormat |
Sets how the API response will be returned. Type: String Accepted Values:
Example: responseFormat('ui') |
start |
The timestamp for the starting value of the date range to return results for. Type: Integer Example: start('1249684194') |
template t |
Required if responseFormat is not 'data'. The template key of the template to use. If this is not passed when it's required then nothing will be returned. In some cases, by not passing this parameter you will get just the raw data back. You an alternately use the short form "t" instead of "template" Type: String Examples: template('template-key') |
years |
The number of recent years to get results for. Defaults to 0. Type: Integer Example: years('1') |