curl --request GET \
--url https://app.onlysocial.io/os/api/{workspace}/analytics/accounts/{account} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/analytics/accounts/{account}"
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/accounts/{account}', 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/accounts/{account}",
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/accounts/{account}"
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/accounts/{account}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/analytics/accounts/{account}")
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{
"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>"
},
"type": "overview",
"tabs": [
"overview",
"content",
"insights"
],
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"previous_start_date": "2023-12-25",
"previous_end_date": "2023-12-25"
},
"initial_sync": {
"in_progress": true,
"progress": 123
},
"data": {
"total_followers": 120,
"views": {
"value": 5400,
"change": 12.5
},
"likes": {
"value": 310,
"change": -4.2
},
"audience": [
{
"date": "2026-01-01",
"value": 118
},
{
"date": "2026-01-02",
"value": 120
}
]
}
}{
"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 of an account
One account’s analytics of one type. The answer’s tabs lists the types the account supports, which depend on the network:
| Network | Types |
|---|---|
| overview, engagement, audience, reach, content, hashtags, insights, competitors (competitors needs an account connected through Facebook) | |
| Facebook Page | overview, engagement, video, content, hashtags, insights |
| Google Business Profile | overview, engagement, content, search_terms, reviews |
| Threads, Bluesky, Mastodon, LinkedIn Page | overview, engagement, content, hashtags, insights |
| overview, content, hashtags, insights | |
| TikTok, YouTube | overview, content, insights |
| LinkedIn profile | overview, engagement |
Accounts on other networks (X among them) have no analytics and get a 422. data depends on the network and type. content lists the period’s posts with their metrics, paged (data.pagination) and sortable by a metric; reviews pages too. insights gives the best day, hour, post type and posting frequency, the top post and the engagement trend. While initial_sync.in_progress is true, the account’s first import is still running and the figures are incomplete.
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/accounts/{account} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.onlysocial.io/os/api/{workspace}/analytics/accounts/{account}"
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/accounts/{account}', 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/accounts/{account}",
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/accounts/{account}"
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/accounts/{account}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onlysocial.io/os/api/{workspace}/analytics/accounts/{account}")
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{
"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>"
},
"type": "overview",
"tabs": [
"overview",
"content",
"insights"
],
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"previous_start_date": "2023-12-25",
"previous_end_date": "2023-12-25"
},
"initial_sync": {
"in_progress": true,
"progress": 123
},
"data": {
"total_followers": 120,
"views": {
"value": 5400,
"change": 12.5
},
"likes": {
"value": 310,
"change": -4.2
},
"audience": [
{
"date": "2026-01-01",
"value": 118
},
{
"date": "2026-01-02",
"value": 120
}
]
}
}{
"message": "The date range may span at most 366 days.",
"errors": {
"date_to": [
"The date range may span at most 366 days."
]
}
}Authorizations
Path Parameters
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 Response
Success
Depends on the network and type. Compared figures are {value, change}, time series {date, value} lists, breakdowns {label, value} lists, and charts with several series an object of such lists.
{
"total_followers": 120,
"views": { "value": 5400, "change": 12.5 },
"likes": { "value": 310, "change": -4.2 },
"audience": [
{ "date": "2026-01-01", "value": 118 },
{ "date": "2026-01-02", "value": 120 }
]
}
