Forecast Google Ads traffic for keywords through Frevana.
Purpose
This skill is for forecasting Google Ads traffic using keywords, a bid, and a match type.
Inputs:
keywordsbidmatch- optional location, language, date range, date interval, sorting, and tag fields
Output:
- validated response JSON with Google Ads ad traffic forecast data
This skill validates that the response is JSON and returns it unchanged. Do not rewrite or reshape the returned data unless the user explicitly asks for a transformation.
What This Skill Needs
- user-provided
keywords - user-provided
bid - user-provided
match - optional location, language, date, sorting, and tag values
FREVANA_TOKENin the environment variables, or an explicit--tokenoverride for the current runcurlbashpython3
Execution Order
Use this flow so the request stays simple and reliable:
- Confirm the user has provided one or more keywords.
- Confirm the user has provided
bid. - Confirm the user has provided
matchasexact,broad, orphrase. - Prefer the script over ad hoc
curlcommands. - Let the script read
FREVANA_TOKENfirst. - In interactive shell usage, if
FREVANA_TOKENis missing, the script may prompt for it. - In non-interactive or agent workflows, fail fast if the token is missing and tell the user to set
FREVANA_TOKENor pass--tokenexplicitly. - Return the validated response JSON, or summarize projected clicks, average CPC, and cost if the user does not need the full payload.
- The script saves the JSON response to
./out/by default.
Commands
Basic forecast
bash <skill-path>/scripts/search_google_ads_ad_traffic_by_keywords.sh \
--keywords "seo marketing" \
--bid 999 \
--match exact
With location and language
bash <skill-path>/scripts/search_google_ads_ad_traffic_by_keywords.sh \
--keywords "wireless earbuds,gaming headset" \
--bid 500 \
--match phrase \
--location-code 2840 \
--language-code en
With forecast interval
bash <skill-path>/scripts/search_google_ads_ad_traffic_by_keywords.sh \
--keywords "seo marketing" \
--bid 999 \
--match exact \
--date-interval next_month
Save response JSON to a specific file
bash <skill-path>/scripts/search_google_ads_ad_traffic_by_keywords.sh \
--keywords "seo marketing" \
--bid 999 \
--match exact \
--output ./out/google-ads-ad-traffic-result.json
Fixed Request Shape
The script sends this payload shape:
{
"keywords": [
"seo marketing"
],
"bid": 999,
"match": "exact",
"location_code": 2840,
"language_code": "en",
"date_interval": "next_month"
}
Default behavior when no dates are provided:
- DataForSEO applies
next_month
Do not pass unsupported fields. Do not pass API keys, output paths, or request metadata in the payload; Frevana handles server-side details.
Response Shape
The API returns JSON. This skill validates the response as JSON and returns it unchanged.
Output
- Success: the script validates that the response body is JSON and prints it to stdout
- Default file path:
./out/google-ads-ad-traffic-by-keywords-<UTC timestamp>-<pid>.json - With
--output: the same JSON is written to the specified file path instead - Failure: the script prints the response body or parsing error and exits non-zero
Notes
- Require
--keywords - Require
--bid - Require
--match --keywordsmust be a comma-separated list. Trim whitespace and preserve the user-supplied phrases--bidmust be a positive integer--matchacceptsexact,broad, orphrase--date-intervalacceptsnext_week,next_month, ornext_quarter--sort-byacceptsrelevance,impressions,ctr,average_cpc,cost, orclicks- Use only one of
--location-name,--location-code, or--location-coordinate - Use only one of
--language-nameor--language-code --date-intervalcannot be combined with--date-fromor--date-to- If either
--date-fromor--date-tois used, both must be provided - If
curlis missing, stop and tell the user to installcurl - If
python3is missing, stop and tell the user to installpython3 - Do not echo the Bearer token back to the user
- Summarize projected clicks, average CPC, cost, and any null or missing metrics when the user is doing ad planning
Example Prompts
Chinese
- "Predict clicks and CPC for seo marketing in Google Ads, bid 999, exact match"
- "Call the Google Ads ad traffic by keywords API, and save the raw JSON to a file"
- "Use phrase match to predict ad traffic for wireless earbuds and gaming headset"
English
- "Forecast Google Ads clicks and CPC for seo marketing with bid 999 and exact match"
- "Get Google Ads ad traffic forecasts and save the raw JSON to a file"
- "Forecast ad traffic for wireless earbuds and gaming headset using phrase match"