Get the analytics of a post
curl --request GET \
--url https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics', 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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics",
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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics"
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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics")
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_body{
"summary": {
"totals": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
},
"trends": {
"views": [
{
"date": "2026-01-15",
"value": 123
}
],
"likes": [
{
"date": "2026-01-15",
"value": 123
}
],
"comments": [
{
"date": "2026-01-15",
"value": 123
}
],
"shares": [
{
"date": "2026-01-15",
"value": 123
}
]
},
"engagement_rate": 4,
"breakdown": {
"likes": {
"value": 123,
"percentage": 123
},
"comments": {
"value": 123,
"percentage": 123
},
"shares": {
"value": 123,
"percentage": 123
}
},
"funnel": {
"views": 123,
"interactions": 123,
"shares": 123,
"view_to_interaction_rate": 123,
"interaction_to_share_rate": 123
},
"peak_day": {
"date": "2023-12-25",
"total": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
},
"winner": {
"account_id": 123,
"metrics": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
},
"engagement_rate": 123
},
"accounts": [
{
"account_id": 123,
"account_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metrics": [
{
"key": "VIEW_COUNT",
"label": "View count",
"value": 123
}
],
"trends": {},
"engagement_rate": 123,
"breakdown": {
"likes": {
"value": 123,
"percentage": 123
},
"comments": {
"value": 123,
"percentage": 123
},
"shares": {
"value": 123,
"percentage": 123
}
},
"vs_average": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"engagement": 123
},
"peak_day": {
"date": "2023-12-25",
"total": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
}
]
}Analytics
Get the analytics of a post
How a post did on each account it went out to. Accounts it did not go out to are left out, so a post that is not published yet has an empty summary and accounts. Trashed posts can still be read. Trends are daily; a post tracked for 60 days or more is grouped by week (each point dated with its Monday), and one tracked for 180 days or more by month (YYYY-MM).
Read-only. Personal access tokens may call it with any workspace role, viewers included.
Required permission: publishing:analytics:read
GET
/
{workspace}
/
posts
/
{post}
/
analytics
Get the analytics of a post
curl --request GET \
--url https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics', 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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics",
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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics"
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.onlysocial.io/os/api/{workspace}/posts/{post}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/posts/{post}/analytics")
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_body{
"summary": {
"totals": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
},
"trends": {
"views": [
{
"date": "2026-01-15",
"value": 123
}
],
"likes": [
{
"date": "2026-01-15",
"value": 123
}
],
"comments": [
{
"date": "2026-01-15",
"value": 123
}
],
"shares": [
{
"date": "2026-01-15",
"value": 123
}
]
},
"engagement_rate": 4,
"breakdown": {
"likes": {
"value": 123,
"percentage": 123
},
"comments": {
"value": 123,
"percentage": 123
},
"shares": {
"value": 123,
"percentage": 123
}
},
"funnel": {
"views": 123,
"interactions": 123,
"shares": 123,
"view_to_interaction_rate": 123,
"interaction_to_share_rate": 123
},
"peak_day": {
"date": "2023-12-25",
"total": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
},
"winner": {
"account_id": 123,
"metrics": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
},
"engagement_rate": 123
},
"accounts": [
{
"account_id": 123,
"account_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metrics": [
{
"key": "VIEW_COUNT",
"label": "View count",
"value": 123
}
],
"trends": {},
"engagement_rate": 123,
"breakdown": {
"likes": {
"value": 123,
"percentage": 123
},
"comments": {
"value": 123,
"percentage": 123
},
"shares": {
"value": 123,
"percentage": 123
}
},
"vs_average": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"engagement": 123
},
"peak_day": {
"date": "2023-12-25",
"total": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
}
]
}Authorizations
bearerAuthapiKeyHeader
A workspace API key: Authorization: Bearer osk_...
Path Parameters
Your workspace UUID. Must match the API key's workspace.
Post UUID.
