curl --request GET \
--url https://api.aisa.one/apis/v1/social/analytics/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/analytics/dashboard"
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/analytics/dashboard', 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/analytics/dashboard",
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/analytics/dashboard"
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/analytics/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/analytics/dashboard")
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{
"daily": [
{
"date": "2023-12-25",
"engagement": 123,
"followersGained": 123,
"impressions": 123,
"reach": 123,
"views": 123
}
],
"dataAsOf": "2023-11-07T05:31:56Z",
"dateRange": {
"fromDate": "2023-12-25",
"toDate": "2023-12-25"
},
"followers": {
"byAccount": [
{
"accountId": "<string>",
"current": 123,
"gained": 123,
"platform": "<string>"
}
],
"current": 123,
"gained": 123
},
"recentPosts": [
{
"metrics": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"platform": "<string>",
"postId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"topPosts": [
{
"metrics": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"platform": "<string>",
"postId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"totals": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"previousFollowers": {
"byAccount": [
{
"accountId": "<string>",
"current": 123,
"gained": 123,
"platform": "<string>"
}
],
"current": 123,
"gained": 123
},
"previousTotals": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Get an analytics dashboard
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. Without profileId or accountId it reads your default profile. 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.
Everything an analytics dashboard needs in one call: window totals, follower growth, a per-day series, top posts, recent posts and, optionally, the same figures for the previous period.
All dates are UTC days.
Daily and total metrics
Daily and total metrics use received attribution: each day holds the engagement that arrived that day, on any post. So totals is always the sum of daily.
Post lists
topPosts and recentPosts list posts published in the window with their lifetime metrics. A post cross-posted to several platforms appears once per platform.
curl --request GET \
--url https://api.aisa.one/apis/v1/social/analytics/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/analytics/dashboard"
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/analytics/dashboard', 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/analytics/dashboard",
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/analytics/dashboard"
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/analytics/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/analytics/dashboard")
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{
"daily": [
{
"date": "2023-12-25",
"engagement": 123,
"followersGained": 123,
"impressions": 123,
"reach": 123,
"views": 123
}
],
"dataAsOf": "2023-11-07T05:31:56Z",
"dateRange": {
"fromDate": "2023-12-25",
"toDate": "2023-12-25"
},
"followers": {
"byAccount": [
{
"accountId": "<string>",
"current": 123,
"gained": 123,
"platform": "<string>"
}
],
"current": 123,
"gained": 123
},
"recentPosts": [
{
"metrics": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"platform": "<string>",
"postId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"topPosts": [
{
"metrics": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"platform": "<string>",
"postId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"totals": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
},
"previousFollowers": {
"byAccount": [
{
"accountId": "<string>",
"current": 123,
"gained": 123,
"platform": "<string>"
}
],
"current": 123,
"gained": 123
},
"previousTotals": {
"clicks": 123,
"comments": 123,
"engagementRate": 123,
"impressions": 123,
"likes": 123,
"reach": 123,
"saves": 123,
"shares": 123,
"views": 123
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}请求规范
- 方法与路径: GET /apis/v1/social/analytics/dashboard
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/social/analytics/dashboard - profileId: query; 可选
- platform: query; 可选
- fromDate: query; 必填
- toDate: query; 必填
- compare: query; 可选
- topPosts: query; 可选
- recentPosts: query; 可选
{
"operationId": "get_aisa_social_apis_v1_social_analytics_dashboard",
"method": "GET",
"path": "/apis/v1/social/analytics/dashboard",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "One of your profiles (prf_...). Defaults to your default profile when neither profileId nor accountId is sent.",
"in": "query",
"name": "profileId",
"required": false,
"schema": {
"pattern": "^prf_[0-9A-Za-z]{22}$",
"type": "string"
}
},
{
"description": "Platform to cover (e.g. \"instagram\"), or \"all\".",
"in": "query",
"name": "platform",
"required": false,
"schema": {
"default": "all",
"type": "string"
}
},
{
"description": "First day of the window (YYYY-MM-DD, inclusive).",
"in": "query",
"name": "fromDate",
"required": true,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Last day of the window (YYYY-MM-DD, inclusive). May equal fromDate. The window covers at most 366 days.",
"in": "query",
"name": "toDate",
"required": true,
"schema": {
"format": "date",
"type": "string"
}
},
{
"description": "Set to \"previous_period\" to also return previousTotals and previousFollowers for the window of the same length that ends the day before fromDate.",
"in": "query",
"name": "compare",
"required": false,
"schema": {
"enum": [
"previous_period"
],
"type": "string"
}
},
{
"description": "How many top posts to return, ranked by engagement (likes, comments, shares and saves, the same sum as daily engagement).",
"in": "query",
"name": "topPosts",
"required": false,
"schema": {
"default": 5,
"maximum": 25,
"minimum": 0,
"type": "integer"
}
},
{
"description": "How many of the most recently published posts to return.",
"in": "query",
"name": "recentPosts",
"required": false,
"schema": {
"default": 10,
"maximum": 25,
"minimum": 0,
"type": "integer"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.001 USD。 失败或结果未知时不收费。 15 分钟内的相同请求命中缓存时免费。 强制刷新按次收费。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
响应
Dashboard for the window