Beginning June 3, 2024, you can use the boost_eligibility_info
field as a convenient and efficient way to determine whether media is eligible to be boosted as an ad and boost_ads_list
to trace past boost Instagram ad information related to the ad. See the blog for more information.
Create Instagram ads from Instagram or Facebook posts.
You can create ads from Instagram feed posts containing a single photo, video, carousel, or reel (tagged photos and videos are supported) or active Instagram Stories. You can also create ads from feed posts containing feed images, carousels, and existing videos with product tags. Currently, you cannot create ads from Instagram TV posts.
You have two ways of obtaining the Instagram User ID (IG User):
Obtain an Instagram Business or creator account’s user ID by using the instagram_business_account
field on the relevant Facebook Page. See Instagram Graph API, Getting Started.
Use the Marketing API to obtain the user ID for the Instagram account connected to a specific ad account or page. Get that information by querying the following endpoints:
{ad_account_id}/connected_instagram_accounts
— Get user ID for Instagram accounts connected to an ad account.{business_id}/instagram_business_accounts
— Get user ID for Instagram accounts connected to a business.If you need to connect your Instagram account, see Add an Instagram Account to Your Business Manager and What happens when I connect my Instagram account and a Facebook Page that I manage?.
To obtain the ID for the relevant Instagram post (IG Media) that you would like to use as an ad, use the Instagram Graph API's media endpoints. To obtain the ID for the relevant Instagram story that would like to use as an ad, use the Instagram Graph API's stories endpoint. This ID will be used as the source_instagram_media_id
in your ad.
You can use the boost_eligibility_info
field to determine whether media is eligible to be boosted as an ad.
If you already have an ad creative set up using an Instagram post, check the original media ID for that post by querying {ad_creative_id}/source_instagram_media_id
.
To create your ads, complete the process described on Instagram Ads API, Get Started up until Step 3: Create Ad Set. For Step 4: Provide Ad Creative and Create Ad, make the following changes:
instagram_actor_id
in the creative spec, set instagram_user_id
as the Instagram user ID you got in Step 1: Obtain Instagram User ID. For example:
{ "object_id":"<object_id>", // page id "instagram_user_id":"<instagram-user-id>", "source_instagram_media_id":"<source_instagram_media_id>" }
source_instagram_media_id
as the media ID you got from Step 2: Find the Post You Want to Promote. For example:
curl -i -X POST \ "https://graph.facebook.com/v<API_VERSION>/act_<AD_ACCOUNT>/adcreatives ?object_id=<PAGE_ID> &instagram_user_id=<IG_USER_ID> &source_instagram_media_id=<IG_ORGANIC_MEDIA_ID> &access_token=<API_ACCESS_TOKEN>"
call_to_action
field for your promotion. For example:
curl -i -X POST \ "https://graph.facebook.com/v<API_VERSION>/act_<AD_ACCOUNT>/adcreatives ?object_id=<PAGE_ID> &instagram_user_id=<IG_USER_ID> &source_instagram_media_id=<IG_ORGANIC_MEDIA_ID> &call_to_action="{'type':'LEARN_MORE','value':{'link': '<YOUR_LINK>'}}" &access_token=<API_ACCESS_TOKEN>"
"call_to_action": { "value": {"app_destination":"INSTAGRAM_DIRECT"}, "type": "MESSAGE_PAGE" }
"call_to_action": { "value": {"app_destination":"MESSENGER"}, "type": "MESSAGE_PAGE" }
"asset_feed_spec": { "optimization_type": "DOF_MESSAGING_DESTINATION", "call_to_actions": [ { "type": "MESSAGE_PAGE", "value": { "app_destination": "MESSENGER", "link": "https://fb.com/messenger_doc/" } }, { "type": "INSTAGRAM_MESSAGE", "value": { "app_destination": "INSTAGRAM_DIRECT", "link": "https://www.instagram.com" } } ] }See the Asset Feed Spec documentation for more information.
Once you have provided your ad creative, create your ads. You also have the option of providing your creative as you create your ads —without having to separate the process in two steps.
Not all Facebook posts work as Instagram ads.
You can boost your Instagram content by using an existing Facebook Feed post or Story as part of your ad’s creative. To know whether a post can be used for ads, make the following API call:
curl -G \ -d "access_token=<ACCESS_TOKEN>"\ -d "fields=is_instagram_eligible"\ "https://graph.facebook.com/<API_VERSION>/<POST_ID>"
If your response includes "is_instagram_eligible": true
, you can start creating your ad.
curl -i -X POST \
"https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT>/adcreatives
?object_story_id=<postOwnerID_postID>
&instagram_actor_id=<IG_USER_ID>
&call_to_action="{'type':MESSAGE_PAGE,'value':{'app_destination':'MESSENGER'}}"
&access_token=<ACCESS_TOKEN>"
Where object_story_id
is the post ID in the format of postOwnerID_postID
and instagram_actor_id
is either a Page-connected Instagram account ID or the Page-backed Instagram account ID. See more details in Set Up Instagram Accounts With Pages.
If you encounter an error stating "Creative Must Provide enroll_status for Standard Enhancements", refer to Standard Enhancements for Advantage+ Creative for more information.
If you are promoting a Facebook post with an Instagram actor ID in the ad creative and the ad set includes both Facebook and Instagram placements, you may encounter and error stating "Creative is missing DOF spec" or "Creative should have degrees_of_freedom spec for multi-destination ads". Add "optimization_type": "DOF_MESSAGING_DESTINATION"
to the asset_feed_spec
parameter in the ad creative.