Google Trends
Google Trends: Interest
Interest from Google Trends. Costs 1 credit per successful call.
GET
https://api.perceptlayer.com
/
v1
/
google-trends
/
interest
Interest
curl --request GET \
--url https://api.perceptlayer.com/v1/google-trends/interest \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.perceptlayer.com/v1/google-trends/interest"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.perceptlayer.com/v1/google-trends/interest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.perceptlayer.com/v1/google-trends/interest';
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perceptlayer.com/v1/google-trends/interest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.perceptlayer.com/v1/google-trends/interest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.perceptlayer.com/v1/google-trends/interest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.perceptlayer.com/v1/google-trends/interest")
.header("X-API-Key", "<api-key>")
.asString();{
"endpoint": "google-trends.interest",
"params": {
"q": "tesla",
"geo": "US",
"time_range": "1y"
},
"response": {
"search_parameters": {
"keyword": "tesla",
"geo": "US",
"time_range": "today+12-m",
"hl": "en",
"search_type": "web"
},
"timeline_data": [
{
"timestamp": 1760832000,
"date": "Oct 19 – 25, 2025",
"value": 40
},
{
"timestamp": 1761436800,
"date": "Oct 26 – Nov 1, 2025",
"value": 39
},
{
"timestamp": 1762041600,
"date": "Nov 2 – 8, 2025",
"value": 45
}
],
"interest_over_time": {
"average": 49.13,
"max_value": 100,
"min_value": 39,
"data_points": [
{
"timestamp": 1760832000,
"date": "Oct 19 – 25, 2025",
"value": 40
},
{
"timestamp": 1761436800,
"date": "Oct 26 – Nov 1, 2025",
"value": 39
},
{
"timestamp": 1762041600,
"date": "Nov 2 – 8, 2025",
"value": 45
}
]
},
"response_time_ms": 320
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}1 credit per successful call; failed calls are free. See the Google Trends API overview for every Google Trends endpoint.
Authorizations
Query Parameters
Maximum string length:
550Maximum string length:
10Available options:
1h, 4h, 1d, 7d, 30d, 90d, 1y, 5y, all Maximum string length:
2Available options:
web, images, news, youtube, shopping Was this page helpful?
⌘I
Interest
curl --request GET \
--url https://api.perceptlayer.com/v1/google-trends/interest \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.perceptlayer.com/v1/google-trends/interest"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.perceptlayer.com/v1/google-trends/interest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.perceptlayer.com/v1/google-trends/interest';
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perceptlayer.com/v1/google-trends/interest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.perceptlayer.com/v1/google-trends/interest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.perceptlayer.com/v1/google-trends/interest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.perceptlayer.com/v1/google-trends/interest")
.header("X-API-Key", "<api-key>")
.asString();{
"endpoint": "google-trends.interest",
"params": {
"q": "tesla",
"geo": "US",
"time_range": "1y"
},
"response": {
"search_parameters": {
"keyword": "tesla",
"geo": "US",
"time_range": "today+12-m",
"hl": "en",
"search_type": "web"
},
"timeline_data": [
{
"timestamp": 1760832000,
"date": "Oct 19 – 25, 2025",
"value": 40
},
{
"timestamp": 1761436800,
"date": "Oct 26 – Nov 1, 2025",
"value": 39
},
{
"timestamp": 1762041600,
"date": "Nov 2 – 8, 2025",
"value": 45
}
],
"interest_over_time": {
"average": 49.13,
"max_value": 100,
"min_value": 39,
"data_points": [
{
"timestamp": 1760832000,
"date": "Oct 19 – 25, 2025",
"value": 40
},
{
"timestamp": 1761436800,
"date": "Oct 26 – Nov 1, 2025",
"value": 39
},
{
"timestamp": 1762041600,
"date": "Nov 2 – 8, 2025",
"value": 45
}
]
},
"response_time_ms": 320
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}