Guide
How to get daily Google Trends data for more than 9 months
Ask Google Trends for 6 months of data and you get one value per day. Ask for 12 months and you get one per week. Ask for everything since 2004 and you get one per month. Google picks the resolution from the length of the range, and daily values stop at about 9 months.
The method here works with any data source. If you’d rather not run it yourself, our Google Trends Scraper & API on the Apify Store does the stitching for you.
That’s a problem if you want to line search interest up with daily sales, prices or events over several years. The standard fix is stitching: fetch overlapping windows short enough to come back daily, then put them on one scale using the days they share. This guide explains the method and gives Python code that works with any data source.
Why you can’t just glue windows together
Every Google Trends request is scaled on its own: 100 is the busiest point in that request, and everything else is relative to it. If you fetch January to August and then July to February, both windows peak at 100, but they’re two different 100s. Joining them end to end gives you jumps that don’t exist.
The days that both windows cover are the key. On those days, the real search interest is the same in both windows, so the ratio between the two windows’ values tells you how to convert one scale into the other.
The method
- Split the range into windows of 250 days that overlap by 30 days.
- Fetch each window. Each one comes back daily, on its own 0–100 scale.
- For the shared days of two neighbouring windows, compute previous ÷ next for each day, and take the median. That’s the conversion factor.
- Multiply the next window by the factor and append its days after the overlap.
- When every window is joined, rescale the whole series so its highest day is 100.
Two details matter:
- Use the median, not the mean. Google’s values are whole numbers, so low values are coarse: a day at 1 in one window and 2 in the other is a ratio of 0.5 that means nothing. The median ignores those outliers. Skip days where either window shows 0.
- Overlap enough days. With fewer shared days the factor gets noisy; with more, you need more requests. Thirty days works well. Make sure at least 7 of them have usable values, or the keyword is too rare to stitch reliably.
The code
from datetime import date, timedelta
import pandas as pd
def plan_windows(start, end, size=250, overlap=30):
"""Splits start..end into windows of `size` days that share `overlap` days with the previous one."""
windows = []
window_start = start
while True:
window_end = min(window_start + timedelta(days=size - 1), end)
windows.append((window_start, window_end))
if window_end >= end:
return windows
window_start = window_end - timedelta(days=overlap - 1)
def stitch(windows, min_shared_days=7):
"""Joins daily windows (pandas Series indexed by date, oldest first) into one series that peaks at 100."""
series = windows[0].astype(float)
for window in windows[1:]:
window = window.astype(float)
shared = series.index.intersection(window.index)
previous, current = series[shared], window[shared]
usable = (previous > 0) & (current > 0)
if usable.sum() < min_shared_days:
raise ValueError(f"Only {usable.sum()} usable shared days before {window.index[0]:%Y-%m-%d}")
factor = (previous[usable] / current[usable]).median()
series = pd.concat([series, window[window.index > series.index.max()] * factor])
return (series / series.max() * 100).round(2)
Five years comes to 9 windows:
>>> len(plan_windows(date(2021, 11, 12), date(2026, 11, 12)))
9
Fetching the windows
Any source that returns daily values per window works. With pytrends, if it still works from your network:
import time
from pytrends.request import TrendReq
from pytrends.exceptions import TooManyRequestsError
pytrends = TrendReq(hl="en-US", tz=0)
def fetch_window(term, geo, start, end, attempts=5):
for attempt in range(attempts):
try:
pytrends.build_payload([term], timeframe=f"{start:%Y-%m-%d} {end:%Y-%m-%d}", geo=geo)
return pytrends.interest_over_time()[term]
except TooManyRequestsError:
time.sleep(60 * (attempt + 1)) # Google rate-limits Trends per IP address
raise RuntimeError("Still rate-limited; try again later")
windows = [fetch_window("air fryer", "US", start, end)
for start, end in plan_windows(date(2021, 11, 12), date(2026, 11, 12))]
daily = stitch(windows)
Five years is 9 requests, and the full 2004–present range is about 38, so expect 429 errors and long pauses on the way. pytrends has been archived since April 2025, so it may break whenever Google changes something.
If you’d rather skip that part, our Google Trends Scraper & API does the same stitching for you, with the same 250-day windows and 30 shared days. Set dailyData to true and any range, back to 2004, comes back as one daily series. It identifies itself as an Apify crawler (ApifyBot) and retries a request Google turns away from a different IP address, up to 8 times. Five years of daily data for one keyword costs about $0.02 on Apify’s free plan. Disclosure: we built it.
Things to keep in mind
- Stitched values are estimates. Each join adds a little error, and very low values (0–5) are noisy.
- Google samples its data. The same request can return slightly different numbers on different days. For research, fetch twice and average.
- Check against Google’s own weekly series. Resample the stitched series to weeks and plot it next to Google’s weekly data for the same range. The shapes should match closely; a step at a window boundary means that overlap had too little data.
- Several terms on one scale: fetch the terms together in each window and use the sum across terms on the shared days to compute the factor. The rest of the method is the same.
Need data from another public source, or a different setup? Get in touch.