0

we download buckets of stats (conversions, spend etc.) but also need to download the Ad creative itself, including:

  • Headline
  • Text
  • Images (including Positioning, or just the visible part of the image)

I've scoured the Facebook API docco and can't find how/where to do this.

Even better would be an API call that returns the creative of the "top" 5 Ads e.g. by Conversions.

Many thanks, Pete

sming
  • 801
  • 2
  • 12
  • 25

3 Answers3

1

Creative copy and image is available via the adcreative's ID or its associated connection objects (page post).

You'll need the adcreative IDs which you may have received along with the conversion and spend stats, if not then you can get them via their campaigns from the API.

I'm not sure what you mean by "positioning". Do you want to know if it's a right-hand rail ad or a newsfeed (mobile or desktop) ad? If so you'll want to pull the ad type (certain ads only work in certain places) and where the ad was targeted (read targeting from the adset).

Finally, try out Facebook's Graph API Explorer to get a feel for the API and retrieving the data you seek: https://developers.facebook.com/tools/explorer/

bjeavons
  • 1,123
  • 6
  • 16
  • Many thanks for the response, I'll look into it shortly. Regarding Positioning, in the Edit Your Advert dialog, there is a Reposition button for changing which portion of the image is displayed (the Viewport). I need this in order to know how to show the image. – sming Mar 24 '15 at 13:49
1

also, if you want to get an ad's creative(s) from an ad, use

https://graph.facebook.com/v2.5/<AD_ID>/adcreatives

which returns a list of creative ID's like

{
  "data": [
    {
       "id": "<AD_CREATIVE_ID>"
    }
  ]
}

which you can then query for fields=body,object_type,title etc. HTH

sming
  • 801
  • 2
  • 12
  • 25
0

Use the adcreatives edge from an Ad:

GET /v2.10/{adgroup-id}/adcreatives HTTP/1.1 Host: graph.facebook.com

Required permissions: ads_read

Returns:

{ "data": [A list of AdCreative nodes], "paging": {} }

Docs: https://developers.facebook.com/docs/marketing-api/reference/adgroup/adcreatives/

Phil Hudson
  • 3,819
  • 8
  • 35
  • 59