Google Ads: keyword search volume and bids
get_keyword_metricsGets Google's search volume, competition and bids for keywords as written.
The keywords can be any words, and the figures describe searches across
Google, not this account's own traffic.
For the keywords an account runs or a list the user names: up to 1,000
per call, or 200 with include_monthly_trend; a longer list is refused,
not cut. Google counts near-identical keywords (plurals, spellings)
under one row: deduped_away names each with the row it is counted under,
and not_returned names those with no figures. Figures are Google's
estimates; avg_monthly_searches is null where too few to report. A new
account, or one that has never spent, can get ranges or none. It reads
only.
Each call is one request to Google. Google accepts about one keyword
planning request per second per account, so a request within a second
of the last one for the same account waits for the rest of that second.
Args:
customer_id: The Google Ads customer ID (numbers only, no hyphens).
keywords: The keywords, as written, 1 to 1,000.
geo_target_ids: Location ids (geo target constants), at most 10.
Default: every location.
language_id: Language id (language constant). Default 1000, English.
network: GOOGLE_SEARCH (default) or GOOGLE_SEARCH_AND_PARTNERS.
include_average_cpc: Add the average cost per click. Default true.
start_year_month: First month, YYYY-MM, with end_year_month.
Default: the last 12 months.
end_year_month: Last month, YYYY-MM.
include_monthly_trend: Add each keyword's searches month by month.
Returns:
metrics (text, avg_monthly_searches, competition, competition_index,
low_top_of_page_bid, high_top_of_page_bid, average_cpc,
close_variants), requested, returned, deduped_away, not_returned,
query and notes.Tools revision: d80f65c0.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"keywords": "<keywords>"
},
"name": "get_keyword_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | GOOGLE_SEARCH | |
| keywords | Yes | ||
| customer_id | Yes | ||
| language_id | No | ||
| end_year_month | No | ||
| geo_target_ids | No | ||
| start_year_month | No | ||
| include_average_cpc | No | ||
| include_monthly_trend | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |