Histogram from a talkwalker project
Retrieve the distribution of the number of search results for a given search query. Histograms can be made for distribution over time or over specific metrics.
Path Parameters
- project_id string requiredExample: a1ab1abc-a123-123a-123a-abcd12ab1a12
- type string requiredExample: published
Query Parameters
- q string
The query to search for.
Example: cats AND dogs - min string
Minimum value for bins
- max string
Maximum value for bins
- min_include string
Include min value. Allowed values: true or false. Default value: true.
- max_include string
Include max value. Allowed values: true or false. Default value: false.
- interval string
Bin Interval. Duration for published and search_indexed / Integer for histogram / not used for distribution.
- timezone string
Timezone for the duration interval (e.g. Europe/Luxembourg). Allowed values are timezone names. Default value: UTC
Example: UTC - breakdown string
Nested histogram. Allowed values: sentiment, sourcetype, country, topic, channel.
Example: sentiment - value_type string
Nested metric for time based histograms.
Example: engagement - top_n integer
Size limiter for demographic distribution.
Example: 10 - forecast_days integer
Time series forecast in days for enabled projects. Available for histogram types
published
andsearch_indexed
Value: [1, 90]Example: 14
- 200
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"request": "GET /api/v1/search/p/a1ab1abc-a123-123a-123a-abcd12ab1a12/histogram/published?q=cats%20AND%20dogs&timezone=UTC&breakdown=sentiment&value_type=engagement&top_n=10&access_token=abcd_1234_abcd",
"request_id": "#r8vmxsvivoqa#",
"result_histogram": {
"data": [
{
"t": 1646870400000,
"v": [
0,
11,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 11,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1646956800000,
"v": [
0,
5,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 5,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647043200000,
"v": [
0,
6,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 6,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647129600000,
"v": [
0,
9,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 9,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647216000000,
"v": [
1,
3,
0
],
"val": [
{
"avg": 0,
"count": 1,
"max": 0,
"min": 0,
"sum": 0
},
{
"avg": 0,
"count": 3,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647302400000,
"v": [
0,
2,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 2,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647388800000,
"v": [
0,
4,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 4,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
},
{
"t": 1647475200000,
"v": [
0,
1,
0
],
"val": [
{
"count": 0,
"sum": 0
},
{
"avg": 0,
"count": 1,
"max": 0,
"min": 0,
"sum": 0
},
{
"count": 0,
"sum": 0
}
]
}
],
"header": {
"v": [
"POSITIVE",
"NEUTRAL",
"NEGATIVE"
]
}
},
"status_code": "0",
"status_message": "OK"
}