Scans the search terms report for high-converting queries and adds them as exact match keywords in the matching ad group. Runs in dry-run mode by default so you can review before applying.
Search Term Harvester scans the last 30 days of search query data across all enabled campaigns and surfaces queries that have driven at least the minimum number of conversions. In dry-run mode it logs candidates so you can review; once you're confident, switch ADD_KEYWORDS to true and re-run to write the new exact-match keywords directly into the matching ad groups.
| Variable | Default |
|---|---|
ADD_KEYWORDS | false |
MIN_CONVERSIONS | 1 |
MAX_CPA | 0 |
DATE_RANGE | LAST_30_DAYS |
SIMILARITY_THRESHOLD | 0.85 |
=== Search Term Harvester === 2 search term(s) meet the conversion threshold. CANDIDATE: [winter running shoes] Conv: 3 CPA: $18.50 AdGroup: Running Footwear SKIP (similar): [trail runner] AdGroup: Trail Running Summary: 1 candidate(s) | 1 skipped Set ADD_KEYWORDS = true to apply changes.
Before adding a term the script compares it against every existing keyword in the target ad group using a Levenshtein-distance similarity ratio. Any candidate scoring at or above SIMILARITY_THRESHOLD is skipped, so near-duplicates (e.g. singular/plural or minor spelling variants) are not added. Comparison is case-insensitive and ignores match-type punctuation.