# google.trends

Search interest over time for up to five keywords on Google Trends, with each keyword's top and rising related queries.

Google Trends, one of the Google Trends scrapers.

| | |
| --- | --- |
| Id | `google.trends` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/google.trends/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `keywords` | array of string | yes | One to five search terms to compare, e.g. `["bitcoin"]` or `["python", "javascript"]`. Compared terms share one scale. |
| `geo` | string | no | Where: a two-letter country code (`US`, `GB`) or a region of one as Trends writes it (`US-CA`). Empty: worldwide. Default: `""`. |
| `time_range` | string | no | The period, as Trends writes it: `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all` (since 2004), or two dates `2025-01-01 2025-06-30`. Default: `"today 12-m"`. |
| `search_type` | "web" \| "images" \| "news" \| "youtube" \| "shopping" | no | Which searches are counted: web search, image search, news search, YouTube search or shopping search. Default: `"web"`. |
| `related_queries` | boolean | no | Also return each keyword's related queries (top and rising). Default: `true`. |
| `language` | string | no | Language of the labels Trends writes (`en-US`, `de`, `pt-BR`). Default: `"en-US"`. |

- One run is one comparison: `keywords` holds one to five search terms, and the run returns one record per term.
- The values are the index Google Trends publishes, 0 to 100, not search counts: 100 is the highest point of the comparison in the period and place asked for. Terms sent in one run share that scale; `average` is given only then.
- `geo` is a country (`US`) or a region of one (`US-CA`); left out, the data is worldwide. `time_range` is a period as Google Trends writes it (`now 7-d`, `today 12-m`, `today 5-y`, `all`) or two dates (`2025-01-01 2025-06-30`).
- `resolution` is the length of one interval, chosen by Google Trends for the period: `minute`, `hour`, `day`, `week` or `month`. `time` is the interval's start in UTC; `label` is the interval as Google Trends writes it, in the `language` asked for.
- The last interval of a period that reaches today is usually `partial`: it is not over, and its value will change. A value is `null` where there was too little data for the interval.
- A term with too little search volume ends `ok` with an empty `interest_over_time`.
- `related_queries_top` are scored 0 to 100. In `related_queries_rising`, `value` is the growth in percent and `label` the way Google Trends words it (`+250%`, `Breakout`). An empty list means there are none; `null` means they were not asked for or could not be read.
- When the related queries of a term cannot be read the run ends `partial` with `related_queries_missing` — see [the reasons of this family](https://docs.enrichednow.com/results-and-statuses.md#google-trends). Interest by region and related topics are not returned.

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `keyword` | string | The search term, as asked. |
| `geo` | string or null | The place asked for (`US`, `US-CA`); null for worldwide. |
| `time_range` | string | The period asked for, as Trends writes it. |
| `search_type` | string | Which searches were counted: `web`, `images`, `news`, `youtube` or `shopping`. |
| `compared_with` | array of string | The other keywords of the same run. All of them share one scale: 100 is the highest point of any. |
| `resolution` | string or null | The length of one interval of the timeline: `hour`, `day`, `week`, `month`, …, as Trends chose it for the period. |
| `average` | integer or null | The keyword's average over the period on the shared scale. Trends gives it only when several keywords are compared. |
| `interest_over_time` | array of object | The timeline, oldest interval first. Empty when Trends has too little data for the keyword. |
| `interest_over_time[].time` | string (date-time) | The start of the interval, in UTC. |
| `interest_over_time[].label` | string or null | The interval as Trends writes it, e.g. `Nov 16 – 22, 2025`. |
| `interest_over_time[].value` | integer or null | Search interest in the interval, 0 to 100, relative to the highest point of the whole comparison. Null when Trends had too little data for the interval. |
| `interest_over_time[].partial` | boolean | True for an interval that was not over when it was read: its value will still change. Default: `false`. |
| `related_queries_top` | array of object or null | The most common queries of people who searched for the keyword, most common first. Null when they were not asked for or could not be read; an empty list when Trends has none. |
| `related_queries_top[].query` | string | The related search query. |
| `related_queries_top[].value` | integer or null | For a top query: its popularity, 0 to 100, relative to the most common one. For a rising query: its growth over the previous period, in percent. |
| `related_queries_top[].label` | string or null | The value as Trends shows it: the score for a top query, the growth with a plus sign and a percent sign for a rising one, or Trends' word for growth too large for a figure (`Breakout` in English). |
| `related_queries_top[].url` | string or null | The query's own page on Google Trends, for the same place and period. |
| `related_queries_rising` | array of object or null | The related queries that grew most over the previous period, the largest growth first. Null and empty as for the top queries. |
| `related_queries_rising[].query` | string | The related search query. |
| `related_queries_rising[].value` | integer or null | For a top query: its popularity, 0 to 100, relative to the most common one. For a rising query: its growth over the previous period, in percent. |
| `related_queries_rising[].label` | string or null | The value as Trends shows it: the score for a top query, the growth with a plus sign and a percent sign for a rising one, or Trends' word for growth too large for a figure (`Breakout` in English). |
| `related_queries_rising[].url` | string or null | The query's own page on Google Trends, for the same place and period. |
| `url` | string | The comparison's page on Google Trends. |
| `fetched_at` | string (date-time) | When the data was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/google.trends/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"keywords":["bitcoin"],"geo":"US","time_range":"today 12-m"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "google.trends",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "keywords": [
      "bitcoin"
    ],
    "geo": "US",
    "time_range": "today 12-m"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "keyword": "bitcoin",
      "geo": "US",
      "time_range": "today 12-m",
      "search_type": "web",
      "compared_with": [],
      "resolution": "week",
      "average": null,
      "interest_over_time": [
        {
          "time": "2025-11-16T00:00:00Z",
          "label": "Nov 16 – 22, 2025",
          "value": 66,
          "partial": false
        },
        {
          "time": "2025-11-23T00:00:00Z",
          "label": "Nov 23 – 29, 2025",
          "value": 47,
          "partial": false
        }
      ],
      "related_queries_top": [
        {
          "query": "bitcoin price",
          "value": 100,
          "label": "100",
          "url": "https://trends.google.com/trends/explore?q=bitcoin+price&date=today+12-m&geo=US"
        },
        {
          "query": "bitcoin stock",
          "value": 19,
          "label": "19",
          "url": "https://trends.google.com/trends/explore?q=bitcoin+stock&date=today+12-m&geo=US"
        }
      ],
      "related_queries_rising": [
        {
          "query": "spcx stock",
          "value": 18400,
          "label": "Breakout",
          "url": "https://trends.google.com/trends/explore?q=spcx+stock&date=today+12-m&geo=US"
        },
        {
          "query": "how to buy bitcoin safely",
          "value": 8100,
          "label": "Breakout",
          "url": "https://trends.google.com/trends/explore?q=how+to+buy+bitcoin+safely&date=today+12-m&geo=US"
        }
      ],
      "url": "https://trends.google.com/trends/explore?q=bitcoin&date=today%2012-m&geo=US",
      "fetched_at": "2026-11-19T18:07:40.737440Z"
    }
  ],
  "next_cursor": null
}
```

What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with `… [truncated]`.

- Shortened: `interest_over_time`: 53 items, the first 2 shown.
- Shortened: `related_queries_top`: 25 items, the first 2 shown.
- Shortened: `related_queries_rising`: 25 items, the first 2 shown.

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Google Trends scrapers](https://docs.enrichednow.com/results-and-statuses.md#google-trends) are in their own section there.
