SCALIX help

← All tools

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

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes stripped.
only_sharedbooleannoIf true, filter to explicitly_shared budgets only.
limitintegernoGAQL 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 classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDAccount not found/linked.Verify CID/authorization.no
TOKEN_REVOKEDAuthorization expired/revoked.needs_reauth.no
INVALID_ARGUMENTBad GAQL/filter.Surface Google's message; fix the query.no
PERMISSION_DENIEDLacks read access / out of bearer scope.Confirm role/scope.no
RESOURCE_EXHAUSTEDRate/quota limit (HTTP 429).Backoff 5/10/20s cap 60s; honor retryDelay.yes
INTERNAL_ERRORTransient 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.