The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Use Google Ads monthly search-volume figures as estimates, not exact counts, and treat an unusual peak as a review flag—not automatic proof of bad data. A practical Python workflow preserves the original values, aligns the export’s targeting context, decomposes a sufficiently long monthly series with robust STL, then reviews flagged months before making any correction.
What Google keyword volume measures
This guide concerns historical search-volume metrics from Google Ads Keyword Planner, including API exports. It does not establish that third-party SEO tools use identical data or definitions. Google’s API describes monthly_search_volumes as approximate monthly values for up to four years; avg_monthly_searches is an average for the past 12 months or the requested year-month range. Google says it updates metrics such as search volume monthly using the preceding month’s search data. Google Ads API: Generate historical metrics.
As an Amazon Associate I earn from qualifying purchases.
The number is tied to its settings. Google Ads Help defines average monthly searches using the selected date range, location, Search Network, and keyword close variants. A US series and a UK series—or exports with different network settings—are not interchangeable measurements. Preserve these details before joining or comparing data. Google Ads Help: About Keyword Planner forecasts.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Historical volume is also distinct from a forecast. Google says forecasts account for bid, budget, seasonality, and historical ad quality; historical search-volume statistics do not. Do not use forecast inputs to explain a peak in historical metrics. The API may deduplicate close variants and return them in close_variants, so retain the requested term, returned text, and any listed variants.
#1 Best Overall
Prepare the data before looking for spikes
Keep an untouched copy of each export and attach its context to every observation. At minimum, preserve the source, extraction date, keyword and returned/normalized keyword, month, location, language, Search Network, and requested date range. Keep close variants and any currency or bid fields when they are included. Google’s API documentation describes how request targeting and close variants relate to the results; the official Python sample shows historical-metric requests with language and geographic targeting. Google Ads API Python sample: Generate Historical Metrics.
- Align keyword identity, geography, language, network, and time range before concatenating series.
- Normalize month labels to a monthly date index, sort chronologically, and check for duplicate keyword-month-context keys.
- Inspect missing and non-numeric values. Treat a missing month as missing, not as zero: the reviewed Google documentation does not say that an omitted export row means no searches.
- Plot the series. A single-month jump that quickly reverses differs from a higher level that persists.
Google recommends caching or storing keyword-planning results. Because historical metrics refresh monthly and responses may remain consistent for hours or days, keep consistent snapshots and extraction metadata so a refresh can be distinguished from a targeting change. Google Ads API: Keyword planning.
Rank #2
Use robust STL to separate seasonality from unusual residuals
For a regularly spaced monthly history long enough to estimate an annual cycle, STL can separate a series into trend, seasonal, and residual components. Statsmodels’ robust option reweights observations so the fit can tolerate some large errors. For monthly data, set the period to 12; pass it explicitly when the index does not carry frequency metadata. See the statsmodels STL documentation and examples.
Recommended Free Tools
import pandas as pd
from statsmodels.tsa.seasonal import STL
# df columns: keyword, month, searches, geo, language, network
series = (
df.loc[df["keyword"].eq("example keyword")]
.sort_values("month")
.set_index("month")["searches"]
.astype(float)
)
series.index = pd.to_datetime(series.index)
series = series.asfreq("MS") # inspect gaps; do not assume a gap is zero
# Resolve or deliberately handle gaps before fitting.
if series.isna().any():
raise ValueError("Resolve or explicitly handle missing months before STL")
fit = STL(series, period=12, robust=True).fit()
components = pd.DataFrame({
"observed": series,
"trend": fit.trend,
"seasonal": fit.seasonal,
"resid": fit.resid,
"robust_weight": fit.weights,
})
This is a workflow illustration; adapt field names to the export and validate the data before using it. Do not interpolate across a suspected spike simply to make the model run. Statsmodels examples show forward-filling in one sample dataset, but that is not a universal rule for keyword volumes. Choose gap handling based on why observations are missing, document it, and consider excluding short or incomplete histories from STL. statsmodels STL documentation and examples.
Flag observations for review, not automatic deletion
A transparent screening heuristic is to flag residuals that are unusually large relative to the residual distribution, using a robust scale such as the median absolute deviation (MAD). This is a proposed analyst rule, not a Google or statsmodels threshold. Neither source prescribes a universal cutoff or replacement value. Choose and document a threshold for your dataset, and check how the flagged months change under other reasonable thresholds.
For each flagged month, compare it with the original export and the available demand context. Check whether the peak recurs in the same season in other years, whether related keywords rise at the same time, whether the increase persists, and whether collection or targeting settings changed. A repeatable seasonal peak or persistent step-up is reason to retain the movement as potential real demand. A lone, uncorroborated point deserves investigation, not an assumption that it is erroneous.
If source-level checks confirm an error, retain both versions and record the reason and provenance. For example, keep searches_raw, searches_clean, is_flagged, and correction_reason alongside the relevant extraction metadata. If you cannot verify the value, leave it unchanged and label it as a potential anomaly.
Choose a screening method that fits the question
| Method | Trend and seasonality | History and sensitivity | Best use |
|---|---|---|---|
| Visual review and context checks | Can account for both when interpreted against the series and its context. | Does not require a formal model; less scalable. | Essential review for any method’s flags and corrections. |
| Robust STL residual review | Models trend and recurring seasonality separately. | Needs enough regularly spaced history and deliberate gap handling; a flag is not proof of error. | Monthly series with enough history to estimate an annual cycle. |
| Global z-score or fixed cap | Does not inherently account for seasonal peaks or trend changes. | Easy to implement, but may mislabel genuine peaks or new levels. | Not a good default for cleaning seasonal keyword data. |
| Rolling median/MAD screening | Can highlight local deviations, but does not automatically understand annual seasonality. | Window and threshold are judgment calls and require validation. | Lightweight local anomaly flags when the window is appropriate to the series. |
Whichever screen you use, describe the output as a reviewed or adjusted analytical series, not “the true search volume.” Google’s figures are approximate and context-sensitive, and an anomaly detector only identifies observations that differ from its model.
Best Value
Read API data reproducibly
If you retrieve metrics directly, build on Google’s current Python historical-metrics sample and verify which API version your client uses. Store targeting and extraction details with each snapshot; changing locale or network settings can produce a different measurement context even when the keyword text is unchanged.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




