Adspirer icon

Adspirer

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

Actions119

Analyze Meta Ad Performance

AI-generated

Summary

Analyze ad performance metrics for Meta Ads campaigns, optionally filtered by campaign and date range, returning aggregate or raw data for reporting or further processing.

Inputs

  • Ad Account Id (required) — The Meta Ad Account ID to analyze.
  • Campaign Id — Optional filter to analyze a specific campaign by its ID.
  • Date Range — Predefined date range presets such as 'last_7_days', 'last_14_days', 'last_30_days', 'last_60_days', or 'last_90_days'.
  • Start Date — Custom start date for analysis in YYYY-MM-DD format.
  • End Date — Custom end date for analysis in YYYY-MM-DD format.
  • Include Video Metrics — Boolean flag to include video completion metrics (25%, 50%, 75%, 100% watched) in the results; defaults to true.
  • Limit — Maximum number of ads to return; defaults to 100, with a maximum of 200.
  • Lookback Days — Number of days to analyze (7, 14, 30, 60, or 90); optional alternative to date range presets.
  • Offset — Number of ads to skip for pagination, defaulting to 0.
  • Raw Data — If true, returns only raw metrics as a JSON code block (including spend, clicks, impressions, conversions, CPA, CPC, CTR, CVR, ROAS by campaign/ad/date); defaults to false.

Output shape

a JSON object containing aggregated ad performance metrics or raw metric data depending on the 'Raw Data' flag

If 'Raw Data' is set to true, the output is limited strictly to raw metrics in JSON format; otherwise, summary-level analytics with video metrics (if enabled) and pagination controls apply.

Examples

Example 1: Analyze all Meta Ads campaigns in a specific account over the last 30 days including video metrics

Set 'Platform' to Meta Ads, fill 'Ad Account Id', set 'Lookback Days' to 30, and keep 'Include Video Metrics' enabled.

Example 2: Retrieve raw data for a specific Meta Ads campaign with a custom date range

Set 'Platform' to Meta Ads, provide 'Ad Account Id' and 'Campaign Id', set 'Start Date' and 'End Date', and enable 'Raw Data'.

Links

Discussion