Marketing API Version

Ad

Fields

BidInfo, Creative, account_id, ad_review_feedback, adlabels, adset_id, bid_amount, bid_info, campaign_id, configured_status, conversion_specs, created_time, creative, effective_status, failed_delivery_checks, id, name, redownload, social_prefs, tracking_specs, updated_time, view_tags

Ad.get_ad_creatives (fields, params)

Returns iterator over AdCreatives associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
creatives = ad.get_ad_creatives(fields=[AdCreative.Field.name])
print creatives

Ad.get_ad_preview (fields, params)

Returns AdPreview object associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
ad_preview = ad.get_ad_preview(params={
    'ad_format': 'RIGHT_COLUMN_STANDARD',
})
print ad_preview

Ad.get_click_tracking_tag (fields, params)

Returns iterator over ClickTrackingTags associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
tag = ad.get_click_tracking_tag()
print tag

Ad.get_keyword_stats (fields, params)

Returns iterator over KeywordStats associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
keywords = ad.get_keyword_stats()
print keywords

Ad.get_leads (fields, params)

Returns all the leads associated with the Ad

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
leads = ad.get_leads()
print leads

Ad.get_reach_estimate (fields, params)

Returns iterator over ReachEstimates associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
reach_estimate = ad.get_reach_estimate()
print reach_estimate

Ad.get_targeting_description (fields, params)

Returns TargetingDescription object associated with this ad.

Name Type Description Required

fields

array

A list of fields to read.

No

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

Sample Code

ad = Ad('6040236409040')
targeting_desc = ad.get_targeting_description(fields=[
    'targetingsentencelines',
])
print targeting_desc