El catálogo/Meta Ads

Meta Ads

app.meta-ads

Report on Meta ad performance and manage campaigns, ad sets, ads and budgets

Clave de APImarketingLeer el código↗
Versión1.0.1
Categoríamarketing
AutenticaciónClave de API
Herramientas11
Transportestdio
LicenciaMIT
01

Qué hace

La aplicación, en sus propias palabras.

Meta (Facebook and Instagram) ads through the Marketing API: list ad accounts, campaigns, ad sets, ads and creatives, run performance reports with breakdowns, pause or activate delivery, change budgets, and create campaigns and ad sets (always paused)

metafacebookinstagramadsadvertisingmarketingcampaignsinsightsppc
02

Herramientas

11 herramientas que el agente puede llamar.

Todas se declaran con parámetros tipados y devuelven resultados estructurados, así que el anfitrión puede renderizarlas en vez de narrarlas.

  • activate-ad-objectActivate a campaign, ad set or ad (sets its status to ACTIVE). THIS STARTS SPENDING MONEY: once delivery starts, the spend cannot be undone. Delivery also needs its parent campaign and ad set to be active and the ad to pass review: check effectiveStatus with list-campaigns, list-ad-sets or list-ads afterwards. Checks first that the id is of the given level. Returns { success, id, name, level, previousStatus, status }.
  • create-ad-setCreate an ad set inside a campaign. It is always created PAUSED, so it spends nothing until someone activates it (and its campaign) with activate-ad-object. Give dailyBudget or lifetimeBudget (minor units: cents) only when the campaign has no campaign budget; a lifetime budget needs endTime. targeting is Meta's targeting spec and needs at least geo_locations, e.g. {"geo_locations":{"countries":["ES"]},"age_min":18}. optimizationGoal must suit the campaign objective (e.g. LINK_CLICKS or LANDING_PAGE_VIEWS for OUTCOME_TRAFFIC, OFFSITE_CONVERSIONS with a pixel promotedObject for OUTCOME_SALES); Meta's error says which ones are allowed. Returns { success, id, name, campaignId, status: "PAUSED" }.
  • create-campaignCreate a campaign in an ad account. It is always created PAUSED, so it spends nothing until someone activates it with activate-ad-object. Give a campaign budget (dailyBudget or lifetimeBudget, minor units: cents) to let Meta spread it across the ad sets, or leave both out and give each ad set its own budget in create-ad-set. Ads that relate to employment, housing, credit, politics, gambling or financial products must declare specialAdCategories. Returns { success, id, name, status: "PAUSED" }; next, add ad sets with create-ad-set.
  • get-insightsPerformance report (Ads Insights) for an ad account, campaign, ad set or ad. Returns rows with date_start, date_stop, the id and name of the chosen level and the metrics: by default spend (in the account currency's major units, e.g. 12.34, see account_currency), impressions, reach, frequency, clicks, ctr (%), cpc and cpm. Add "actions", "action_values", "cost_per_action_type" or "purchase_roas" to fields for conversions. Use level to split an account or campaign into its campaigns, ad sets or ads, breakdowns to split by age, gender, country, publisher_platform, platform_position or device_platform, and timeIncrement:1 for a daily series. Give datePreset (default last_30d) or since and until. Attribution follows each ad set's settings, as Ads Manager does. Large reports time out: shorten the range, use fewer breakdowns or a lower limit.
  • list-ad-accountsList the ad accounts the access token can use. Returns items with id (act_<digits>, the accountId every other tool takes), name, status, currency, timezone, amountSpent and spendCap (both in the currency's minor units, e.g. cents) and the owning business. Max 100 per page; page with `after`.
  • list-ad-setsList ad sets of one campaign (campaignId) or of a whole ad account (accountId). Returns items with id, name, campaignId, status, effectiveStatus, dailyBudget / lifetimeBudget / budgetRemaining in minor units (cents; absent when the campaign carries the budget), optimizationGoal, billingEvent, bidStrategy, bidAmount, startTime and endTime; targeting only with includeTargeting:true (it can be large). Max 100 per page; page with `after`.
  • list-adsList ads of one ad set (adSetId), one campaign (campaignId) or a whole ad account (accountId); the most specific one given wins. Returns items with id, name, adSetId, campaignId, status, effectiveStatus, updatedTime, its creative (id, name, title, body, thumbnailUrl, callToAction) and delivery issues when Meta reports any. Max 100 per page; page with `after`.
  • list-campaignsList the campaigns of one ad account. Returns items with id, name, objective, status (what was set), effectiveStatus (what is really delivering), dailyBudget / lifetimeBudget / budgetRemaining in the account currency's minor units (cents; absent when the ad sets carry the budget), bidStrategy, specialAdCategories, startTime, stopTime and updatedTime. Max 100 per page; page with `after`. Use get-insights for spend and results.
  • list-creativesList the ad creatives of one ad account. Returns items with id, name, status, title, body, objectType, thumbnailUrl, callToAction and storyId (the Page post the creative runs as). Use list-ads to see which ads use a creative. Max 100 per page; page with `after`.
  • pause-ad-objectPause a campaign, ad set or ad (sets its status to PAUSED). Pausing a campaign or ad set also stops everything under it. Reversible with activate-ad-object. Checks first that the id is of the given level. Returns { success, id, name, level, previousStatus, status }.
  • update-budgetChange the daily or lifetime budget of a campaign (when it uses a campaign budget) or of an ad set. THIS AFFECTS SPEND: a higher budget lets Meta spend more, from the moment it is saved. Amounts are integers in the account currency's minor units (cents: 5000 = 50.00; see list-ad-accounts for the currency). Give the budget type the object already uses; the tool refuses to switch types or to move a budget between campaign and ad set. Meta allows about 4 budget changes per ad set per hour. Returns { success, id, name, level, budgetType, previousBudget, newBudget }.
03

Autenticación y permisos

Qué pide.

Declarado en el manifiesto y por adelantado. La aplicación no puede alcanzar nada que no haya pedido aquí.

Secretos de instalación

META_ACCESS_TOKEN

Seguir leyendo

El manifiesto y el código de Meta Ads están en el repositorio, junto al resto de apps.

Leer el código↗Volver al catálogo→

Meta Ads · Agent Apps