GET /v1/videos/stats

Returns a paginated list of tracked videos and their latest statistics for your organization.

📋 Overview

Property Value
Method GET
Endpoint https://api.influtics.com/v1/videos/stats
Auth Required Yes
Credits Cost 🆓 Free

🔐 Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

📝 Query Parameters

Parameter Type Required Description Allowed Values
limit number No Max number of results to return (default 50, max 100) 1-100
offset number No Number of results to skip (for pagination) ≥0
platform string No Filter by platform TikTok, YouTube, Instagram
status string No Filter by tracking status active, completed, failed
sort string No Sort by field (default: created_at) created_at, views, likes, updated_at
order string No Sort order (default: desc) asc, desc

Example Request

curl -X GET "https://api.influtics.com/v1/videos/stats?limit=2&platform=TikTok&status=active&sort=views&order=desc" \
  -H "Authorization: Bearer your_api_key_here"

Response

{
  "success": true,
  "data": {
    "data": [
      {
        "video_id": "77168374-dd2c-496a-b1ae-3d4944f48ccb",
        "external_video_id": "7489443966908189959",
        "stats": {
            "likes": {
                "2025-06-30 08:26:03.730104+00": 56500,
                "2025-06-31 08:26:03.730104+00": 56501
            },
            "views": {
                "2025-06-30 08:26:03.730104+00": 1900000,
                "2025-06-31 08:26:03.730104+00": 2000000
            },
            "reposts": {
                "2025-06-30 08:26:03.730104+00": 6472,
                "2025-06-31 08:26:03.730104+00": 6892
            },
            "comments": {
                "2025-06-30 08:26:03.730104+00": 483,
                "2025-06-31 08:26:03.730104+00": 526
            }
        },
        "views": 2000000,
        "likes": 56501,
        "comments": 526,
        "reposts": 6892,
        "platform": "TikTok",
        "created_at": "2025-06-30T08:25:29.97727+00:00",
        "title": "Untitled",
        "thumbnail_url": "https://xhrjtpcqcdqwcdiqrhfw.supabase.co/storage/v1/object/public/thumbnails/tiktok/7489443966908189959.webp",
        "cpm": 0,
        "er": 3.339736842105263,
        "stats_last_updated": "2025-06-30T08:26:03.730104+00:00"
      },
      {
        "video_id": "44765aa4-3be2-43ee-8155-429f4def5c37",
        "external_video_id": "7493432998554127624",
        "stats": {
          "likes": {
            "2025-06-29 11:45:04.417493+00": 89700,
            "2025-06-30 00:01:43.584751+00": 90000
          },
          "views": {
            "2025-06-29 11:45:04.417493+00": 908200,
            "2025-06-30 00:01:43.584751+00": 911200
          },
          "reposts": {
            "2025-06-29 11:45:04.417493+00": 5868,
            "2025-06-30 00:01:43.584751+00": 5883
          },
          "comments": {
            "2025-06-29 11:45:04.417493+00": 501,
            "2025-06-30 00:01:43.584751+00": 502
          }
        },
        "views": 911200,
        "likes": 90000,
        "comments": 502,
        "reposts": 5883,
        "platform": "TikTok",
        "created_at": "2025-06-29T11:44:30.976079+00:00",
        "title": null,
        "thumbnail_url": "https://xhrjtpcqcdqwcdiqrhfw.supabase.co/storage/v1/object/public/thumbnails/tiktok/7493432998554127624.webp",
        "cpm": 0,
        "er": 10.57,
        "stats_last_updated": "2025-06-30T00:01:43.584751+00:00"
      }
    ],
    "pagination": {
      "total": 87,
      "limit": 2,
      "offset": 0,
      "has_more": true
    }
  },
  "meta": {
    "processing_time_ms": 993,
    "request_id": "6bbb102e-109c-475b-b1b1-aa52ca83f060"
  }
}

📊 Response Fields

Field Type Description
video_id string Internal video UUID
external_video_id string Platform-specific video ID
stats object Map of metric to {timestamp: value} objects
platform string Platform name (e.g., TikTok, YouTube)
created_at string When the video was created (ISO 8601)
title string Video title/caption
thumbnail_url string Video thumbnail URL
cpm number Cost per mille (if available)
er number Engagement rate (if available)
stats_last_updated string When stats were last updated (ISO 8601)
views int? Last views
likes int? Last likes
comments int? Last comments
reposts int? Last reposts
meta.request_id string Unique request identifier
meta.processing_time_ms number Time taken to process the request (ms)

Error Responses

400 Bad Request - Invalid Parameters

{
  "success": false,
  "error": "Invalid sort parameter",
  "code": "INVALID_PARAMETER",
  "details": {
    "valid_sort_options": ["created_at", "views", "likes", "updated_at"]
  }
}

401 Unauthorized

{
  "success": false,
  "error": "Invalid API key",
  "code": "INVALID_API_KEY"
}

💡 Usage Examples

JavaScript/Node.js

async function getVideoStats(params = {}) {
  const queryString = new URLSearchParams(params).toString();
  const url = `https://api.influtics.com/v1/videos/stats${queryString ? '?' + queryString : ''}`;
  
  const response = await fetch(url, {
    headers: {
      'Authorization': 'Bearer your_api_key_here',
      'Content-Type': 'application/json'
    }
  });
  const data = await response.json();
  if (data.data) {
    console.log(`Found ${data.pagination.total} tracked videos`);
    data.data.forEach(video => {
      console.log(`${video.platform}: ${video.stats.views.toLocaleString()} views`);
    });
  }
}
// Get top 10 TikTok videos by views
getVideoStats({
  platform: 'TikTok',
  sort: 'views',
  order: 'desc',
  limit: 10
});

Python

import requests

def get_video_stats(platform=None, limit=50, sort='created_at'):
    params = {
        'limit': limit,
        'sort': sort,
        'order': 'desc'
    }
    if platform:
        params['platform'] = platform
    headers = {
        'Authorization': 'Bearer your_api_key_here',
        'Content-Type': 'application/json'
    }
    response = requests.get(
        'https://api.influtics.com/v1/videos/stats',
        headers=headers,
        params=params
    )
    if response.status_code == 200:
        data = response.json()
        print(f"Total videos: {data['pagination']['total']}")
        for video in data['data']:
            print(f"{video['platform']}: {video['stats']['views']:,} views")
    else:
        print(f"Error: {response.status_code}")
# Get all Instagram videos
get_video_stats(platform='Instagram', sort='views')

🎯 Use Cases

  • Performance Dashboard: Build custom analytics dashboards
  • Campaign Reporting: Generate reports for clients or stakeholders
  • Growth Analysis: Track video performance over time
  • Platform Comparison: Compare performance across different platforms
  • Content Optimization: Identify top-performing content patterns

📊 Filtering & Pagination

Get Active TikTok Videos

GET /v1/videos/stats?platform=TikTok&status=active&sort=views&order=desc

Notes:

  • If you provide an invalid value for sort, order, or status, you will receive a 400 error with details about allowed values.
  • The maximum value for limit is 100.
  • Default sort is by created_at in descending order.

Related: Track Video → | View Usage →