You can create ads from Instagram feed posts containing a single photo, video, carousel, or reel (tagged photos and videos are supported). Currently, you cannot create ads from Stories, or 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?.
Using the Instagram Graph API’s media endpoints, obtain the id for a relevant Instagram post (IG Media) that you would like to use as an ad. This ID will be used as the source_instagram_media_id
in your 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>"
POST {adaccount-id}/advideos
to upload the video to Facebook.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.
There are at least two ways to create your ad using a Feed post or Story:
source_instagram_media_id
to refer to the content you want to use.object_story_spec
in the ad creative directly. This approach requires ads_management
permissions.