Empathy Stats API - Reports
In this section we can see an updated list of every available reports, their descriptions, their required input parameters and the expected output for their newer implementation in the V2:
List of available reports:
URI Parameters
Parameter name | Type | Required | Description |
---|---|---|---|
start_date | int | start of date interval* (ISO 8601 format) - UTC | |
end_date | int | end of date interval* (ISO 8601 format) - UTC | |
filters | list[str] | list of filter names to be applied separated by comma | |
filter_n | list[str] | for each filter on filters, its values separated by comma | |
format | str | output format regarding the response, it can be either 'json' or 'csv'. The value by default is 'json'. |
* Note that when we are doing a filter by two dates we got records greater than or equal than the start_date and less than the end_date. For example if we want to get records from the 3rd of May to the 15th of May (both included) we need to send start_date=3/5/2017 and end_date=16/5/17.
Report IDs
Report Name | Report ID |
---|---|
Hourly Distribution Report | HourlyDist |
Daily Distribution Report | DailyDist |
Hourly Term Distribution Report | TermHourlyDist |
Daily Term Distribution Report | TermDailyDist |
Opportunities Report | Opportunities |
Top Queries Report | TopQueries |
Top Clicked Report | TopClicked |
Related Click Report | RelatedClick |
Related Wishlist Report | RelatedWishlist |
Related Add2Cart Report | RelatedAdd2Cart |
Term Success Report | TermSuccess |
Keyword Report | Keyword |
Config Count Report | ConfigCount |
Non Result Next Queries Report | NonResultNextQueries |
Trending Report | Trending |
Filter Distribution | FilterDistribution |
Example request for Opportunities Report
filters: lang=es, category=woman
report_params: max_items=10, order=desc
{base_url}/analysis/{site_id}/Opportunities?start_date=0&end_date=20&filters=lang,category,scope&lang=es&category=woman&scope=default&rows=10