# Google Trends Interest Over Time

Retrieve historical interest data for a keyword over a specified time period. Returns a timeline of interest values (0-100) showing search popularity trends.

- **Documentation:** [https://scrappa.co/docs/google-trends-api/google_trends_interest](https://scrappa.co/docs/google-trends-api/google_trends_interest)
- **API group:** Google Trends API
- **Endpoint:** `GET https://scrappa.co/api/google-trends/interest`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | The search keyword to analyze (e.g., "tesla", "bitcoin", "covid") |
| `geo` | string | No | Geographic location code (e.g., "US", "DE", "GB", "Worldwide") |
| `time_range` | string | No | Time period for data: 1h, 4h, 1d, 7d, 30d, 90d, 1y, 5y, all |
| `hl` | string | No | 2-letter language code for results (e.g., en, es, fr, de) |
| `search_type` | string | No | Type of search: web, images, news, youtube, shopping |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/google-trends/interest?q=tesla&geo=US&time_range=1y"
```

## Example response

```json
{
    "search_parameters": {
        "keyword": "tesla",
        "geo": "US",
        "time_range": "today+12-m",
        "hl": "en",
        "search_type": "web"
    },
    "timeline_data": [
        {
            "timestamp": 1704067200,
            "date": "2024-01-01",
            "value": 45
        }
    ],
    "interest_over_time": {
        "average": 52.3,
        "max_value": 100,
        "min_value": 12,
        "data_points": []
    },
    "response_time_ms": 587
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Missing required query parameter |  |
|  | Invalid time_range or search_type parameter |  |
|  | Google Trends request failed |  |
|  | Bad gateway - upstream service error |  |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
