Get post analytics summary
curl --request GET \
--url https://mvp.tryunsora.com/api/v1/posts/analytics/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://mvp.tryunsora.com/api/v1/posts/analytics/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mvp.tryunsora.com/api/v1/posts/analytics/summary', 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://mvp.tryunsora.com/api/v1/posts/analytics/summary",
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://mvp.tryunsora.com/api/v1/posts/analytics/summary"
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://mvp.tryunsora.com/api/v1/posts/analytics/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/posts/analytics/summary")
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{
"success": true,
"data": {
"days": 123,
"totals": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
},
"postCount": 123,
"byPlatform": [
{
"platform": "<string>",
"posts": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
}
],
"timeseries": [
{
"date": "2023-12-25",
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
],
"posts": [
{
"postAccountId": "<string>",
"platform": "<string>",
"caption": "<string>",
"postType": "VIDEO",
"metrics": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
},
"lastFetchedAt": "2023-11-07T05:31:56Z",
"postId": "<string>",
"accountUsername": "<string>",
"profilePicture": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"publishedUrl": "<string>"
}
]
}
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Analytics
Analytics summary
Views, likes, comments, shares and saves for your published posts over the last 7 to 90 days, in total, per platform, per day and per post.
GET
/
posts
/
analytics
/
summary
Get post analytics summary
curl --request GET \
--url https://mvp.tryunsora.com/api/v1/posts/analytics/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://mvp.tryunsora.com/api/v1/posts/analytics/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mvp.tryunsora.com/api/v1/posts/analytics/summary', 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://mvp.tryunsora.com/api/v1/posts/analytics/summary",
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://mvp.tryunsora.com/api/v1/posts/analytics/summary"
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://mvp.tryunsora.com/api/v1/posts/analytics/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/posts/analytics/summary")
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{
"success": true,
"data": {
"days": 123,
"totals": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
},
"postCount": 123,
"byPlatform": [
{
"platform": "<string>",
"posts": 123,
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
}
],
"timeseries": [
{
"date": "2023-12-25",
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123
}
],
"posts": [
{
"postAccountId": "<string>",
"platform": "<string>",
"caption": "<string>",
"postType": "VIDEO",
"metrics": {
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
},
"lastFetchedAt": "2023-11-07T05:31:56Z",
"postId": "<string>",
"accountUsername": "<string>",
"profilePicture": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"publishedUrl": "<string>"
}
]
}
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Totals for posts published in the last
days days (default 30, 7 to 90), counted per account a post went to, plus a per-platform breakdown, a daily series and one entry per published post.
Metrics are polled from the platforms less often as a post ages: every 6 hours for its first 48 hours, then daily up to 7 days, every 3 days up to 30 days, and weekly up to 90 days. X posts are polled for 30 days. Call Refresh analytics for fresh figures.
curl "https://mvp.tryunsora.com/api/v1/posts/analytics/summary?days=30" \
-H "Authorization: Bearer uns_YOUR_API_KEY"
Authorizations
An Unsora API key (uns_…). A Clerk session token also works.
Query Parameters
Window in days. Values outside 7–90 are clamped.
Required range:
7 <= x <= 90
