Adspirer icon

Adspirer

Manage ad campaigns across Google, Meta, LinkedIn & TikTok Ads via the Adspirer REST API

Actions119

Optimize Meta Placements

AI-generated

Summary

Optimize Meta Ads placements by analyzing campaign data within a specified date range to recommend an optimal mix of placements based on a campaign objective such as conversions, traffic, or awareness.

Inputs

  • Platform (required) — The advertising platform to optimize, must be 'Meta Ads' for this operation.
  • Ad Account Id (required) — The Meta Ad Account ID for which to perform the optimization.
  • Date Range — A preset date range for data analysis (e.g., 'last_7_days', 'last_30_days').
  • Start Date — The start date (YYYY-MM-DD) of the custom date range for analysis.
  • End Date — The end date (YYYY-MM-DD) of the custom date range for analysis.
  • Lookback Days — Number of days to analyze (7, 14, 30, 60, or 90), which can be used instead of or along with start/end dates.
  • Objective — Campaign optimization objective: 'conversions' (default), 'traffic', or 'awareness'.
  • Raw Data — Boolean flag to return only raw campaign metrics in JSON format rather than optimization recommendations.
  • Target Roas — Optional numeric target ROAS override (e.g., 3.0 for 3.0x ROAS).

Output shape

a JSON object containing either optimized Meta Ads placements recommendations or raw campaign metrics depending on the Raw Data parameter

If Raw Data is true, the output includes raw spend, clicks, impressions, conversions, CPA, CPC, CTR, CVR, ROAS by campaign, ad, and date as a JSON code block; otherwise, it returns a campaign objective-based optimal placements mix recommendation. Date filtering supports both presets and custom start/end dates or lookback days, which are optional and used as provided.

Examples

Example 1: Optimize Meta Ads placements for the last 30 days targeting conversions.

Platform set to Meta Ads, Ad Account Id provided, Lookback Days set to 30, Objective set to conversions, Raw Data false or omitted.

Example 2: Retrieve raw campaign metrics for a specific date range on Meta Ads.

Platform set to Meta Ads, Ad Account Id provided, Start Date and End Date set to desired range, Raw Data set to true.

Links

Discussion