gads_list_keywords
Google Ads read low risk
Part of the Google Ads Manager Agent.
What it does
List positive keywords (and, with include_negatives=true, the ad groups' negative keywords) for a campaign or ad group via GAQL on keyword_view (negatives: ad_group_criterion): returns text, normalized match type, status (ENABLED/PAUSED/REMOVED), criterion ID/resource name, and the keyword's own cpc_bid_micros (micros/1e6 in account currency; null when it has none) with effective_cpc_bid_micros and effective_cpc_bid_source; a bid_note says when the bid comes from the ad group's default bid or the campaign's bidding strategy. Optional Quality Score column (ad_group_criterion.quality_info.quality_score): null when Google has not scored the keyword, with a warning to report it as 'not scored', never 0. Read-only; returns no performance metrics unless date_range is given (then impressions, clicks, cost, conversions, conversion value, CTR and avg CPC summed over the range, still one row per keyword; cost micros->currency). Figures reconcile to the Google Ads UI Keywords table within +/-1%. Returns {success, data:[...], count, warnings}.
When to use it
When the user asks what keywords exist in an ad group or campaign, with match types, status, and bids.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes stripped. Tenant/RLS derived server-side. |
ad_group_id | string | no | Filter to one ad group. Usable with campaign_id; if both omitted, lists account-wide (may truncate). |
campaign_id | string | no | Filter to one campaign's keywords. |
status_filter | string | no | ad_group_criterion status filter ENABLED|PAUSED|REMOVED (enum-normalized). Omit or pass ALL for all statuses. |
include_quality_score | boolean | no | If true, adds ad_group_criterion.quality_info.quality_score (diagnostic): null when Google has not scored the keyword (usually too little recent search traffic), and a warning says to report it as 'not scored', never 0. |
include_negatives | boolean | no | If true, also lists the ad groups' negative keywords: a second read from ad_group_criterion, rows with negative: true and no bid, Quality Score or metrics. Campaign-level negatives are in gads_list_campaign_criteria. |
date_range | string | no | Adds performance metrics (impressions, clicks, cost, conversions, conversion value, CTR, avg CPC) summed over this range: a GAQL macro (LAST_7_DAYS/LAST_14_DAYS/LAST_30_DAYS/THIS_MONTH/LAST_MONTH), LAST_N_DAYS, or YYYY-MM-DD,YYYY-MM-DD; ALL_TIME for all-time metrics. Omit for the list without metrics. |
limit | integer | no | Max rows (GAQL LIMIT) per read, default 1,000; a warning says when the cap is hit. With include_negatives the negatives are a second read with the same cap. Large accounts use SearchStream. |
Safeguards
Policy
Read-only listing carries no write-policy risk; do not present Quality Score as a guaranteed/lever metric (QS is diagnostic, not a promise).
Reminder
Do not retain keyword lists or any associated account data beyond the current request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Account {customer_id} not found or not linked. | Verify the 10-digit CID and authorization. | no |
TOKEN_REVOKED | Authorization expired/revoked. | needs_reauth — reconnect the account. | no |
INVALID_ARGUMENT | GAQL or filter value rejected (e.g. bad status enum, malformed field). | Surface Google's message; correct the filter, don't guess. | no |
MANAGER_ACCOUNT_METRICS_UNSUPPORTED | Metrics requested on a manager (MCC) account return no rows. | Query a child serving account for metrics. | no |
PERMISSION_DENIED | User lacks read access or the request is out of bearer scope. | Confirm account role / connection scope. | no |
RESOURCE_EXHAUSTED | Rate/quota limit (HTTP 429). | Backoff 5/10/20s cap 60s; honor retryDelay. | yes |
INTERNAL_ERROR | Transient 5xx from Google Ads. | Retry once after backoff. | yes |
Edge cases
- No keywords match -> success with count:0 (not an error) and a note naming the filters applied.
- Results capped by limit (default 1,000) -> a warning offers a higher limit or this tool's filters (ad_group_id/campaign_id/status_filter/date_range).
- With date_range, metrics are summed over the range: still one row per keyword, zero-traffic keywords included (a date filter alone does not segment the report).
- Quality Score not scored by Google -> quality_score null and a warning to report 'not scored', never 0.
- cost/cpc fields are micros -> always /1e6 with currency label before display.
- Expired token -> refresh once and retry.