Get Google Ads campaign metrics

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Reads live performance figures for every campaign on the account over a date window, in one call.

This goes to Google directly rather than to Base44's nightly copy, so the numbers include today. Use it to fill in a table you first drew from List campaigns with include_metrics=false.

metrics is keyed by the Google Ads campaign ID, not Base44's campaign ID. Join on the google_campaign_id field from the list endpoint. A campaign that had no activity in the window does not appear as a zero row, it is simply absent.

When Google cannot be reached you get an empty metrics map with degraded set to true, under a 200. Treat that as "unknown" rather than "nothing happened".

<Note>start_date and end_date are inclusive and must both be YYYY-MM-DD. Anything else is rejected with a 400.</Note>

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

get/api/apps/{app_id}/google-ads/campaigns/metrics

Path parameters

app_idstring required

ID of the app whose Google Ads reporting you want to read.

ID of the app whose Google Ads reporting you want to read.

Query parameters

start_datestring required

First day to include, as YYYY-MM-DD. Inclusive.

First day to include, as YYYY-MM-DD. Inclusive.

end_datestring required

Last day to include, as YYYY-MM-DD. Inclusive.

Last day to include, as YYYY-MM-DD. Inclusive.

Response

Metrics for each campaign with activity in the window.

metricsobject required

One entry per campaign, keyed by the Google Ads campaign ID. This is the google_campaign_id field from List campaigns, not Base44's id, so join on that field. Campaigns with no activity in the window are left out entirely.

degradedboolean required

true when Google could not be reached and metrics is empty for that reason rather than because nothing ran. Always check this before showing zeros.

Example response

{
  "metrics": {
    "21458812345": {
      "clicks": 137,
      "conversions": 6,
      "cost_micros": 48200000,
      "ctr": 0.028,
      "impressions": 4821
    }
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.