Web research5 min readBy Purrkey teamUpdated

Google Trends API: how to compare interest over time per call

Compare up to five search terms on one 0-100 interest scale for a chosen region and timeframe. The guide shows the input fields, the worksheet design and the cost of one comparison or four weekly checks

On this page

You have five seasonal search terms for a US campaign and need to compare their Google Trends interest over the past 12 months before setting next quarter's editorial calendar. Run one comparison with anyapi.google.trends, then flatten the returned series into a worksheet with one row per keyword and time bucket. The deliverable table below is a design, and values here are placeholders showing the shape. No run has been executed for this article

Example input and worksheet design

Example input: {"keywords":["coffee","tea","iced coffee","cold brew","herbal tea"],"geo":"US","timeframe":"12m"}

The worksheet columns are keyword, startUtc, value, partial, geo and timeframe. This table shows the shape:

keywordstartUtcvaluepartialgeotimeframe
coffee(UTC seconds)(0-100)(true or absent)US12m
tea(UTC seconds)(0-100)(true or absent)US12m

The worksheet design has one row per keyword and time bucket. A 12m request uses weekly buckets, so the table repeats geo and timeframe for each row. Swap in the campaign's own five terms and its own geo and timeframe; the example is only a shape

Input the tool takes

keywords is required: send 1 to 5 unique search terms, each 2 to 100 characters and no commas. Take the terms from the campaign's keyword list. A comma in a term fails the input pattern, so remove commas before you send the list. geo is optional: an uppercase ISO country code, a country subdivision, or omitted for worldwide interest. Omit geo only when worldwide interest is the target. timeframe is optional and defaults to 12m; the contract accepts short windows such as 7d and long windows such as 5y. Buckets grow with the window: minutes up to 1d, hours for 7d, days for 1m and 3m, weeks for 12m and 5y, and months for the longest window option

Values are relative across the whole set, so the same term scores differently next to different terms. Keep the keyword set fixed when you compare one run with another. If you still need a keyword list, the companion guide on collecting Google Search autocomplete keywords covers that step

Read the output fields that drive the decision

found tells you whether Google Trends has enough search interest for the terms, place and window to chart them. When found is false, data is null and reason is not_found; the contract calls a found: false answer a successful call, not an error

When found is true, data.series holds one series per term in the order you sent them. Each series has keyword and points. Each point has startUtc, value and sometimes partial. startUtc is a UTC epoch timestamp in seconds, so multiply by 1000 for a JS Date in milliseconds. value is search interest on Google's 0-100 scale, where 100 is the peak of any term in the response and 0 means there was not enough data. A value of 0 is not a zero-interest claim; the contract defines it as not enough data

Use value at the same startUtc to compare terms inside one response. The series array follows your input order, so keep the keyword list in a fixed order across weekly checks. The strongest term for the campaign is the one with the higher values across the weeks that matter to you. partial is true when Google is still counting a bucket, normally the newest one, so that point reads lower than it will end. Mark or exclude that bucket in the worksheet before you pick a term. Use the newest bucket that is not partial when you compare the current week. data.geo and data.timeframe echo the place and window you sent. This tool returns interest over time only, not related queries or regions. It cannot return related queries or a regional breakdown

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to compare five search terms with Google Trends. Check the current inputs and price of anyapi.google.trends before running. Send one call with keywords ["coffee", "tea", "iced coffee", "cold brew", "herbal tea"], geo "US" and timeframe "12m". Return a table with keyword, startUtc, value, partial, geo and timeframe. Use one row per keyword and time bucket. If found is false, return reason not_found and no data rows.

Estimated tool cost

The Purrkey catalog lists anyapi.google.trends called through POST /v1/runs with toolId anyapi.google.trends, read through the Purrkey catalog on November 13, 2026. The unit is max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge." The price is up to $0.018 per call (unitPriceMicros 18000). The totals below are ceilings. Model fees for the agent are not counted

StepFormulaUnit pricePlanned quantityTotal
Single five-term comparisoncalls x max price$0.018 per call1$0.018
Four weekly checkscalls x max price$0.018 per call4$0.072

A single comparison is one call; four weekly checks are four calls. The four weekly checks repeat the same five-term comparison on a weekly cadence

Next action

Check the current inputs and price on the Google Trends tool page before you run the five-term comparison

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Google Search.
Explore Google Search tools and pricing

FAQ

How do I compare five search terms with Google Trends?

Send one request to anyapi.google.trends with keywords set to the five terms, plus optional geo and timeframe. The response returns one series per term on one shared 0-100 scale.

What inputs does anyapi.google.trends take?

It takes the required keywords array of 1 to 5 unique terms, each 2 to 100 characters and no commas. geo is optional and accepts a country code, a subdivision, or worldwide; timeframe is optional and defaults to 12m.

What does the found field mean?

found is false when Google Trends has too little search interest for the terms, place and window to chart them. A found: false answer is a successful call, not an error, with reason set to not_found and data null.

How should I read the value field in Google Trends output?

value is search interest on Google's 0-100 scale, where 100 is the peak of any term in the response and 0 means there was not enough data. Compare values at the same startUtc inside one response.

What does the partial field mean?

partial is true when Google is still counting a bucket, normally the newest one. That point reads lower than it will end, so mark or exclude it before you pick a term.

How much does one or four Google Trends comparisons cost?

The catalog price is up to $0.018 per call. One five-term comparison is at most $0.018, and four weekly checks are at most $0.072; model fees for the agent are not counted.

Can anyapi.google.trends return related queries or regional interest?

No. The tool returns interest over time only, not related queries or regions.

Next step

Try this with Google Search

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Google Search tools

Share this article