gads_get_ad_schedule_performance
Google Ads read low risk
Part of the Ad Schedule Agent.
What it does
Report performance by DAY-OF-WEEK (segments.day_of_week: MONDAY..SUNDAY) and HOUR-OF-DAY (segments.hour: 0-23) for a campaign over a date range — the day/hour grid that reveals when a campaign converts (for ad-schedule/bid-by-hour decisions). day_of_week x hour multiply rows (each is a per-slice figure, not a total). Money micros->currency (/1e6); hours are in the ACCOUNT timezone; reconciles to the UI within +/-1%. Returns {success, data:[{campaign, segments{day_of_week, hour}, metrics}], count, warnings}.
When to use it
Hour/day performance analysis. Use to find the best/worst days and hours for a campaign before creating an ad schedule or hour-of-day bid adjustments.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit Google Ads customer ID (CID), dashes stripped. Server-derived tenant context + RLS. |
campaign_id | string | no | Restrict to one campaign (recommended to bound rows). |
date_range | string | yes | GAQL macro (LAST_7_DAYS/LAST_30_DAYS/THIS_MONTH/LAST_MONTH) or explicit YYYY-MM-DD,YYYY-MM-DD. DEFAULT: date_range defaults to LAST_30_DAYS when omitted (a warning says so); pass date_range=ALL_TIME to query without a date filter. |
limit | integer | no | GAQL LIMIT cap; large pulls use SearchStream. |
Safeguards
Policy
Never fabricate or approximate a metric; if a figure can't be reconciled to the Google Ads UI within +/-1%, say so. Money is micros/1e6 (label the account currency); rates are ratios.
Reminder
Treat account performance data as sensitive; do not retain beyond this request. PRESENTATION: never list raw day×hour rows — present a day×hour summary naming the top and bottom slices by clicks/conversions and where conversions occurred, then a schedule recommendation.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Account {customer_id} not found or not linked. | Verify the CID and authorization. | no |
needs_reauth | Authorization expired or revoked. | Reconnect Google Ads in the Scalix dashboard. | no |
INVALID_ARGUMENT | Malformed date_range or filter. | Fix the argument and retry. | no |
MANAGER_ACCOUNT_METRICS_UNSUPPORTED | Manager (MCC) accounts return no metrics. | Query a child account. | no |
PERMISSION_DENIED | The authenticated user lacks access to this account. | Check account access. | no |
RESOURCE_EXHAUSTED | Rate/quota limit hit. | Back off and retry. | yes |
Edge cases
- No data -> count:0 with a note naming the date range and the filters applied (no delivery in that window, or nothing matched).
- day_of_week x hour multiplies rows (up to 168 slices/campaign).
- Hours are account-timezone.