Trend Search
Performing a realtime google trends search using HTTP POST is very simple to the Google trend live endpoint.
Requires authentication
Performing a realtime google trends search.
POST
https://api.serphouse.com/trends/search
Headers
Request Body
{
"status": "error",
"msg": "validation_error",
"error": {
"time_zone_offset": [
"The time zone offset field is required."
]
}
}
{
"status": "error",
"msg": "Your SERPHouse account has either run out of available credits (try upgrading your Plan), or there is a payment problem.",
"error": ""
}
{
"status": "success",
"msg": "Completed",
"search_metadata": {
"id": 77054539,
"status": "success",
"created_at": "2023-05-29T10:43:36.000000Z",
"processed_at": "2023-05-29 10:43:36"
},
"search_parameters": {
"langauge_code": "en",
"geo": "US",
"keywords": "google,youtube",
"time_zone_offset": "-330",
"time": "now 1-d",
"category": 0,
"property": "youtube"
},
"results": {
"TIMESERIES": [
{
"time": "1685270880",
"formattedTime": "May 28, 2023 at 4:18 PM",
"formattedAxisTime": "May 28 at 4:18 PM",
"value": [
7,
28
],
"hasData": [
true,
true
],
"formattedValue": [
"7",
"28"
]
},
{
"time": "1685271360",
"formattedTime": "May 28, 2023 at 4:26 PM",
"formattedAxisTime": "May 28 at 4:26 PM",
"value": [
7,
31
],
"hasData": [
true,
true
],
"formattedValue": [
"7",
"31"
]
},
{
"time": "1685271840",
"formattedTime": "May 28, 2023 at 4:34 PM",
"formattedAxisTime": "May 28 at 4:34 PM",
"value": [
6,
31
],
"hasData": [
true,
true
],
"formattedValue": [
"6",
"31"
]
},
{
"time": "1685272320",
"formattedTime": "May 28, 2023 at 4:42 PM",
"formattedAxisTime": "May 28 at 4:42 PM",
"value": [
8,
36
],
"hasData": [
true,
true
],
"formattedValue": [
"8",
"36"
]
},
{
"time": "1685272800",
"formattedTime": "May 28, 2023 at 4:50 PM",
"formattedAxisTime": "May 28 at 4:50 PM",
"value": [
5,
33
],
"hasData": [
true,
true
],
"formattedValue": [
"5",
"33"
]
},
{
"time": "1685273280",
"formattedTime": "May 28, 2023 at 4:58 PM",
"formattedAxisTime": "May 28 at 4:58 PM",
"value": [
5,
36
],
"hasData": [
true,
true
],
"formattedValue": [
"5",
"36"
]
},
{
"time": "1685273760",
"formattedTime": "May 28, 2023 at 5:06 PM",
"formattedAxisTime": "May 28 at 5:06 PM",
"value": [
7,
32
],
"hasData": [
true,
true
],
"formattedValue": [
"7",
"32"
]
},
{
"time": "1685274240",
"formattedTime": "May 28, 2023 at 5:14 PM",
"formattedAxisTime": "May 28 at 5:14 PM",
"value": [
6,
38
],
"hasData": [
true,
true
],
"formattedValue": [
"6",
"38"
]
},
{
"time": "1685274720",
"formattedTime": "May 28, 2023 at 5:22 PM",
"formattedAxisTime": "May 28 at 5:22 PM",
"value": [
7,
39
],
"hasData": [
true,
true
],
"formattedValue": [
"7",
"39"
]
},
{
"time": "1685275200",
"formattedTime": "May 28, 2023 at 5:30 PM",
"formattedAxisTime": "May 28 at 5:30 PM",
"value": [
7,
34
],
"hasData": [
true,
true
],
"formattedValue": [
"7",
"34"
]
}
],
"GEO_MAP": {
"google": {
"default": {
"geoMapData": [
{
"geoCode": "US-DE",
"geoName": "Delaware",
"value": [
100
],
"formattedValue": [
"100"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-ND",
"geoName": "North Dakota",
"value": [
95
],
"formattedValue": [
"95"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-CT",
"geoName": "Connecticut",
"value": [
94
],
"formattedValue": [
"94"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-NV",
"geoName": "Nevada",
"value": [
94
],
"formattedValue": [
"94"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-RI",
"geoName": "Rhode Island",
"value": [
89
],
"formattedValue": [
"89"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-ID",
"geoName": "Idaho",
"value": [
88
],
"formattedValue": [
"88"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-SC",
"geoName": "South Carolina",
"value": [
86
],
"formattedValue": [
"86"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-CA",
"geoName": "California",
"value": [
84
],
"formattedValue": [
"84"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-TX",
"geoName": "Texas",
"value": [
84
],
"formattedValue": [
"84"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-FL",
"geoName": "Florida",
"value": [
83
],
"formattedValue": [
"83"
],
"maxValueIndex": 0,
"hasData": [
true
]
}
]
}
},
"youtube": {
"default": {
"geoMapData": [
{
"geoCode": "US-WV",
"geoName": "West Virginia",
"value": [
100
],
"formattedValue": [
"100"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-VT",
"geoName": "Vermont",
"value": [
100
],
"formattedValue": [
"100"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-SD",
"geoName": "South Dakota",
"value": [
98
],
"formattedValue": [
"98"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-DE",
"geoName": "Delaware",
"value": [
91
],
"formattedValue": [
"91"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-WY",
"geoName": "Wyoming",
"value": [
88
],
"formattedValue": [
"88"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-ND",
"geoName": "North Dakota",
"value": [
87
],
"formattedValue": [
"87"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-ID",
"geoName": "Idaho",
"value": [
83
],
"formattedValue": [
"83"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-RI",
"geoName": "Rhode Island",
"value": [
81
],
"formattedValue": [
"81"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-KS",
"geoName": "Kansas",
"value": [
81
],
"formattedValue": [
"81"
],
"maxValueIndex": 0,
"hasData": [
true
]
},
{
"geoCode": "US-SC",
"geoName": "South Carolina",
"value": [
81
],
"formattedValue": [
"81"
],
"maxValueIndex": 0,
"hasData": [
true
]
}
]
}
}
},
"RELATED_QUERIES": {
"google": {
"default": {
"rankedList": [
{
"rankedKeyword": [
{
"query": "google pixel",
"value": 100,
"formattedValue": "100",
"hasData": true,
"link": "/trends/explore?q=google+pixel&date=now+1-d&geo=US"
},
{
"query": "google maps",
"value": 97,
"formattedValue": "97",
"hasData": true,
"link": "/trends/explore?q=google+maps&date=now+1-d&geo=US"
},
{
"query": "google play",
"value": 91,
"formattedValue": "91",
"hasData": true,
"link": "/trends/explore?q=google+play&date=now+1-d&geo=US"
},
{
"query": "hey google hey google",
"value": 69,
"formattedValue": "69",
"hasData": true,
"link": "/trends/explore?q=hey+google+hey+google&date=now+1-d&geo=US"
},
{
"query": "hey google",
"value": 68,
"formattedValue": "68",
"hasData": true,
"link": "/trends/explore?q=hey+google&date=now+1-d&geo=US"
},
{
"query": "google link",
"value": 59,
"formattedValue": "59",
"hasData": true,
"link": "/trends/explore?q=google+link&date=now+1-d&geo=US"
},
{
"query": "google me",
"value": 55,
"formattedValue": "55",
"hasData": true,
"link": "/trends/explore?q=google+me&date=now+1-d&geo=US"
},
{
"query": "google song",
"value": 51,
"formattedValue": "51",
"hasData": true,
"link": "/trends/explore?q=google+song&date=now+1-d&geo=US"
},
{
"query": "ok google",
"value": 48,
"formattedValue": "48",
"hasData": true,
"link": "/trends/explore?q=ok+google&date=now+1-d&geo=US"
},
{
"query": "google ok google",
"value": 48,
"formattedValue": "48",
"hasData": true,
"link": "/trends/explore?q=google+ok+google&date=now+1-d&geo=US"
}
]
},
{
"rankedKeyword": [
{
"query": "google translate beatbox",
"value": 3700,
"formattedValue": "+3,700%",
"link": "/trends/explore?q=google+translate+beatbox&date=now+1-d&geo=US"
},
{
"query": "traductor de ingles a español google",
"value": 300,
"formattedValue": "+300%",
"link": "/trends/explore?q=traductor+de+ingles+a+espa%C3%B1ol+google&date=now+1-d&geo=US"
},
{
"query": "google drive tutorial",
"value": 250,
"formattedValue": "+250%",
"link": "/trends/explore?q=google+drive+tutorial&date=now+1-d&geo=US"
},
{
"query": "talks at google",
"value": 200,
"formattedValue": "+200%",
"link": "/trends/explore?q=talks+at+google&date=now+1-d&geo=US"
},
{
"query": "google pixel fold review",
"value": 200,
"formattedValue": "+200%",
"link": "/trends/explore?q=google+pixel+fold+review&date=now+1-d&geo=US"
},
{
"query": "google earth live",
"value": 190,
"formattedValue": "+190%",
"link": "/trends/explore?q=google+earth+live&date=now+1-d&geo=US"
},
{
"query": "google authenticator setup",
"value": 150,
"formattedValue": "+150%",
"link": "/trends/explore?q=google+authenticator+setup&date=now+1-d&geo=US"
},
{
"query": "install google nest thermostat",
"value": 120,
"formattedValue": "+120%",
"link": "/trends/explore?q=install+google+nest+thermostat&date=now+1-d&geo=US"
},
{
"query": "google pixel 6a",
"value": 100,
"formattedValue": "+100%",
"link": "/trends/explore?q=google+pixel+6a&date=now+1-d&geo=US"
},
{
"query": "how to connect google home to wifi",
"value": 90,
"formattedValue": "+90%",
"link": "/trends/explore?q=how+to+connect+google+home+to+wifi&date=now+1-d&geo=US"
}
]
}
]
}
},
"youtube": {
"default": {
"rankedList": [
{
"rankedKeyword": [
{
"query": "on youtube",
"value": 100,
"formattedValue": "100",
"hasData": true,
"link": "/trends/explore?q=on+youtube&date=now+1-d&geo=US"
},
{
"query": "youtube channel",
"value": 31,
"formattedValue": "31",
"hasData": true,
"link": "/trends/explore?q=youtube+channel&date=now+1-d&geo=US"
},
{
"query": "youtube movies",
"value": 28,
"formattedValue": "28",
"hasData": true,
"link": "/trends/explore?q=youtube+movies&date=now+1-d&geo=US"
},
{
"query": "youtube videos",
"value": 26,
"formattedValue": "26",
"hasData": true,
"link": "/trends/explore?q=youtube+videos&date=now+1-d&geo=US"
},
{
"query": "shorts youtube",
"value": 22,
"formattedValue": "22",
"hasData": true,
"link": "/trends/explore?q=shorts+youtube&date=now+1-d&geo=US"
},
{
"query": "youtube video",
"value": 22,
"formattedValue": "22",
"hasData": true,
"link": "/trends/explore?q=youtube+video&date=now+1-d&geo=US"
},
{
"query": "youtube free movies",
"value": 18,
"formattedValue": "18",
"hasData": true,
"link": "/trends/explore?q=youtube+free+movies&date=now+1-d&geo=US"
},
{
"query": "movies on youtube",
"value": 16,
"formattedValue": "16",
"hasData": true,
"link": "/trends/explore?q=movies+on+youtube&date=now+1-d&geo=US"
},
{
"query": "free movies on youtube",
"value": 13,
"formattedValue": "13",
"hasData": true,
"link": "/trends/explore?q=free+movies+on+youtube&date=now+1-d&geo=US"
},
{
"query": "youtube movie",
"value": 12,
"formattedValue": "12",
"hasData": true,
"link": "/trends/explore?q=youtube+movie&date=now+1-d&geo=US"
}
]
},
{
"rankedKeyword": [
{
"query": "k michelle angela yee youtube",
"value": 8150,
"formattedValue": "Breakout",
"link": "/trends/explore?q=k+michelle+angela+yee+youtube&date=now+1-d&geo=US"
},
{
"query": "indy 500 live stream free youtube",
"value": 3250,
"formattedValue": "+3,250%",
"link": "/trends/explore?q=indy+500+live+stream+free+youtube&date=now+1-d&geo=US"
},
{
"query": "grace church",
"value": 1200,
"formattedValue": "+1,200%",
"link": "/trends/explore?q=grace+church&date=now+1-d&geo=US"
},
{
"query": "van wives on youtube",
"value": 700,
"formattedValue": "+700%",
"link": "/trends/explore?q=van+wives+on+youtube&date=now+1-d&geo=US"
},
{
"query": "vanwives youtube",
"value": 650,
"formattedValue": "+650%",
"link": "/trends/explore?q=vanwives+youtube&date=now+1-d&geo=US"
},
{
"query": "grace charis youtube",
"value": 350,
"formattedValue": "+350%",
"link": "/trends/explore?q=grace+charis+youtube&date=now+1-d&geo=US"
},
{
"query": "youtube employee",
"value": 300,
"formattedValue": "+300%",
"link": "/trends/explore?q=youtube+employee&date=now+1-d&geo=US"
},
{
"query": "martijn doolaard youtube",
"value": 100,
"formattedValue": "+100%",
"link": "/trends/explore?q=martijn+doolaard+youtube&date=now+1-d&geo=US"
},
{
"query": "how to get monetized on youtube",
"value": 70,
"formattedValue": "+70%",
"link": "/trends/explore?q=how+to+get+monetized+on+youtube&date=now+1-d&geo=US"
},
{
"query": "worldstarhiphop youtube",
"value": 50,
"formattedValue": "+50%",
"link": "/trends/explore?q=worldstarhiphop+youtube&date=now+1-d&geo=US"
}
]
}
]
}
}
}
}
}
{
"status": "error",
"msg": "Unauthenticated"
}
Example request:
curl --location --request POST 'https://api.serphouse.com/trends/search' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
}'
require "uri"
require "json"
require "net/http"
url = URI("https://api.serphouse.com/trends/search")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <YOUR_API_KEY>"
request.body = JSON.dump({
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
})
response = https.request(request)
puts response.read_body
import requests
import json
url = "https://api.serphouse.com/trends/search"
payload = json.dumps({
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
})
headers = {
'Authorization': 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var data = JSON.stringify({
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
});
var config = {
method: 'post',
url: 'https://api.serphouse.com/trends/search',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_API_KEY>'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$serphouse = new SERPHouse\SERPHouseClient('YOUR_API_KEY');
$body = [
'time_zone_offset' => '-330',
'keywords' => 'google,youtube',
'time' => 'now 1-d',
'property' => 'youtube',
'category' => '0',
'geo' => 'us',
'language_code' => 'en'
];
$res = $serphouse->trends->search($body);
echo $res->getResponse();
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
JSONObject jsonObject = new JSONObject();
jsonObject.put("time_zone_offset", "-330");
jsonObject.put("keywords", "google,youtube");
jsonObject.put("time", "now 1-d");
jsonObject.put("property", "youtube");
jsonObject.put("category", "0");
jsonObject.put("geo", "us");
jsonObject.put("language_code", "en");
String bodyJson = jsonObject.toString();
RequestBody body = RequestBody.create(mediaType, bodyJson);
Request request = new Request.Builder()
.url("https://api.serphouse.com/trends/search")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer <YOUR_API_KEY>")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.serphouse.com/trends/search", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.serphouse.com/trends/search"
method := "POST"
payload := strings.NewReader(`{
"time_zone_offset": "-330",
"keywords": "google,youtube",
"time": "now 1-d",
"property": "youtube",
"category": "0",
"geo": "us",
"langauge_code": "en"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, err :=