Skip to content

أدوات Meta Ads: التصاميم والإعلانات والترويج ​

في هذه الصفحة 8 أداة. هذه الصفحة مولَّدة آليًا من قائمة الأدوات في الخادم نفسه، الإصدار 0.1.0، ولا تُحرَّر باليد. أوصاف الأدوات مكتوبة للمساعد الذكي، وهي بالإنجليزية ولم تُترجم، فكل ما تحت هذه الفقرة بالإنجليزية كما يقرؤه المساعد الذكي. لا تحتاج إلى معرفة اسم أي أداة لتطلب عملًا: هذه الصفحة مرجع لمن يريد أن يعرف ما تأخذه كل أداة بالضبط. صفحة كل الأدوات تسرد الصفحات كلها.

meta_ads_list_creatives ​

Kind: read. It is marked as changing nothing.

List the ad creatives of a Meta ad account: what each shows (title, text, button, thumbnail) and its id, which meta_ads_create_ad and meta_ads_preview take.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
limitwhole numberno25Rows per page (1-100).
aftertextnononenext_after from the previous page.

meta_ads_list_videos ​

Kind: read. It is marked as changing nothing.

List the videos in a Meta ad account's library, newest first, and whether Meta has finished processing each. A video uploaded by meta_ads_create_creative appears here.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
limitwhole numberno25Rows per page (1-100).
aftertextnononenext_after from the previous page.

meta_ads_preview ​

Kind: read. It is marked as changing nothing.

Get links that show a Meta ad, or a creative, as it would appear in each placement. Show them to the user before an ad is switched on: this installation may refuse to activate an ad that the person activating it has not had previewed in the last 24 hours, and a preview from this tool is what counts.

Each format is one call to Meta, so ask for the placements the ad set uses, up to four.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
ad_idtextnononeThe ad to preview, from meta_ads_list or meta_ads_create_ad. Or:
creative_idtextnononeThe creative to preview, from meta_ads_create_creative.
ad_formatslist of textnononePlacements to draw. Default MOBILE_FEED_STANDARD, INSTAGRAM_STANDARD and INSTAGRAM_STORY. Also DESKTOP_FEED_STANDARD, FACEBOOK_STORY_MOBILE, FACEBOOK_REELS_MOBILE, MARKETPLACE_MOBILE, RIGHT_COLUMN_STANDARD, INSTREAM_VIDEO_MOBILE, INSTAGRAM_REELS, INSTAGRAM_PROFILE_FEED, INSTAGRAM_EXPLORE_GRID_HOME, INSTAGRAM_SEARCH_CHAIN, MESSENGER_MOBILE_INBOX_MEDIA.

meta_ads_list_ad_comments ​

Kind: read. It is marked as changing nothing.

The comments people left on a Meta ad account's ads, newest first, by the post each ad shows. Several ads that show the same post share its comments, and are listed with it.

Each comment has the shape meta_list_comments gives. To answer or hide one, pass its comment_id to meta_reply_to_comment or meta_hide_comments with the page_id or ig_account_id shown beside the post. For a regular moderation pass that remembers what was seen, use meta_list_new_comments with ad_account_id instead.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
ad_idtextnononeOnly this ad's post. Left out, the posts of every running ad.
include_pausedtrue or falsenofalseAlso the ads that are paused, which keep their comments.
postswhole numberno10How many posts to read (1-25). Each is one call to Meta.
limitwhole numberno25Comments per post (1-100).

meta_ads_create_creative ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a Meta ad creative: what an ad shows. One image or one video (media_id), or a carousel (cards), with the text, the button and where it leads - or a post that already exists (post_id, instagram_media_id), shown as it is with its likes and comments. Files come from the media library (meta_list_media, meta_add_media) and are uploaded to the ad account only when dry_run=false.

