Analytics
analytics:read scope.Overview
GET /v1/analytics summarizes a date range of up to 400 days: totals, the change against the previous period of the same length, a breakdown per platform, a daily series, the top posts and follower growth per account.
curl "https://postkea.com/api/v1/analytics?from=2026-09-20&to=2026-10-20" \
-H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/analytics?from=2026-09-20&to=2026-10-20", {
headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` },
});
const { data: report } = await res.json();
console.log(report);import os, requests
r = requests.get(
"https://postkea.com/api/v1/analytics",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
params={
"from": "2026-09-20",
"to": "2026-10-20",
},
)
report = r.json()["data"]
print(report){
"range": {
"from": "2026-09-20T00:00:00.000Z",
"to": "2026-10-20T00:00:00.000Z",
"timezone": "Europe/Berlin"
},
"summary": {
"posts": 42,
"impressions": 81240,
"likes": 3920,
"comments": 412,
"shares": 268,
"engagement": 4870,
"engagementRate": 5.99,
"change": {
"posts": 12,
"engagement": 23.4,
"impressions": 8.1
},
"previous": {
"posts": 37,
"engagement": 3946
}
},
"byPlatform": [
{
"platform": "instagram",
"posts": 14,
"impressions": 40210,
"engagement": 2870
}
],
"timeseries": [
{
"date": "2026-10-19",
"posts": 2,
"impressions": 3120,
"engagement": 190
}
],
"topPosts": [
{
"postId": "post_8f2k...",
"platform": "instagram",
"url": "https://www.instagram.com/p/...",
"content": "Kiln day...",
"engagement": 640
}
],
"followers": [
{
"accountId": "acc_ig_5t1p",
"platform": "instagram",
"current": 12840,
"change": 312,
"series": [
{
"date": "2026-10-19",
"followers": 12840
}
]
}
]
}Changes are percentages. engagementRate is engagement divided by impressions (or views), as a percentage, and is null when the networks report no impressions. Each network reports a different set of metrics, so missing ones are left out rather than shown as zero.
One post
GET /v1/analytics/posts/{id} returns the metrics of a post added up across platforms, and per platform with the published URL and the history of each metric over time. Metrics keep updating for a while after publishing.
curl "https://postkea.com/api/v1/analytics/posts/post_8f2k1x9q0m3v7n4b2c6d" \
-H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/analytics/posts/post_8f2k1x9q0m3v7n4b2c6d", {
headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` },
});
const { data: stats } = await res.json();
console.log(stats);import os, requests
r = requests.get(
"https://postkea.com/api/v1/analytics/posts/post_8f2k1x9q0m3v7n4b2c6d",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
)
stats = r.json()["data"]
print(stats)Best times to post
GET /v1/analytics/best-times returns a heatmap of average engagement by weekday and hour, in the workspace time zone, and the seven best slots. With at least 15 published posts it is computed from your own results (basedOn: your_posts), otherwise from general engagement patterns (basedOn: general_benchmarks).
{
"timezone": "Europe/Berlin",
"basedOn": "your_posts",
"posts": 118,
"cells": [
{
"day": 2,
"hour": 9,
"posts": 6,
"engagement": 1040,
"score": 1
}
],
"recommended": [
{
"day": 2,
"time": "09:00",
"score": 1
},
{
"day": 4,
"time": "18:00",
"score": 0.92
}
]
}recommended uses the same day and time format as posting schedules, so you can send it straight to PUT /v1/accounts/{id}/schedule.Takeaways
GET /v1/analytics/takeaways returns short, plain language suggestions based on the last four weeks: how often you post, which platform works best, posts worth repeating, drops in engagement and an empty queue. Each has a title, a body and sometimes a suggested action.
Export
GET /v1/analytics/export takes the same range filters and returns a CSV file with one row per published post and platform.
curl "https://postkea.com/api/v1/analytics/export?from=2026-09-01&to=2026-09-30" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-o september.csv