> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://fastpix.com/docs/video-data/identify-top-performing-content/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/_mcp/server. # Identify top-performing content **Business goal:** Identify popular videos to prioritize marketing efforts. Here's the API workflow below: \ ## Step 1: List all the video views Fetch all views for a campaign using the [list video views](/video-data-api/views/list-video-views) endpoint: **`Request`** ```bash Request curl --request GET \ --url 'https://api.fastpix.io/v1/data/viewlist?timespan[]=30:days&orderBy=view_end&sortOrder=desc' \ --header 'accept: application/json' \ --user '{Access_Token}:{Secret_Key}' ``` \ Returns 314 views sorted by `view_end` time. **`Response`** ```json Response { "success": true, "data": [ { "viewId": "cc6f0f74-5b7e-4f8b-b70a-9edd57aedd5c", "operatingSystem": "MacOS", "application": "Chrome", "viewStartTime": "2025-03-26T12:43:00.757", "viewEndTime": "2025-03-26T12:43:19.861", "videoTitle": "Knives Out", "errorCode": null, "errorMessage": null, "errorId": null, "country": "IN", "viewWatchTime": 20005, "QoeScore": 0.9758551881413913 }, { "viewId": "be8d99b0-4dad-4b5c-9444-552963f280c3", "operatingSystem": "MacOS", "application": "Chrome", "viewStartTime": "2025-03-26T11:54:52.64", "viewEndTime": "2025-03-26T11:55:03.068", "videoTitle": "The Mandalorian / Season 1 / EP -1", "errorCode": null, "errorMessage": null, "errorId": null, "country": "IN", "viewWatchTime": 1697, "QoeScore": 0.5 }, { "viewId": "c6dac770-9174-4064-884c-64402f749b2c", "operatingSystem": "MacOS", "application": "Chrome", "viewStartTime": "2025-03-26T07:04:36.008", "viewEndTime": "2025-03-26T07:05:15.598", "videoTitle": "Knives Out", "errorCode": null, "errorMessage": null, "errorId": null, "country": "IN", "viewWatchTime": 40033, "QoeScore": 0.9704809194376256 } ], "pagination": { "totalRecords": 314, "currentOffset": 1, "offsetCount": 32 }, "timespan": [ 1740402124, 1742994124 ] } ``` \ ## Step 2: List by top viewed content Aggregate views by video title using the [list by top content](/video-data-api/views/list-by-top-content) endpoint: **`Request`** ```bash Request curl --request GET \ --url 'https://api.fastpix.io/v1/data/viewlist/top-content?timespan[]=30:days&limit=10&offset=1' \ --header 'accept: application/json' ``` \ The response below clearly shows the video title "Knives Out" is the most viewed content compared to others with 276 views and 24 unique views. \ **`Response`** ```json Response { "success": true, "data": [ { "videoTitle": "Knives Out", "views": 276, "uniqueViews": 24 }, { "videoTitle": "The Mandalorian / Season 1 / EP -1", "views": 10, "uniqueViews": 8 }, { "videoTitle": "Crimson City Chronicles / Season 2 / EP-1", "views": 6, "uniqueViews": 3 }, { "videoTitle": "Silent Waters", "views": 5, "uniqueViews": 4 }, { "videoTitle": "Crimson City Chronicles / Season 1 / EP-1", "views": 5, "uniqueViews": 2 }, { "videoTitle": "Test series FastPix video / Season 1 / EP-1", "views": 4, "uniqueViews": 4 }, { "videoTitle": "Test series api video / Season 2 / EP-1", "views": 3, "uniqueViews": 3 }, { "videoTitle": "The Rise of Tech Giants - FastPix / Season 1 / EP 1", "views": 2, "uniqueViews": 1 }, { "videoTitle": "test", "views": 1, "uniqueViews": 1 }, { "videoTitle": "The Rise of Tech Giants -FastPix / Season 2 / EP -2", "views": 1, "uniqueViews": 1 } ], "timespan": [ 1740402286, 1742994286 ] } ``` \ ## Step 3: List breakdown values Segment top content by device using the [list breakdown values](/video-data-api/metrics/list-breakdown-values) endpoint: ```bash curl --request GET \ --url 'https://api.fastpix.io/v1/data/metrics/views/breakdown?timespan[]=30:days&filterby[]=video_title:Knives Out&groupBy=device_type' \ --header 'accept: application/json' ``` \ The response gives you an observation that 97.8% of playbacks come from mobile devices. **Outcome:** Optimize mobile playback and create short-form versions of top videos. **`Response`** ```json Response { "success": true, "metadata": { "aggregation": "view_start" }, "data": [ { "views": 260, "value": 260, "totalWatchTime": 52012995, "totalPlayingTime": 62043103, "field": "Phone" }, { "views": 15, "value": 15, "totalWatchTime": 1301418, "totalPlayingTime": 1318049, "field": "Desktop" }, { "views": 1, "value": 1, "totalWatchTime": 31795, "totalPlayingTime": 107, "field": "TV" } ], "pagination": { "totalRecords": 3, "currentOffset": 1, "offsetCount": 1 }, "timespan": [ 1740402442, 1742994442 ] } ``` \ ## See also * [Build workflows with the API](/video-data/build-workflows-with-the-api) — overview of API-driven workflows * [Find out why viewers drop off](/video-data/find-out-why-viewers-drop-off) — another worked example * [What Video Data do we capture](/video-data/what-video-data-do-we-capture) — every dimension, event, and metric we capture > The single API stack for video: upload, encode, stream, secure, and analyze video at any scale. Explore guides, API references, and SDKs.