SCALIX help

← All tools

gads_keyword_forecast

Google Ads read low risk

Part of the Keyword Research Agent.

What it does

Forecast clicks, impressions, cost, CTR, average CPC, conversions, conversion rate, and average CPA for a set of keywords over a future window (KeywordPlanIdeaService.GenerateKeywordForecastMetrics). Builds a CampaignToForecast with manual-CPC bidding (max CPC = cpc_bid_micros), the given geo/language, and a ForecastAdGroup of keywords (text + match_type). Cost/CPC/CPA returned in micros -> divide by 1e6. The forecast period defaults to tomorrow..+forecast_days. The forecast covers Google Search: v24's CampaignToForecast has no network selector, so there is no network parameter. Read-only; these are Google projections, explicitly labeled as forecasts, not guarantees. Returns {campaign_forecast_metrics:{...}, forecast_period:{start_date, end_date}, keywords_evaluated, targeting:{language_id, location_ids, match_type, cpc_bid_micros, currency_code}} — targeting holds the assumptions actually applied (defaults included); state them. Every promised metric is a key in campaign_forecast_metrics: one Google gives no forecast for is null (not zero), and a warning names it. The default bid also adds a warning naming it in the account currency.

When to use it

When the user asks what traffic, clicks, or cost a keyword list would get — forecasting performance before launching.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
keywordsarrayyesKeywords to forecast (strings). Required.
match_typestringnoBROAD (default), PHRASE, or EXACT applied to all keywords.
cpc_bid_microsintegernoMax CPC bid per keyword, in micros (default 2,000,000 = 2.00 in the ACCOUNT currency — e.g. INR 2 on an INR account, which forecasts near zero; when the default is used the result carries a warning saying so). Pass a realistic bid, e.g. from gads_keyword_ideas' top-of-page bid range. Currency->micros: multiply by 1e6.
forecast_daysintegernoForecast window length in days (default 30); period is tomorrow..+forecast_days. Must be 1 or more: 0 or less is refused (invalid_argument).
language_idstringnoLanguage constant ID (default '1000').
location_idsarraynoGeo target constant IDs (default ['2840']).
manager_idstringnoOptional MCC login-customer-id.

Safeguards

Policy

Forecasts are Google's modeled projections, not guarantees — always label them as forecasts and never present them as actual or promised results. Inputs (bid, match type) drive the output; state the assumptions.

Reminder

Label outputs as Google forecasts, not guarantees; state the bid/match-type assumptions.

Errors

Error classMeansWhat to doRetry
VALIDATION_ERRORNo keywords supplied for the forecast.Provide at least one keyword.no
RESOURCE_EXHAUSTEDKeywordPlanIdeaService rate/quota limit (~1 QPS, HTTP 429).Backoff 5/10/20s (cap 60s), serialize requests.yes
INVALID_ARGUMENTBad match_type, bid, dates, or targeting IDs.Surface the platform message; correct inputs (e.g., forecast period not in the past).no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
CUSTOMER_NOT_FOUNDCustomer ID not found/accessible.Verify the CID is authorized.no
PERMISSION_DENIEDNo access or out-of-bearer-scope read.Confirm read access; else refuse.no
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • cost/CPC/CPA are micros -> divide by 1e6; cpc_bid input is micros -> multiply currency by 1e6.
  • Forecast period must start in the future (tomorrow+) — past dates are rejected.
  • Very low bid or tiny audience -> near-zero forecast; report as-is, don't inflate.
  • Conversion forecast metrics depend on the account's conversion history; may be 0 if no tracking.
  • Forecast values are not additive to live campaign metrics — keep them clearly separate.
  • ~1 QPS -> serialize and back off; expired token -> refresh once and retry.