gads_list_budgets
Google Ads read low risk
Part of the Budget Agent.
What it does
List campaign budgets via GAQL on campaign_budget: returns name, ID/resource name, daily amount (micros/1e6 in account currency), delivery method, explicitly_shared flag, and reference_count (how many campaigns use the budget). Read-only. Optionally joins campaign names for shared budgets. Money fields converted from micros; figures reconcile to the Google Ads UI Shared Library > Budgets within +/-1%. Returns {success, data:[...], count, warnings}.
When to use it
When the user asks what budgets exist, their amounts and delivery method, or which budgets are shared across campaigns.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes stripped. |
only_shared | boolean | no | If true, filter to explicitly_shared budgets only. |
limit | integer | no | GAQL LIMIT cap. |
Safeguards
Policy
Read-only; no write-policy risk. Present amounts in the account currency, never as raw micros.
Reminder
Do not retain budget/account data beyond the current request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Account not found/linked. | Verify CID/authorization. | no |
TOKEN_REVOKED | Authorization expired/revoked. | needs_reauth. | no |
INVALID_ARGUMENT | Bad GAQL/filter. | Surface Google's message; fix the query. | no |
PERMISSION_DENIED | Lacks read access / out of bearer scope. | Confirm role/scope. | no |
RESOURCE_EXHAUSTED | Rate/quota limit (HTTP 429). | Backoff 5/10/20s cap 60s; honor retryDelay. | yes |
INTERNAL_ERROR | Transient 5xx. | Retry once after backoff. | yes |
Edge cases
- No budgets -> success count:0.
- reference_count>1 -> shared budget; label clearly.
- Removed budgets excluded by default unless explicitly queried.
- amount_micros -> /1e6 with currency label.
- Truncation by limit -> warn to narrow.
- Expired token -> refresh once and retry.