An ad Facebook stores in the Ad Library. You can perform keyword searches or search by Page ID of ads stored in the Ad Library. See Ad Library and Ad Library API.
An archived ad.
GET v10.0/...?fields={fieldname_of_type_ArchivedAd} 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(
'...?fields={fieldname_of_type_ArchivedAd}',
'{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(
"...?fields={fieldname_of_type_ArchivedAd}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"...?fields={fieldname_of_type_ArchivedAd}",
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_ArchivedAd}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Field | Description |
---|---|
id numeric string | ID for the archived ad object. |
ad_creation_time string | The UTC date and time when someone created the ad. This is not the same time as when the ad ran. Includes date and time separated by |
ad_creative_body string | The text which displays in the ad. Typically 90 characters. See Reference, Ad Creative. |
ad_creative_link_caption string | If an ad contains a link, the text that appears in the link. |
ad_creative_link_description string | If an ad contains a link, any text description that appears next to the link, such as a caption or description. |
ad_creative_link_title string | If an ad contains a link, any title provided. |
ad_delivery_start_time string | Date an time when an advertiser wants Facebook to start delivering an of the ad. Provided in UTC as in |
ad_delivery_stop_time string | The time when an advertiser wants to stop delivery of their ad. If this is blank, Facebook runs the ad until the advertiser stops it or they spend their entire campaign budget. In UTC. |
ad_snapshot_url string | String with URL link which displays the archived ad. This displays uncompressed images and videos from the ad. |
currency string | The currency used to pay for the ad, as an ISO currency code |
demographic_distribution | The demographic distribution of people reached by the ad. Provided as age ranges and gender. |
funding_entity string | A string containing the name of the person, company, or entity that provided funding for the ad. Provided by the purchaser of the ad. |
impressions | A string containing the number of times the ad created an impression. In ranges of: <1000, 1K-5K, 5K-10K, 10K-50K, 50K-100K, 100K-200K, 200K-500K, >1M |
page_id numeric string | ID of the Facebook Page that ran the ad. |
page_name string | Name of the Facebook Page which ran the ad. |
potential_reach | This is an estimate of the size of the audience that's eligible to see this ad. It's based on targeting criteria, ad placements and how many people were shown ads on Facebook apps and services in the past 30 days. This is not an estimate of how many people will actually see this ad, and the number may change over time. It isn't designed to match population or census estimates. |
publisher_platforms list<enum> | A list of platforms where the archived ad appeared, such as Facebook or Instagram. |
region_distribution | Regional distribution of people reached by the ad. Provided as a percentage and where regions are at a sub-country level. |
spend | A string showing amount of money spent running the ad as specified in |