PostZen
Analytics

Get account insights

GET
/v1/analytics/account-insights

Daily profile activity and audience for a TikTok account connected through the TikTok Business app. Other accounts return 400 with code platformUnsupported.

Authorization

bearerAuth
AuthorizationBearer <token>

PostZen API key.

In: header

Query Parameters

accountId*string

Connected account id.

fromDate?|

Inclusive range start. Defaults to 30 days before toDate. The range may span at most 366 days, and toDate defaults to now, so an older fromDate needs a toDate within 366 days of it.

toDate?|

Inclusive range end. Defaults to the current time. Must be no more than 366 days after fromDate.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/analytics/account-insights?accountId=string"
{  "accountId": "string",  "platform": "tiktok",  "connectionLane": "business",  "dateRange": {    "from": "2019-08-24",    "to": "2019-08-24"  },  "followers": 0,  "daily": [    {      "date": "2019-08-24",      "videoViews": 0,      "profileViews": 0,      "likes": 0,      "comments": 0,      "shares": 0,      "uniqueVideoViews": 0,      "newFollowers": 0,      "lostFollowers": 0,      "netFollowers": 0,      "engagedAudience": 0,      "bioLinkClicks": 0,      "phoneNumberClicks": 0,      "leadSubmissions": 0,      "appDownloadClicks": 0,      "emailClicks": 0,      "addressClicks": 0,      "activityByHour": [        0      ]    }  ],  "totals": {    "videoViews": 0,    "profileViews": 0,    "likes": 0,    "comments": 0,    "shares": 0,    "uniqueVideoViews": 0,    "newFollowers": 0,    "lostFollowers": 0,    "netFollowers": 0,    "engagedAudience": 0,    "bioLinkClicks": 0,    "phoneNumberClicks": 0,    "leadSubmissions": 0,    "appDownloadClicks": 0,    "emailClicks": 0,    "addressClicks": 0  },  "audience": {    "ages": [      {        "age": "string",        "percent": 0      }    ],    "genders": [      {        "gender": "string",        "percent": 0      }    ],    "countries": [      {        "country": "string",        "percent": 0      }    ],    "cities": [      {        "city": "string",        "percent": 0      }    ],    "observedAt": "2019-08-24T14:15:22Z"  },  "availability": {    "daily": "available",    "audience": "available"  }}
{  "error": "JSON body is required"}
{  "error": "Unauthorized"}
{  "error": "string",  "type": "string",  "code": "string",  "param": "string"}
{  "error": "API key requires read_write permission"}
{  "error": "Not found"}
{  "error": "rate_limited",  "retryAfter": 30}
{  "error": "Failed to create post"}