Skip to main content

Analytics API Reference

Retrieve comprehensive performance metrics and insights for your TikTok content using our Analytics API.

Base Endpoint

GET /api/v1/analytics

Authentication

  • Required: Bearer token (JWT or API key)
  • Feature: Available on Basic and Professional plans only

Endpoints

Get Account Summary

GET /api/v1/analytics/account/summary Get high-level performance metrics for your account.
{
  "success": true,
  "data": {
    "totalVideos": 42,
    "totalFollowers": 1250,
    "totalViews": 154200,
    "totalLikes": 12500,
    "averageEngagementRate": 8.11,
    "lastSyncedAt": "2025-01-21T14:30:00.000Z"
  }
}
curl -X GET 'https://api.d1g.qzz.io/api/v1/analytics/account/summary' \
  -H 'Authorization: Bearer YOUR_API_KEY'
import axios from 'axios';

const getAccountSummary = async () => {
  try {
    const response = await axios.get(
      'https://api.d1g.qzz.io/api/v1/analytics/account/summary',
      {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        }
      }
    );
    console.log('Account summary:', response.data.data);
  } catch (error) {
    console.error('Failed to get summary:', error.response?.data || error.message);
  }
};
import requests

def get_account_summary():
    url = "https://api.d1g.qzz.io/api/v1/analytics/account/summary"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY"
    }
    
    response = requests.get(url, headers=headers)
    
    if response.status_code == 200:
        print("Account summary:", response.json()['data'])
    else:
        print("Failed to get summary:", response.json())

Get Video Metrics

GET /api/v1/analytics/video/{videoId}/metrics Get detailed performance metrics for a specific video.
videoId
string
required
Video ID (upload ID or TikTok video ID)
{
  "success": true,
  "data": {
    "id": "dd3c9a25-f6a0-4ef7-b227-830fa0da70e4",
    "tiktokVideoId": "v_inbox_file~v2.7562847402311370807",
    "title": "Amazing TikTok Video",
    "description": "Check out this amazing content!",
    "views": 15420,
    "likes": 1250,
    "comments": 85,
    "shares": 120,
    "engagementRate": 9.45,
    "publishedAt": "2025-01-19T09:31:40.733Z",
    "createdAt": "2025-01-19T09:31:29.265Z",
    "lastUpdatedAt": "2025-01-21T14:30:00.000Z"
  }
}
GET /api/v1/analytics/performance-trends Get historical performance trends and patterns.
timeframe
string
default:"30d"
Time period: “7d”, “30d”, “90d”, “180d”, “365d”
metric
string
default:"views"
Primary metric: “views”, “engagement”, “followers”, “likes”
{
  "success": true,
  "data": {
    "timeframe": "30d",
    "metric": "views",
    "trends": [
      {
        "date": "2025-09-21",
        "value": 4500,
        "videos": 3
      },
      {
        "date": "2025-09-28", 
        "value": 6200,
        "videos": 4
      },
      {
        "date": "2025-10-05",
        "value": 8100,
        "videos": 5
      },
      {
        "date": "2025-10-12",
        "value": 12500,
        "videos": 6
      },
      {
        "date": "2025-10-19",
        "value": 15000,
        "videos": 7
      }
    ],
    "growthRate": 233.33,
    "bestPerformingDay": "2025-10-15",
    "bestPerformingVideo": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Get Top Videos

GET /api/v1/analytics/top-videos Get your best-performing videos based on specified criteria.
limit
integer
default:"10"
Number of top videos to return (max 50)
sortBy
string
default:"views"
Sort criteria: “views”, “engagement”, “likes”, “shares”, “comments”
timeframe
string
default:"all"
Time period: “7d”, “30d”, “90d”, “all”
{
  "success": true,
  "data": {
    "videos": [
      {
        "videoId": "550e8400-e29b-41d4-a716-446655440000",
        "title": "My Amazing Video",
        "publishedAt": "2025-10-15T14:30:00Z",
        "thumbnailUrl": "https://example.com/thumbnail1.jpg",
        "views": 12500,
        "engagementRate": 6.8,
        "likes": 650,
        "comments": 85,
        "shares": 120
      },
      {
        "videoId": "550e8400-e29b-41d4-a716-446655440001",
        "title": "Another Great Video",
        "publishedAt": "2025-10-10T10:15:00Z", 
        "thumbnailUrl": "https://example.com/thumbnail2.jpg",
        "views": 9800,
        "engagementRate": 5.2,
        "likes": 420,
        "comments": 65,
        "shares": 95
      }
    ],
    "totalCount": 25,
    "timeframe": "all",
    "sortBy": "views"
  }
}

Data Refresh Schedule

  • Real-time Metrics: Updated every 15 minutes
  • Detailed Analytics: Updated every 24 hours
  • Historical Data: Available for up to 2 years
  • Audience Demographics: Updated weekly
Analytics data accuracy depends on TikTok’s API availability. Some metrics may have slight delays during high-traffic periods.

Rate Limits

Analytics endpoints have higher rate limits due to their read-only nature:
PlanRequests per MinuteRequests per Hour
Basic1201,000
Professional3005,000

Common Errors

  • 403 FORBIDDEN: Analytics feature not available on your plan
  • 404 NOT_FOUND: Invalid video ID or no analytics data available
  • 429 RATE_LIMITED: Exceeded rate limits for analytics endpoints
  • 503 SERVICE_UNAVAILABLE: TikTok API temporarily unavailable
Best Practice: Cache analytics data on your end to reduce API calls and improve application performance.
Analytics data represents performance for content published through our platform only. Videos published directly through TikTok’s native app will not appear in these analytics.