Google Trends Search interest over time API
API health
- 24h health
- Normal
- 24h average time
- —
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Compare Google search interest for 1 to 5 keywords over time. Each row is one point in time with a 0 to 100 value per keyword, relative to the highest point in the query. Choose country, time_window from a day to five years, and search_type such as news or YouTube. Values are relative interest, not search counts.
Price $8.81 per 1,000 requests ($0.008806 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
Please help me write a data collection script with the EveryInfra Google Trends Search interest over time endpoint (google_trends/interest_over_time).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to google_trends and action to interest_over_time, and put the parameters inside params.
- Required parameters:
- keywords: A list of 1 to 5 search terms to compare, such as ["openai", "anthropic"]. Each term is at most 80 characters and 10 words.
- Optional parameters:
- country: A two-letter country code such as us, gb or jp for where to measure interest. Leave it out for worldwide.
- language: A two-letter language code such as en or ja. Usually not needed.
- search_type: Which Google search to measure: web (default), news, youtube, images or shopping.
- time_window: The period to cover: day, week, month (30 days), quarter (90 days), year (12 months, the default) or five_years.
- limit: 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.
- Returns a list of records. Main fields of each record: time (Start of this point in time, UTC, ISO 8…), date_from (First day of this point (YYYY-MM-DD)), date_to (Last day of this point (YYYY-MM-DD)), values (Interest per keyword at this point, 0 t…), period_averages (Average interest per keyword over the w…), partial (True when this point is still being cou…).
- Example request body:
{
"platform": "google_trends",
"action": "interest_over_time",
"params": {
"keywords": [
"openai",
"anthropic"
]
}
}
- Price: $8.81 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | google_trends | Platform identifier, fixed value. |
action | body | string | Yes | interest_over_time | Capability identifier, fixed value. |
keywords | body.params | array | Yes | - | 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 | body.params | string | No | - | A two-letter country code such as us, gb or jp for where to measure interest. Leave it out for worldwide. |
language | body.params | string | No | - | A two-letter language code such as en or ja. Usually not needed. |
search_type | body.params | string | No | - | Which Google search to measure: web (default), news, youtube, images or shopping. |
time_window | body.params | string | No | - | The period to cover: day, week, month (30 days), quarter (90 days), year (12 months, the default) or five_years. |
limit | body.params | integer (1–) | No | - | 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. |
Code samples
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"
]
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
{
"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": { … }
}Response fields
Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| 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). |
Errors and billing
- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
Official references
Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Google Trends Help: FAQ About Google Trends Data ↗
Google Trends Help explains that the data comes from a sample of real searches, that each point is divided by total searches for its place and period and scaled from 0 to 100, and that low-volume terms appear as 0. The source supports the meaning of `values`; this API's `country`, `time_window` and `search_type` filters are defined by EveryInfra, and the source does not vouch for results.
Checked 2026-11-01