Get post metrics
curl --request GET \
--url https://app.getkavio.app/api/posts/{post}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getkavio.app/api/posts/{post}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getkavio.app/api/posts/{post}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.getkavio.app/api/posts/{post}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.getkavio.app/api/posts/{post}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.getkavio.app/api/posts/{post}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getkavio.app/api/posts/{post}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPosts
Get post metrics
Fetch engagement metrics (likes, comments, shares, etc.) for a published post across every platform.
GET
/
posts
/
{post}
/
metrics
Get post metrics
curl --request GET \
--url https://app.getkavio.app/api/posts/{post}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getkavio.app/api/posts/{post}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getkavio.app/api/posts/{post}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.getkavio.app/api/posts/{post}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.getkavio.app/api/posts/{post}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.getkavio.app/api/posts/{post}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getkavio.app/api/posts/{post}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPath parameters
string
required
The UUID of the post.
Behaviour
- The post must belong to the caller’s current workspace; otherwise the response is
404. - Returns one entry per enabled platform on the post.
- A platform entry returns
metrics: { unsupported: true, reason: "not_published" }when the platform hasn’t been published yet, and{ unsupported: true, reason: "platform_not_supported" }for platforms that don’t expose post-level metrics. Today that’s TikTok and personal LinkedIn (linkedin); LinkedIn Pages (linkedin-page) and every other platform return real metrics. - Successful metrics responses are cached for 5 minutes per
post_platform.
Response
{
"post_id": "9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"platforms": [
{
"post_platform_id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"platform": "linkedin",
"status": "published",
"platform_post_id": "urn:li:share:7263...",
"platform_url": "https://www.linkedin.com/feed/update/urn:li:share:7263...",
"metrics": [
{ "label": "Likes", "value": 42 },
{ "label": "Comments", "value": 7 }
]
},
{
"post_platform_id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
"platform": "x",
"status": "pending",
"platform_post_id": null,
"platform_url": null,
"metrics": {
"unsupported": true,
"reason": "not_published"
}
}
]
}
curl https://app.getkavio.app/api/posts/9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c/metrics \
-H "Authorization: Bearer YOUR_API_KEY"

