SerpBase
Back to Blog

Google Trends API: Get Interest Over Time as JSON

Google offers no public Trends API. One POST returns the weekly interest-over-time series for a keyword and region as JSON. Tested request, fields and pitfalls.

November 24, 2026
By SerpBase Team2 min read

Short answer: Google has no public Trends API for general use, but you can get the same interest-over-time numbers as JSON by POSTing a keyword to /google/trends. One request returns the weekly series you see on the Trends chart.

The request

curl -X POST 'https://api.serpbase.dev/google/trends' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"q":"coffee","geo":"US","date":"today 12-m"}'
  • q — the search term.
  • geo — the region, written the way Trends writes it (US, GB, JP).
  • date — the time range in Trends' own notation, such as today 12-m (past 12 months), today 3-m or today 5-y.

What comes back

We ran this on 24 November 2026: 53 weekly points for the past 12 months, in 3.0 seconds.

{
  "status": 0,
  "trends": {
    "query": "coffee",
    "geo": "US",
    "time_range": "today 12-m",
    "series": [
      {
        "term": "coffee",
        "points": [
          {"timestamp": "2025-11-23T00:00:00Z", "value": 72}
        ]
      }
    ]
  }
}

value is Google's own 0–100 index: 100 is the week with the most interest inside the range you asked for, and every other week is scaled against it. It is not a search count.

Python: find the peak week

import requests

r = requests.post(
    "https://api.serpbase.dev/google/trends",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"q": "coffee", "geo": "US", "date": "today 12-m"},
    timeout=30,
).json()

points = r["trends"]["series"][0]["points"]
peak = max(points, key=lambda p: p["value"])
print("peak week:", peak["timestamp"][:10], peak["value"])
print("latest:", points[-1]["timestamp"][:10], points[-1]["value"])

Reading the numbers correctly

  • The index is relative to the range. A value of 72 in a 12-month request and 72 in a 5-year request are not the same thing. Compare points inside one response, not across requests with different ranges.
  • The last point can be partial. The current week is still filling in, so do not treat a final dip as a trend.
  • Different regions have different scales. geo: "US" and geo: "DE" are each indexed to their own peak.

Related endpoints

Two more calls cover the rest of the Trends site: /google/trends/trending for what is trending now, and /google/trends/autocomplete for the topic suggestions Trends shows as you type.

What people build with it

Seasonality checks before planning content or stock, demand comparisons between regions, alerts when a brand term spikes, and a "is this keyword growing" column in keyword tools.

Cost and limits

Each request costs 2 credits. Requests that fail are not charged. The response is always HTTP 200 with a status field: 0 means success, anything else comes with an error string, so check status rather than the HTTP code. New accounts get 500 free credits without a card.