get_analytics
Read the analytics of one connected social media channel for the last N days: reach, impressions, followers, likes, views and whatever else the platform reports for that account (the metrics differ per platform).
Pass the integrationId from list_integrations and, optionally, days (default 7, at most 90). Returns each metric with its total for the window (a sum, or an average for rates and durations), its change against the previous window when the platform gives one, and the points per day.
Writes nothing. When there are no numbers, "available" is false and "reason" says why: the channel must be reconnected in Postemi (needs_reconnect), Postemi reads no analytics from that platform (not_supported), or the platform returned nothing for the window (no_data). Pass the "message" on to the user; never report a missing number as zero.
For one published post, use get_post_analytics.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"integrationId": "<integrationId>"
},
"name": "get_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | How many days back to look, 1 to 90. Defaults to 7. The usual windows are 7, 30 and 90. YouTube gives at most the last 30 days. | |
| integrationId | Yes | The channel, an id from list_integrations. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes |