Get aggregated insight metrics for a videos on a Page.
ANALYZE
Tasks on a Page. Note: Only Page admins can query earnings insights via the API. Learn about setting up user roles for a Page.pages_manage_engagement
Permission.read_insights
Permission.GET /v14.0/{video-id}/video_insights HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{video-id}/video_insights',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{video-id}/video_insights",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{video-id}/video_insights",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{video-id}/video_insights"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Parameter | Description |
---|---|
metric list<A valid metric for an insights endpoint> | The list of metrics that you want to receive |
period enum{day, week, days_28, month, lifetime} | The aggregation period |
since datetime/timestamp | Lower bound of the time range to consider |
until datetime/timestamp | Upper bound of the time range to consider |
Reading from this edge will return a JSON formatted result:
{ "
data
": [], "paging
": {} }
data
paging
Error | Description |
---|---|
200 | Permissions error |
100 | Invalid parameter |
80001 | There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
Name | Description |
Values for period |
---|---|---|
| The number of times your videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your videos for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos automatically played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds, after people clicked play. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds, by organic reach. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your videos for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds, by organic reach. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your promoted videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your promoted videos for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video. | lifetime |
| The number of times your videos played with sound on for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 95%, or more, or its length. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your videos for 95%, or more, of its length. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos automatically played for 95%, or more, of its length. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 95%, or more, of its length, after people clicked play. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 95%, or more, of its length, by organic reach. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your videos for 95%, or more, of its length, by organic reach. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your promoted videos played for 95%, or more, of its length. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your promoted videos for 95%, or more, of its length. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 10 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of people who viewed your videos for 10 seconds or more. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos automatically played for 10 seconds or more. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 10 seconds or more, after people clicked play. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 10 seconds or more, by organic reach. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your promoted videos played for 10 seconds or more. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video. | lifetime |
| The number of times your videos played with sound on for 10 seconds or more. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 15 seconds or more. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played for 60 seconds or more. During a single instance of a video playing, we'll exclude any time spent replaying the video. | lifetime |
| The number of times your videos played at each interval as a percentage of all views. Videos are divided into 40 equal intervals. Retention graphs may show more impressions later in the video than at the beginning. People might start the video in the middle, skip ahead, save, and rewatch it from that point, or other similar behaviors | lifetime |
| The number of times your videos automatically played at each interval as a percentage of all views. Videos are divided into 40 equal intervals. Retention graphs may show more impressions later in the video than at the beginning. People might start the video in the middle, skip ahead, save, and rewatch it from that point, or other similar behaviors. | lifetime |
| The number of times your videos played at each interval as a percentage of all views, after people clicked play. Videos are divided into 40 equal intervals. Retention graphs may show more impressions later in the video than at the beginning. People might start the video in the middle, skip ahead, save, and rewatch it from that point, or other similar behaviors. | lifetime |
| The average time, in milliseconds, people viewed your videos. | lifetime |
| The total time, in milliseconds, people viewed your videos. | lifetime |
| The total time, in milliseconds, people viewed your videos, by organic reach. | lifetime |
| The total time, in milliseconds, people viewed your promoted videos. | lifetime |
| The total number of impressions of your videos. | lifetime |
| The total number of unique impressions of your videos. | lifetime |
| The total number of unique impressions or your promoted videos. | lifetime |
| The total number of impressions of your promoted videos. | lifetime |
| The total number of unique impressions of your videos, by organic reach. | lifetime |
| The total number of impressions of your videos, by organic reach. | lifetime |
| The total number of unique impressions of your videos in a friend's story. | lifetime |
| The total number of impressions of your videos in a story generated by a friend. | lifetime |
| The total number of unique impressions of your videos for people who liked your Page. | lifetime |
| The total number of impressions of your videos for people who liked your Page. | lifetime |
| The total number of unique impressions of your promoted videos for people who liked your Page. | lifetime |
| The total number of impressions of your promoted video for people who liked your Page. | lifetime |
| The total number of stories created about your Page's video, by action type; liking, commenting, sharing, etc. | lifetime |
| The total number of reactions to your Page's video, by type. | lifetime |
| The total time, in milliseconds, your video has been viewed by Top Audiences; age and gender. | lifetime |
| The total time, in milliseconds, your Page's videos played for your Top 45 Locations; Region - Country. | lifetime |
| The number of times your videos played by distribution type; page_owned and shared. | lifetime |
| The total time, in milliseconds, your Page's videos played by distribution type; page_owned and shared. | lifetime |
Name | Description |
Values for period |
---|---|---|
| The average amount paid by advertisers for 1,000 impressions of their ads in your video, in U.S. cents. This number also includes the amount paid to Facebook. | day, lifetime |
| Number of times an ad was shown during your video's ad breaks. | day, lifetime |
| An estimate of the amount you earned from ad breaks in your video, in U.S. cents, based on the number of impressions and CPM of ads shown. Actual payments may differ if there are content ownership claims or other adjustments. | day, lifetime |