AdlyseAdlyseMCP Docs
⌘K
Overview
adlyse-insights
list_ad_accountsget_dashboard_snapshotget_impact_analysislist_guidelinesget_guideline
adlyse-reports
list_report_templateslist_reportsget_reportgenerate_reportlist_report_targets
adlyse-ads
list_campaignsget_performancelist_adsget_ad_performancelist_change_eventsupdate_campaign_statusupdate_campaign_budget
adlyse-workflows
list_workflowsget_workflowrun_workflowget_run_status
  1. Overview/
  2. adlyse-ads

get_ad_performance

Aggregated metrics for a single ad over a date range. Use this for creative-fatigue analysis or sibling-ad comparisons within a campaign.

Parameters#

NameTypeRequiredDefaultDescription
ad_account_idstringyesAd account id
ad_idstringyesPlatform ad id (from list_ads)
period_startstringyesYYYY-MM-DD, inclusive
period_endstringyesYYYY-MM-DD, inclusive; must be ≥ period_start
metricsstring[]?no[defaults]Metric keys to sum. Defaults same as get_performance

Returns#

json
{
  "ad_account_id": "ad_acct_abc",
  "ad_id": "987654",
  "period_start": "2026-04-15",
  "period_end": "2026-04-21",
  "metrics": ["cost", "impressions", "clicks", "conversions", "conversion_value"],
  "totals": {
    "cost": 40.00,
    "impressions": 300,
    "clicks": 9,
    "conversions": 1.5,
    "conversion_value": 150.00
  },
  "row_count": 3,
  "source": "adlyse.ads_ad_performance@v1"
}
FieldDescription
totalsSum per metric across the window (always present; zeros when no data)
row_countNumber of daily rows aggregated — use as a data-coverage sanity check

Errors#

error_typeWhen
auth_errorMissing / invalid API key
not_foundAd account doesn’t belong to your org
validation_errorBad date, unknown metric, period_end < period_start
schema_errorAd Metrics table is missing expected columns (shouldn’t happen in normal setups)

Empty-rows semantics#

If the ad exists but has no rows in the window (for example, it was paused before the window started), the response returns row_count: 0 and all-zero totals. This is not an error — check row_count before interpreting zero metrics as a performance crisis.

Example#

Request:

json
{
  "ad_account_id": "ad_acct_abc",
  "ad_id": "987654",
  "period_start": "2026-04-15",
  "period_end": "2026-04-21",
  "metrics": ["cost", "conversions", "ctr"]
}

Response:

json
{
  "ad_account_id": "ad_acct_abc",
  "ad_id": "987654",
  "period_start": "2026-04-15",
  "period_end": "2026-04-21",
  "metrics": ["cost", "conversions", "ctr"],
  "totals": { "cost": 40.00, "conversions": 1.5, "ctr": 21.0 },
  "row_count": 3,
  "source": "adlyse.ads_ad_performance@v1"
}

See also#

  • list_ads — discover ad ids
  • get_performance — campaign-level or account-level aggregation
←Previous
list_ads
Next→
list_change_events