# Google Trends Search interest over time API (google_trends.interest_over_time)

- Canonical page: https://everyinfra.com/en/google-trends-api/interest_over_time
- Endpoint: POST /api/v1/social with {"platform": "google_trends", "action": "interest_over_time", "params": {...}}
- Price: $0.008806 per call ($8.81 per 1,000 requests); failed and empty results are not charged
- Returns: list
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=google_trends&action=interest_over_time

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keywords | not declared | yes | not declared | A list of 1 to 5 search terms to compare, such as `["openai", "anthropic"]`. Each term is at most 80 characters and 10 words. |
| country | not declared | no | not declared | A two-letter country code such as `us`, `gb` or `jp` for where to measure interest. Leave it out for worldwide. |
| language | not declared | no | not declared | A two-letter language code such as `en` or `ja`. Usually not needed. |
| search_type | not declared | no | not declared | Which Google search to measure: `web` (default), `news`, `youtube`, `images` or `shopping`. |
| time_window | not declared | no | not declared | The period to cover: `day`, `week`, `month` (30 days), `quarter` (90 days), `year` (12 months, the default) or `five_years`. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| time | Start of this point in time, UTC, ISO 8601. Use it for hourly and minute points. |
| date_from | First day of this point (YYYY-MM-DD); for weekly points, the first day of the week. |
| date_to | Last day of this point (YYYY-MM-DD); absent on hourly and minute points. |
| values | Interest per keyword at this point, 0 to 100, where 100 is the highest point for any keyword in the query. |
| period_averages | Average interest per keyword over the whole period, the same on every row; only when two or more keywords are compared. |
| partial | True when this point is still being counted, usually the last one. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "google_trends",
  "action": "interest_over_time",
  "params": {
    "keywords": [
      "openai",
      "anthropic"
    ]
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "google_trends",
        "action": "interest_over_time",
        "params": {
            "keywords": [
                "openai",
                "anthropic",
            ],
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "google_trends",
  "action": "interest_over_time",
  "results": [
    {
      "time": …,
      "date_from": …,
      "date_to": …,
      "values": …,
      "period_averages": …,
      "partial": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=google_trends
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
