curl --request GET \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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{
"accountId": "<string>",
"accountType": "<string>",
"aggregation": "TOTAL",
"analytics": {
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"reach": 123,
"reactions": 123,
"saves": 123,
"sends": 123,
"shares": 123
},
"dateRange": {
"endDate": "2023-12-25",
"startDate": "2023-12-25"
},
"lastUpdated": "2023-11-07T05:31:56Z",
"note": "<string>",
"platform": "<string>",
"username": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Get LinkedIn aggregate stats
Analytics. Read only; needs social:read. Ids are yours: accounts acc_…, profiles prf_…, posts pst_…; every other object id is checked against your accounts before the call. Charged only when the call succeeds. Repeated identical requests within 15 minutes are served from cache at no charge (response header X-AISA-Cache: hit, with Age in seconds); send Cache-Control: no-cache to force a fresh read, which is charged.
Returns aggregate analytics across all posts for a LinkedIn personal account. Requires r_member_postAnalytics scope.
Covers every post authored by the member, whether or not it was published through AIsa (LinkedIn aggregates by member, not by post). Org accounts should use /apis/v1/social/analytics instead.
Saves (POST_SAVE) and sends (POST_SEND) are available for personal accounts. Organization pages always return 0 for these two metrics because LinkedIn does not expose them on the organization analytics endpoint.
curl --request GET \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-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{
"accountId": "<string>",
"accountType": "<string>",
"aggregation": "TOTAL",
"analytics": {
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"reach": 123,
"reactions": 123,
"saves": 123,
"sends": 123,
"shares": 123
},
"dateRange": {
"endDate": "2023-12-25",
"startDate": "2023-12-25"
},
"lastUpdated": "2023-11-07T05:31:56Z",
"note": "<string>",
"platform": "<string>",
"username": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: GET /apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics - accountId: path; required
- aggregation: query; optional
- fromDate: query; optional
- toDate: query; optional
- startDate: query; optional
- endDate: query; optional
- metrics: query; optional
{
"operationId": "get_aisa_social_apis_v1_social_accounts_accountid_ac2eba",
"method": "GET",
"path": "/apis/v1/social/accounts/{accountId}/linkedin-aggregate-analytics",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "One of your social accounts (acc_...).",
"in": "path",
"name": "accountId",
"required": true,
"schema": {
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
}
},
{
"description": "TOTAL (default, lifetime totals) or DAILY (time series). MEMBERS_REACHED not available with DAILY.",
"in": "query",
"name": "aggregation",
"required": false,
"schema": {
"default": "TOTAL",
"enum": [
"TOTAL",
"DAILY"
],
"type": "string"
}
},
{
"description": "Start date (YYYY-MM-DD). If omitted, returns lifetime analytics.",
"in": "query",
"name": "fromDate",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "End date (YYYY-MM-DD, exclusive). Defaults to today if omitted.",
"in": "query",
"name": "toDate",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Alias of fromDate, kept for existing callers",
"in": "query",
"name": "startDate",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Alias of toDate, kept for existing callers",
"in": "query",
"name": "endDate",
"required": false,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Comma-separated metrics: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE, POST_SAVE, POST_SEND. Omit for all.",
"in": "query",
"name": "metrics",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.001 USD per successful request. Failed or unknown outcomes are not charged. Identical requests served from cache within 15 minutes are free. A forced refresh is charged. Your account price may differ; use a request quote where supported.Authorizations
Path Parameters
Query Parameters
Response
Aggregate analytics data
- Option 1
- Option 2
Response for TOTAL aggregation (lifetime totals)