GET
/
v1
/
teams
/
{teamId}
/
analytics
/
aggregates
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.socialGetAnalyticsAggregates({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  query: {
    "from": process.env.OCTOSPARK_FROM ?? "from",
    "to": process.env.OCTOSPARK_TO ?? "to",
  },
})
{
  "period": {
    "from": "<string>",
    "to": "<string>"
  },
  "totals": {
    "likeCount": 123,
    "commentCount": 123,
    "shareCount": 123,
    "saveCount": 123,
    "impressionCount": 123,
    "reachCount": 123,
    "postCount": 123,
    "averageEngagementRate": 123
  },
  "byPlatform": [
    {
      "likeCount": 123,
      "commentCount": 123,
      "shareCount": 123,
      "saveCount": 123,
      "impressionCount": 123,
      "reachCount": 123,
      "postCount": 123,
      "averageEngagementRate": 123
    }
  ],
  "byWeek": [
    {
      "weekStart": "<string>",
      "likeCount": 123,
      "commentCount": 123,
      "shareCount": 123,
      "saveCount": 123,
      "impressionCount": 123,
      "postCount": 123,
      "averageEngagementRate": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Query Parameters

from
string
required
to
string
required
platform
enum<string>
Available options:
x,
tiktok,
instagram,
facebook,
youtube,
linkedin,
threads

Response

Success

period
object
required
totals
object
required
byPlatform
object[]
required
byWeek
object[]
required