GET /v1/videos/stats
Returns a paginated list of tracked videos and their latest statistics for your organization.
📋 Overview
🔐 Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
📝 Query Parameters
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
❌ 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
💡 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, orstatus, you will receive a 400 error with details about allowed values. - The maximum value for
limitis 100. - Default sort is by
created_atin descending order.
Related: Track Video → | View Usage →
Missing Response Structure
This documentation is based on expected functionality. Please provide the actual response structure for the /v1/videos/stats endpoint to ensure accuracy.