curl --request GET \
--url https://app.onlysocial.io/os/api/{workspace}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/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}/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}/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}/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}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/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{
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"previous_start_date": "2023-12-25",
"previous_end_date": "2023-12-25"
},
"data": {
"total_followers": 123,
"follower_growth": {
"value": 123,
"change": 123
},
"total_posts": {
"value": 123,
"change": 123
},
"best_account": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"needs_attention": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"audience_chart": [
{
"date": "2026-01-15",
"value": 123
}
],
"leaderboard": [
{
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
}
],
"most_active": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"least_active": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"follower_distribution": [
{
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"percentage": 123
}
],
"posting_streak": {
"active_days": 123,
"total_days": 123,
"percentage": 123
}
}
}{
"message": "The date range may span at most 366 days.",
"errors": {
"date_to": [
"The date range may span at most 366 days."
]
}
}Get the analytics summary
Every account in the workspace that has analytics, over one period: total followers, follower growth and posts with their change, the best-growing account and one losing followers, a leaderboard, the most and least active accounts, each account’s share of followers, total followers per day, and on how many days anything was posted.
Read-only. Personal access tokens may call it with any workspace role, viewers included.
Required permission: publishing:analytics:read
curl --request GET \
--url https://app.onlysocial.io/os/api/{workspace}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/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}/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}/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}/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}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/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{
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"previous_start_date": "2023-12-25",
"previous_end_date": "2023-12-25"
},
"data": {
"total_followers": 123,
"follower_growth": {
"value": 123,
"change": 123
},
"total_posts": {
"value": 123,
"change": 123
},
"best_account": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"needs_attention": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"audience_chart": [
{
"date": "2026-01-15",
"value": 123
}
],
"leaderboard": [
{
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
}
],
"most_active": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"least_active": {
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"follower_growth": 123,
"growth_rate": 123,
"posts": 123
},
"follower_distribution": [
{
"account": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"image": "<string>",
"provider": "instagram",
"data": {},
"authorized": true,
"created_at": "<string>",
"published_at": "<string>"
},
"followers": 123,
"percentage": 123
}
],
"posting_streak": {
"active_days": 123,
"total_days": 123,
"percentage": 123
}
}
}{
"message": "The date range may span at most 366 days.",
"errors": {
"date_to": [
"The date range may span at most 366 days."
]
}
}Authorizations
A workspace API key: Authorization: Bearer osk_...
Path Parameters
Your workspace UUID. Must match the API key's workspace.
Query Parameters
In UTC. Weeks start on Monday. this_week, this_month and this_year run up to today; last_3_months is the three whole months before this one. Ignored when date_from and date_to are both sent.
this_week, last_week, this_month, last_month, last_3_months, this_year Start of a custom range (UTC day). Send with date_to.
"2026-01-01"
End of a custom range, on or after date_from. A range spans at most 366 days, both ends included.
"2026-01-31"