The dry run is this server's own preflight: nothing is uploaded and Meta has not seen the creative, so do not call it validated. A creative spends nothing and shows nothing until an ad is made from it (meta_ads_create_ad), and it cannot be edited afterwards, only replaced. Meta's creative enhancements (rewriting text, cropping, retouching, translating) are sent switched off.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
nametextyesThe creative's name, seen only in Ads Manager.
page_idtextyesThe Facebook Page the ad speaks as; one of the ad account's pages.
primary_texttextnononeThe words above the picture. About 125 characters show before "See more". Needed unless the creative is an existing post.
instagram_user_idtextnononeThe Instagram account the ad speaks as on Instagram; one of the ad account's instagram_accounts. Left out, the Page is used there too.
media_idtextnononeOne library image (JPEG or PNG) or video. 1:1 or 4:5 suits the feed.
thumbnail_media_idtextnononeWith a video: a library image to show before it plays.
vertical_media_idtextnononeA 9:16 file of the same kind as media_id, shown in stories and reels while media_id is shown everywhere else.
cardslist of CardnononeA carousel instead of media_id: 2 to 10 cards, each with a media_id and optionally its own headline, description and link_url.
headlinetextnononeThe bold line beside the button.
descriptiontextnononeThe smaller line under the headline; not shown on Instagram.
call_to_actiontextno"LEARN_MORE"The button: LEARN_MORE (default), SIGN_UP, CONTACT_US, GET_QUOTE, APPLY_NOW, BOOK_NOW, DOWNLOAD, SHOP_NOW, SUBSCRIBE, GET_OFFER, ORDER_NOW, REQUEST_TIME, SEE_MENU, WATCH_MORE or NO_BUTTON.
link_urltextnononeWhere the ad leads. Not needed with lead_form_id.
url_tagstextnononeTracking parameters added to the link, e.g. utm_source=meta&utm_medium=paid.
lead_form_idtextnononeA lead form of the Page to open instead of a website, for an ad set optimised for LEAD_GENERATION.
enhancementslist of textnononeCreative enhancements to switch on by name. Refused unless this installation allows it; leave out unless the user asked for one.
post_idtextnononeA post of the Page (from meta_list_posts, or the object_story_id of meta_ads_create_dark_post) to advertise as it is. Give no text, media or link.
instagram_media_idtextnononeAn Instagram post of instagram_user_id to advertise as it is.
message_destinationtextnononeWHATSAPP, MESSENGER or INSTAGRAM_DIRECT, for an ad whose button opens a chat instead of a website. The button and the link are then set for you: give one image or video and no link_url. The Page needs a WhatsApp number linked for WHATSAPP; INSTAGRAM_DIRECT needs instagram_user_id.
welcome_messageWelcomeMessagenononeWith message_destination: what the chat opens with - a greeting, up to 4 ice_breakers (questions to tap), or on WhatsApp a prefilled_message.
dry_runtrue or falsenotruetrue = check here without sending anything (default). false = upload the files and create it, only after the user confirms.

meta_ads_create_ad ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a Meta ad: one creative shown in one ad set. Always created PAUSED, so nothing is shown or spent until it is switched on with meta_ads_set_status.

The dry run is checked by Meta, including its review of the creative's text and picture, and creates nothing. After creating it, show the user meta_ads_preview before activating.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
adset_idtextyesThe ad set it runs in, from meta_ads_list or meta_ads_create_adset.
creative_idtextyesWhat it shows, from meta_ads_create_creative or meta_ads_list_creatives.
nametextyesThe ad's name.
pixel_idtextnononeA Meta pixel whose website events are counted for this ad.
conversion_domaintextnononeThe website's bare domain (example.com), which Meta requires when the campaign measures conversions with a pixel.
dry_runtrue or falsenotruetrue = Meta checks it without creating anything (default). false = create it, only after the user confirms.

meta_ads_boost_post ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Advertise a post that already exists: a Facebook Page post or an Instagram post. Makes a campaign, an ad set and an ad in one step, all PAUSED - nothing is shown or spent until the campaign is switched on with meta_ads_set_status, which checks the spending limits.

The ad is the post itself, with its likes and comments. The dry run is this server's own preflight: Meta has not checked it, so do not call it validated. Its preview shows the post, the targeting, Meta's estimate of the audience and the most the budget could spend. Amounts are in the ad account's currency units and subject to this installation's limits. If Meta refuses a step when applying, what this call had made is deleted again.

