Developers

Documentation

Top
Administrators
Getting Started / Introduction
Account Creation

Only the YouTube channel owner or administrator should create a Viewtrender account.
If you are the owner/administrator create an account to get started.

Chrome Extension Installation

Go to the Chrome Extension Store and install the Viewtrender DataSync Chrome Extension.

Adding Channels

Once you've created an account, you'll be logged into the dashboard. You will see a prompt for you to go to Studio and add a channel.

Viewtrender account dashboard, add a channel

In Studio click the DataSync tab at the top of the popup window and add the channel.

Studio add channel to Viewtrender dashboard

You'll need an active license for the channel in order to generate API tokens for your Data Engineering or Developer teams.

API Key Generation

API keys are meant to be user or application specific. Limit the permission grants based on the needs of the engineer, 3rd party analyst or BI dashboard.

To get started select the licensed channel from your account dashboard and click the API keys link in the left menu

Viewtrender account dashboard, add a channel

Name the API key and select the appropriate permission scopes, then click Generate API Key

For example if I were generating an API key for Darrel Eve's, so he could have access to my traffic sources to do an analysis. I'd name my API key darreleves and check only the trafficsource:read

Viewtrender account dashboard, add a channel

Once you have an API key you can access the channel and video resources for you channel and library. The access will be limited based on the permission scopes you define to ensure your data is secure.

Revoking API Tokens

You can revoke API keys at anytime by clicking the revoke button next to the API token's name.


Channel Resources
Required Parameters
  • key
  • date, from/to

They API key is required for every resource call. You can pass it as a GET key pair variable key=... or via authentication header

GET Variable

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/[RESOURCE]?key=1/a0s9jasd0jaspodia0sd9jf0a9sjdf

Header

Authorization: Bearer 1/a0s9jasd0jaspodia0sd9jf0a9sjdf

Dates are required for every resource call. You can request a single date.

Single date

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/[RESOURCE]?key=[API_KEY]&date=2024-11-21

Date range

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/[RESOURCE]?key=[API_KEY]&from=2024-10-22&to=2024-11-21

All channel resources have a templated response. See example below

{
    "data":[{
        "info_card_clicks": 0,
        "info_card_impressions": 0,
        "info_card_click_rate": "0.00",
        "info_card_teaser_clicks": 0,
        "info_card_teaser_impressions": 8,
        "info_card_teaser_click_rate": "0.00",
        "date": "2023-01-01"
    }],
    "links":{
        "first":"https://viewtrender.com/api/v1/channel/UC0000000000000000000000/cards?page=1",
        "last":"https://viewtrender.com/api/v1/channel/UC0000000000000000000000/cards?page=1",
        "prev":null,"next":null
    },
    "meta": {
        "current_page":1,
        "from":null,
        "last_page":1,
        "links":[
            {
                "url":null,
                "label":"« Previous",
                "active":false
            },
            {
                "url":"https://viewtrender.com/api/v1/channel/UC0000000000000000000000/cards?page=1",
                "label":"1",
                "active":true
            },
            {
                "url":null,
                "label":"Next »","active":false
            }
        ],
        "path":"https://viewtrender.com/api/v1/channel/UC0000000000000000000000/cards",
        "per_page":50,
        "to":null,
        "total":0,
        "channel": {
            "id":"UC0000000000000000000000",
            "title":"GANKER"
        },
        "dates":{
            "from":"2022-12-01",
            "to":"2023-01-01"
        }
    }
}
Metrics
Cards
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/cards

data: [{
        info_card_clicks: int,
        info_card_impressions: int,
        info_card_click_rate: string|double,
        info_card_teaser_clicks: int,
        info_card_teaser_impressions: int,
        info_card_teaser_click_rate: string|double,
        date: "2024-11-21"
}]
Endscreens
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/endscreens

data: [{
    endscreen_element_click_rate: string|double,
    endscreen_element_clicks: int,
    endscreen_element_impressions: int,
    date: "2024-11-21"
}]
Interactions
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/interactions

data: [{
    subscribers_gained: int,
    subscribers_lost: int,
    ratings_likes: int,
    ratings_dislikes: int,
    likes_per_likes_plus_dislikes_percent: string|double,
    sharings: int,
    comments: int,
    date: "2024-11-21"
}]
Overview
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/overview

data: [{
    watch_time: int,
    views: int,
    average_watch_time: int,
    average_watch_percentage: string|double,
    subscribers_net_change: int,
    date: "2024-11-21"
}]
Premium
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/premium

data: [{
    youtube_red_views: int,
    youtube_red_watch_time: int,
    date: "2024-11-21"
}]
Reach
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/reach

data: [{
    video_thumbnail_impressions: int,
    video_thumbnail_impressions_vtr: string|double,
    shorts_feed_impressions: int,
    shorts_feed_impressions_vtr: string|double,
    estimated_unique_viewers: int,
    average_views_per_viewer: string|double,
    new_viewers: int,
    returning_viewers: int,
    date: "2024-11-21"
}]
Revenue
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/revenue

data: [{
    total_estimated_earnings: string|double,
    ad_earnings: string|double,
    playbacks: int,
    impressions_cpm: string|double,
    earnings_per_thousand_views: string|double,
    cpm: string|double,
    impressions: int,
    date: "2024-11-21"
}]
Traffic Sources
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/advertising/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/annotation/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/campaign_card/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/end_screen/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/ext_url/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/hashtags/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/no_link_embedded/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/no_link_other/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/playlist/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/promoted/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/related_video/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/shorts/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/sound_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/subscriber/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/yt_channel/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/yt_other_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/yt_playlist_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/yt_search/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/product_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/live_redirect/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/notification/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/unknown/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/video_remixes/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/shorts_content_links/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/source/immersive_live/metrics

