Get Quarterly Performance Report ⚠️ Experimental
Roll up a quarter of publishing activity into a single aggregate. Useful for BI exports, board-deck stats, or year-on-year comparisons without paginating through every post.
When authenticating via OAuth, requires the insights:read scope; personal API keys don't need it. The aggregation window is capped to 365 days.
query QuarterlyPerformanceReport {
aggregatedPostMetrics(
input: {
organizationId: "some_organization_id"
startDateTime: "2026-01-01T00:00:00Z"
endDateTime: "2026-03-31T23:59:59Z"
channelIds: ["some_channel_id", "another_channel_id"]
tags: { in: ["some_tag_id"] }
}
) {
metrics {
type
name
value
unit
}
metricsUpdatedAt
}
}
curl -X POST 'https://api.buffer.com' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{"query": "query QuarterlyPerformanceReport {\n aggregatedPostMetrics(\n input: {\n organizationId: \"some_organization_id\"\n startDateTime: \"2026-01-01T00:00:00Z\"\n endDateTime: \"2026-03-31T23:59:59Z\"\n channelIds: [\"some_channel_id\", \"another_channel_id\"]\n tags: { in: [\"some_tag_id\"] }\n }\n ) {\n metrics {\n type\n name\n value\n unit\n }\n metricsUpdatedAt\n }\n}"}'
async function quarterlyPerformanceReport() {
const response = await fetch('https://api.buffer.com', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
},
body: JSON.stringify({
query: `
query QuarterlyPerformanceReport {
aggregatedPostMetrics(
input: {
organizationId: "some_organization_id"
startDateTime: "2026-01-01T00:00:00Z"
endDateTime: "2026-03-31T23:59:59Z"
channelIds: ["some_channel_id", "another_channel_id"]
tags: { in: ["some_tag_id"] }
}
) {
metrics {
type
name
value
unit
}
metricsUpdatedAt
}
}
`,
}),
});
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
quarterlyPerformanceReport();
import requests
query = """
query QuarterlyPerformanceReport {
aggregatedPostMetrics(
input: {
organizationId: "some_organization_id"
startDateTime: "2026-01-01T00:00:00Z"
endDateTime: "2026-03-31T23:59:59Z"
channelIds: ["some_channel_id", "another_channel_id"]
tags: { in: ["some_tag_id"] }
}
) {
metrics {
type
name
value
unit
}
metricsUpdatedAt
}
}
"""
response = requests.post(
"https://api.buffer.com",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
},
json={
"query": query,
},
)
data = response.json()
print(data)
<?php
$query = '
query QuarterlyPerformanceReport {
aggregatedPostMetrics(
input: {
organizationId: "some_organization_id"
startDateTime: "2026-01-01T00:00:00Z"
endDateTime: "2026-03-31T23:59:59Z"
channelIds: ["some_channel_id", "another_channel_id"]
tags: { in: ["some_tag_id"] }
}
) {
metrics {
type
name
value
unit
}
metricsUpdatedAt
}
}
';
$payload = [
'query' => $query,
];
$ch = curl_init('https://api.buffer.com');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
The result includes a synthetic postCount entry (number of matched posts in the window) alongside the metric aggregates. To compare quarters, run the query twice with different startDateTime/endDateTime windows and diff the values client-side.