Get Google Ads campaign metrics
Changed on<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>
Request
- Base URLhttps://app.base44.com
- URLhttps://app.base44.com/api/apps/{app_id}/google-ads/campaigns/metrics
- AuthHTTP bearer
Path parameters
ID of the app whose Google Ads reporting you want to read.
Query parameters
First 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.
Example response
{
"metrics": {
"21458812345": {
"clicks": 137,
"conversions": 6,
"cost_micros": 48200000,
"ctr": 0.028,
"impressions": 4821
}
}
}Changes
- info
the security scope
read_onlywas added to the endpoint's security schemePersonalAccessTokenAuth - info
the security scope
full_accesswas removed from the endpoint's security schemePersonalAccessTokenAuth
- info
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info