SCALIX help

← All tools

gads_get_search_terms_report

Google Ads read low risk

Part of the Search Terms Agent.

What it does

Show the actual SEARCH QUERIES that triggered a campaign's or ad group's ads (search_term_view) over a date range, with the match type they matched on (segments.search_term_match_type: BROAD/PHRASE/EXACT/NEAR_EXACT/NEAR_PHRASE) and performance (impressions, clicks, CTR, avg CPC, cost, conversions, conv value). Surfaces irrelevant/wasteful queries to block as negatives. Money micros->currency (/1e6); reconciles to the Google Ads UI within +/-1%. Returns {success, data:[{search_term_view{search_term, status}, segments{search_term_match_type}, ad_group, campaign, metrics}], count, warnings}.

When to use it

Use to review which real queries are spending; then feed the wasteful ones to gads_add_negatives_from_search_terms (with approval).

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit Google Ads customer ID (CID), dashes stripped. Server-derived tenant context + RLS.
campaign_idstringnoRestrict to one campaign.
ad_group_idstringnoRestrict to one ad group.
date_rangestringyesGAQL 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.
limitintegernoGAQL 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

Search queries may contain user PII — never log or retain the raw query text beyond fulfilling this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDAccount {customer_id} not found or not linked.Verify the CID and authorization.no
needs_reauthAuthorization expired or revoked.Reconnect Google Ads in the Scalix dashboard.no
INVALID_ARGUMENTMalformed date_range or filter.Fix the argument and retry.no
MANAGER_ACCOUNT_METRICS_UNSUPPORTEDManager (MCC) accounts return no metrics.Query a child account.no
PERMISSION_DENIEDThe authenticated user lacks access to this account.Check account access.no
RESOURCE_EXHAUSTEDRate/quota limit hit.Back off and retry.yes

Edge cases

  • No data in range -> success count:0 with a note naming the date range and the filters applied.
  • Very-low-volume queries may be withheld by Google.
  • Manager (MCC) account -> metrics unsupported; query a child.
  • count:0 with success:true is EXPECTED on accounts with no recent search traffic, and Google redacts low-volume terms for privacy; not a bug.