data: [{
    "source": "[TRAFFIC_SOURCE]",
    "views": int,
    "youtube_red_views": int,
    "watch_time": int,
    "youtube_red_watch_time": int,
    "average_watch_time": int,
    "average_watch_percentage": string|double,
    "video_thumbnail_impressions": int,
    "video_thumbnail_impressions_vtr": string|double,
    "shorts_feed_impressions": int,
    "shorts_feed_impressions_vtr": string|double,
    "date": 2024-11-21
}]

Video Resources
Required Parameters
  • key
  • date, from/to

They API key is required for every resource call. You can pass it as a GET key pair variable key=... or via authentication header

GET Variable

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/[RESOURCE]?key=1/a0s9jasd0jaspodia0sd9jf0a9sjdf

Header

Authorization: Bearer 1/a0s9jasd0jaspodia0sd9jf0a9sjdf

Dates are required for every resource call. You can request a single date.

Single date

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/[RESOURCE]?key=[API_KEY]&date=2024-11-21

Date range

GET https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/[RESOURCE]?key=[API_KEY]&from=2024-10-22&to=2024-11-21

All channel resources have a templated response. See example below

{
    "data": [
        {
            "video_thumbnail_impressions": 18,
            "video_thumbnail_impressions_vtr": "11.11",
            "estimated_unique_viewers": 3,
            "average_views_per_viewer": "1.33",
            "new_viewers": "0.00",
            "returning_viewers": "0.00",
            "date": "2023-01-01"
        }
    ],
    "links": {
        "first": "https://viewtrender.com/api/v1/channel/UC0000000000000000000000/video/v000000000/reach?page=1",
        "last": "https://viewtrender.com/api/v1/channel/UC0000000000000000000000/video/v000000000/reach?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://viewtrender.com/api/v1/channel/UC0000000000000000000000/video/v000000000/reach?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
        ],
        "path": "https://viewtrender.com/api/v1/channel/UC0000000000000000000000/video/v000000000/reach",
        "per_page": 50,
        "to": 1,
        "total": 1,
        "channel": {
            "id": "UC0000000000000000000000",
            "title": "Channel Title"
        },
        "dates": {
            "from": "2023-01-01",
            "to": "2023-01-01"
        },
        "video": {
            "id": "VIDEO_ID",
            "title": "Some Video Title",
            "privacy": "public",
            "made for kids": 0
        }
    }
}
Metrics
Cards
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/cards

data: [{
    info_card_clicks: int,
    info_card_impressions: int,
    info_card_click_rate: string|double,
    info_card_teaser_clicks: int,
    info_card_teaser_impressions: int,
    info_card_teaser_click_rate: string|double,
    date: "2024-11-21"
}]
Endscreens
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/endscreens

data: [{
    endscreen_element_click_rate: string|double,
    endscreen_element_clicks: int,
    endscreen_element_impressions: int,
    date: "2024-11-21"
}]
Interactions
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/interactions

data: [{
    subscribers_gained: int,
    subscribers_lost: int,
    ratings_likes: int,
    ratings_dislikes: int,
    likes_per_likes_plus_dislikes_percent: string|double,
    sharings: int,
    comments: int,
    date: "2024-11-21"
}]
Overview
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/overview

data: [{
    watch_time: int,
    views: int,
    average_watch_time: int,
    average_watch_percentage: string|double,
    subscribers_net_change: int,
    date: "2024-11-21"
}]
Premium
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/premium

data: [{
    youtube_red_views: int,
    youtube_red_watch_time: int,
    date: "2024-11-21"
}]
Reach
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/reach

data: [{
    video_thumbnail_impressions: int,
    video_thumbnail_impressions_vtr: string|double,
    shorts_feed_impressions: int,
    shorts_feed_impressions_vtr: string|double,
    estimated_unique_viewers: int,
    average_views_per_viewer: string|double,
    new_viewers: int,
    returning_viewers: int,
    date: "2024-11-21"
}]
Revenue
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/revenue

data: [{
    total_estimated_earnings: string|double,
    ad_earnings: string|double,
    playbacks: int,
    impressions_cpm: string|double,
    earnings_per_thousand_views: string|double,
    cpm: string|double,
    impressions: int,
    date: "2024-11-21"
}]
Traffic Sources
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/advertising/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/annotation/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/campaign_card/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/end_screen/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/ext_url/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/hashtags/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/no_link_embedded/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/no_link_other/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/playlist/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/promoted/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/related_video/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/shorts/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/sound_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/subscriber/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/yt_channel/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/yt_other_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/yt_playlist_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/yt_search/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/product_page/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/live_redirect/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/notification/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/unknown/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/video_remixes/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/shorts_content_links/metrics
https://viewtrender.com/api/v1/channel/[CHANNEL_ID]/video/[VIDEO_ID]/source/immersive_live/metrics

data: [{
    "source": "[TRAFFIC_SOURCE]",
    "views": int,
    "youtube_red_views": int,
    "watch_time": int,
    "youtube_red_watch_time": int,
    "average_watch_time": int,
    "average_watch_percentage": string|double,
    "video_thumbnail_impressions": int,
    "video_thumbnail_impressions_vtr": string|double,
    "date": 2024-11-21
}]