Methodology and evidentiary limits
What the data measures
Google Trends provides sampled, normalised search interest on a 0 to 100 scale. Low-volume queries can appear as zero. Equal index values across regions need not represent equal search volumes. See Google’s data explanation.
SOS transforms a single SerpAPI comparison response. It does not recover search counts, market share or a population survey estimate. SerpAPI documents the comparison request.
Share calculation
For query at observation , let be its returned interest value. The library calculates
The denominator contains the selected queries. Complete query coverage and a positive total are required at every observed date. A successful 100% sum check establishes arithmetic consistency only. It does not establish measurement validity or identification.
The parser gives extracted_value precedence. Without it, the string <1 is
represented by 0.5, an explicit approximation. If the provider supplies both <1
and an extracted zero, zero takes precedence. Missing or malformed values are
rejected. Review sensitivity to small values outside this pipeline.
Metric definitions
| Metric | Calculation and interpretation |
|---|---|
avg_share | Unweighted mean of observed shares; each returned interval receives equal weight |
Period volatility | Sample standard deviation of shares, in percentage points; undefined for one observation |
min_share, max_share | Observed minimum and maximum |
total_interest, avg_interest | Sum and mean of index values; not counts of searches |
trend_slope | Least-squares slope of share against observation number, after sorting by date |
trend_direction | Rising if slope exceeds 0.1; falling if below -0.1; stable otherwise, with configurable boundaries |
momentum | Percentage change in share over the configured number of observations; unavailable lookbacks and zero baselines produce missing values |
Rolling volatility | Trailing sample standard deviation over the configured window; unavailable initial deviation is represented by zero |
value_ma | Trailing mean of interest with available observations; added by the pipeline only when the window exceeds 1 |
z_score | Deviation from the query’s whole-period mean, divided by its sample standard deviation |
is_anomaly | Absolute z-score strictly greater than 2.5; constant and one-observation series are unflagged |
A trend’s units are percentage points per observation, not per day or month.
For fewer than two observations the slope is zero. The label stable therefore
does not prove stability. Trend fitting and z-scores use the whole observed period;
they are retrospective, not online detection or forecast validation. No p-values,
confidence intervals, serial-correlation correction or seasonal adjustment are
computed. Aggregate CSV metrics are rounded to two decimal places.
Concentration
The retained market_concentration Python key contains an HHI-style summary of
selected-query shares at the final date:
The implementation retains labels low for
, moderate for
, and high otherwise. These are legacy descriptive bins,
not a competition-policy assessment. With at most five queries, the theoretical
minimum is
. The low bin is unreachable for a valid supported
comparison. A high label cannot establish concentrated market power.
Minimum evidentiary standard
| Claim class | Supported evidence |
|---|---|
| Data description | Selected-query shares and descriptive summaries, conditional on query construction and retrieval |
| Conditional model result | Descriptive least-squares trend only; no inferential trend model |
| Predictive evidence | Not established; there is no held-out forecasting evaluation |
| Causal evidence | Not established; no intervention or counterfactual estimator |
| Decision recommendation | Evidence-check suggestions only; allocation decisions require external evidence |
Do not attach a universal ±5% error margin to these outputs. The library has no retrieval-level uncertainty estimator. A paper’s empirical variability estimate cannot be treated as a confidence interval for every query or dataset.
For a business recommendation, document the observation, credible alternative explanations, decision-relevant additional evidence and the conditions under which the recommendation would change. Review AI narration under the same standard.