ViralApp icon

ViralApp

Interact with ViralApp API for video analytics on TikTok, Instagram, and YouTube

General Data → Get Top Videos

AI-generated

Summary

Fetches top-performing videos based on a chosen engagement metric and date range, optionally filtering by platform, account, project, content type, and publication status.

Inputs

  • dateRangeFrom (required) — Start date (YYYY-MM-DD) for the analytics period. Defaults to 14 days ago.
  • dateRangeTo (required) — End date (YYYY-MM-DD) for the analytics period. Defaults to today.
  • filters — Collection of filters. Supports filtering by Account Names or IDs (list or ID), Content Types (video/slideshow), Platforms (Instagram/TikTok/YouTube), and Project Names or IDs (list or ID).
  • limit — Maximum number of results to return. Defaults to 50.
  • metric — Metric to sort videos by. Options include View Count, Like Count, Comment Count, Share Count, Bookmark Count, Engagement Rate (in period or lifetime). Defaults to View Count.
  • onlyPublished — Whether to include only published content. Defaults to false.
  • options — Additional options. Includes 'simplifyOutput' (boolean) to return a simplified version of the response instead of raw data.

Output shape

A list of items representing individual videos.

If 'Simplify Output' is enabled, returns a subset of fields (id, platform, accountUsername, caption, viewCount, likeCount, engagementRate, publishedAt). Otherwise, returns the raw API response.

Examples

Example 1: Get top 10 videos by engagement rate over the last 7 days for a specific TikTok account.

Date Range: Last 7 days, Metric: Engagement Rate (In Period), Filters: Account ID (TikTok account), Limit: 10

Example 2: Retrieve the top 20 Instagram videos with the most views from the last month, filtering for a specific project.

Date Range: Last month, Metric: View Count (In Period), Filters: Platform (Instagram), Project ID (specific project), Limit: 20

Example 3: Fetch all top videos across all platforms and projects, including only published content, sorted by lifetime view count.

Date Range: Full history, Metric: View Count (Lifetime), Filters: Only Published = true, Limit = 100 (or use 'Return All' for unlimited)

Links

Discussion