ArgumentTypeRequiredDefaultDescription
ad_account_idtextyesFrom meta_ads_list_accounts.
page_idtextyesThe Page the post is on, or the Page linked to the Instagram account.
targetingTargetingyesWho sees it: countries (or regions, cities), ages, gender, languages, detailed targeting. Left without placements, the ad runs on the post's own platform.
end_timetextnononeWhen it stops, ISO 8601 with an offset. This installation may require one.
goaltextno"engagement""engagement" (likes, comments, shares; the default), "awareness" (as many people as possible) or "video_views".
post_idtextnononeA Facebook Page post, from meta_list_posts or meta_ads_create_dark_post. Or:
instagram_user_idtextnononeThe Instagram account, with
instagram_media_idtextnononeone of its posts, from meta_list_posts.
daily_budgetnumbernononeAverage daily budget. Meta may spend up to 75% more on one day.
lifetime_budgetnumbernononeBudget for the whole run; needs end_time.
start_timetextnononeISO 8601 with an offset. Now if left out.
nametextnononeWhat to call the campaign, ad set and ad. A name is made if left out.
special_ad_categorieslist of textnononeAs for meta_ads_create_campaign: ask the user rather than assuming none applies.
dry_runtrue or falsenotruetrue = check here without sending anything (default). false = create it all, paused, only after the user confirms.

meta_ads_create_dark_post ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Make a Facebook Page post that appears on no timeline and exists only to be advertised (a "dark post"). Returns its object_story_id, which meta_ads_boost_post and meta_ads_create_creative take as post_id. Use it when several ads should share one post, and so one set of likes and comments; for a single ad, meta_ads_create_creative alone is enough.

The dry run is this server's own preflight: Meta has not seen the post. It does not count as one of the day's posts, since nobody sees it until an ad shows it.

ArgumentTypeRequiredDefaultDescription
page_idtextyesFacebook Page id from meta_list_accounts.
messagetextyesThe post text.
linktextnononeA URL to attach. Only for a text post.
image_urltextnononePublic https URL of a JPEG or PNG to post as a photo.
media_idtextnononeAn image from the caller's library (meta_list_media).
dry_runtrue or falsenotruetrue = preflight only (default). false = make it, after the user confirms.

Objects the arguments take ​

An argument whose type is a name takes an object with these fields.

Card ​

One card of a carousel.

FieldTypeRequiredDefaultDescription
media_idtextyesA library image or video, from meta_list_media.
headlinetextnonone
descriptiontextnonone
link_urltextnononeWhere this card leads; the creative's link_url if left out.

WelcomeMessage ​

What the chat opens with.

FieldTypeRequiredDefaultDescription
greetingtextnononeThe first message the person sees from the business.
ice_breakerslist of IceBreakernoUp to 4 questions to tap.
prefilled_messagetextnononeWhatsApp only: a message already typed for the person, who presses send.

Targeting ​

Who an ad set is shown to. Ids and keys come from meta_ads_search_targeting.

FieldTypeRequiredDefaultDescription
countrieslist of textnoTwo-letter country codes, e.g. ['KW', 'SA'].
regionslist of textnoRegion keys.
citieslist of Cityno
location_typeslist of one of home, recentnononePeople who live there (home), were recently there (recent), or both (default).
excluded_countrieslist of textno
excluded_regionslist of textno
excluded_citieslist of Cityno
age_minwhole numberno18
age_maxwhole numberno65
gendersone of all, male, femaleno"all"
localeslist of whole numbernoLanguage keys, e.g. Arabic and English.
detailedlist of list of OptionnoDetailed targeting. A person must match at least one option of EVERY inner list: [[a, b], [c]] is (a or b) and c.
excludelist of OptionnoOptions to leave out.
custom_audienceslist of textnoCustom or lookalike audience ids to include, from meta_ads_list_audiences.
excluded_custom_audienceslist of textno
placementsobjectnononeWhere the ads appear, by platform: {'facebook': ['feed', 'story'], 'instagram': []}. An empty list is every position of that platform. Left out: Meta chooses (Advantage+ placements).
deviceslist of one of mobile, desktopnonone
advantage_audiencetrue or falsenofalseLet Meta show the ads beyond this targeting when it expects better results. Age, gender and detailed targeting then become suggestions only.

IceBreaker ​

A question the person can tap instead of typing.

FieldTypeRequiredDefaultDescription
titletextyesThe question, up to 80 characters.
responsetextnononeMessenger and Instagram only: the automatic answer, up to 300 characters.

City ​

FieldTypeRequiredDefaultDescription
keytextyesThe city's key from meta_ads_search_targeting(type='location').
radiusnumbernononeAround the city: 17-80 km or 10-50 miles.
distance_unitone of kilometer, mileno"kilometer"

Option ​

FieldTypeRequiredDefaultDescription
kindtextyesThe targeting field, as the search result's kind: interests, behaviors, work_positions, work_employers, education_schools, education_majors, industries, life_events, family_statuses or income.
idtextyes
nametextnonone