Google Trends Autocomplete API
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...
Get Google trends Autocomplete data, including topic IDs, for trend discovery and topic expansion.
Tags: Google
Parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
| query | Yes | string | The search query to get trending autocomplete suggestions for (e.g., 'artificial'). | |
| language | No | string | en | Set the language for the results using its two-letter code (e.g., 'en' for English, 'fr' for French). See Google Language. |
Copy Request
bash
curl -X GET "https://api.justserpapi.com/api/v1/google/trends/autocomplete?query=coffee" \
-H "X-API-Key: YOUR_API_KEY"js
const res = await fetch("https://api.justserpapi.com/api/v1/google/trends/autocomplete?query=coffee", {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);python
import requests
url = "https://api.justserpapi.com/api/v1/google/trends/autocomplete"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
"query": "coffee"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())php
<?php
$url = "https://api.justserpapi.com/api/v1/google/trends/autocomplete?query=coffee";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/trends/autocomplete?query=coffee", nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Extra
- x-highlights:
["Suggestion titles and topic IDs","Real-time trend suggestions","Language targeting","Trends explore links"]
Response
json
{
"code": 200,
"message": "success",
"data": {
"suggestions": [
{
"mid": "/m/02vqfm",
"title": "Coffee",
"type": "Beverage",
"link": "https://trends.google.com/trends/explore?q=coffee"
},
{
"mid": "/m/07xyvk",
"title": "Coffeemaker",
"type": "Topic",
"link": "https://trends.google.com/trends/explore?q=coffee"
},
{
"mid": "/m/078n6m",
"title": "Coffee table",
"type": "Topic",
"link": "https://trends.google.com/trends/explore?q=coffee"
},
{
"mid": "/m/0h3nq30",
"title": "Coffee",
"type": "Color",
"link": "https://trends.google.com/trends/explore?q=coffee"
},
{
"mid": "/m/05lvsg",
"title": "Coffee grinder",
"type": "Kitchenware",
"link": "https://trends.google.com/trends/explore?q=coffee"
}
]
},
"requestId": "ee12a001-713b-4978-b264-d30542c9fdde",
"timestamp": 1771923363655
}