Marketing API Version

Ad Campaign Stats

Reading

Stats for a given ad campaign

Examples

Graph API Explorer
GET v2.10/...?fields={fieldname_of_type_AdCampaignStats} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '...?fields={fieldname_of_type_AdCampaignStats}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "...?fields={fieldname_of_type_AdCampaignStats}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_AdCampaignStats}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"...?fields={fieldname_of_type_AdCampaignStats}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

id

token with structure: ID

The id of the stats reports.

account_id

string

The ID number of your ad account, which groups your advertising activity. Your ad account includes your campaigns, ads and billing.

actions

(list) or (map)

Number of actions for each action type. Each number is the sum of actions that resulted from either clicking or being served an ad.

adgroup_id

id

The unique ID of the ad you're viewing in reporting.

campaign_id

id

The unique ID of the ad set you're viewing in reporting. An ad set is a group of ads that share the same budget, schedule, delivery optimization and targeting.

campaign_ids

list<id>

Set of ad campaign ids

clicks

unsigned int32

The number of clicks on your ads.

end_time

(timestamp) or (string)

End time

impressions

impressions

The number of times your ads were on screen.

inline_actions

map

The number of times people liked your Page, RSVPed to your event, or installed your app through the ad creative.

io_number

unsigned int32

IO Number

is_completed

bool

Is the ad compaign completed ?

line_number

unsigned int32

Line number

newsfeed_position

Information about ads displayed on newsfeed

social_clicks

unsigned int32

The number of clicks (all) when your ad was displayed with social information, which shows other Facebook friends who engaged with your Facebook Page or ad.

social_impressions

impressions

The number of times your ads were viewed when displayed with social information, which shows Facebook friends who engaged with your Facebook Page or ad.

social_spent

unsigned int32

The total amount you have spent so far for social clicks and impressions

social_unique_clicks

unsigned int32

The number of people who performed a click (all) on your ad when it was displayed with social information, which shows other Facebook friends who engaged with your Facebook Page or ad.

social_unique_impressions

impressions

The number of people who saw your ad when displayed with social information, which shows other Facebook friends who engaged with your Facebook Page or ad.

spent

number

The estimated total amount of money you've spent on your campaign, ad set or ad during its schedule.

start_time

(timestamp) or (string)

Start time

topline_id

id

Topline ID

unique_clicks

unsigned int32

The number of people who performed a click (all).

unique_impressions

impressions

The number of people who saw your ads at least once. Reach is different from impressions, which may include multiple views of your ads by the same people.

Edges

No edges

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.