trends
Search interest over time
One of only two live-on-request features, with SERP. Trends are about what is happening now, so they are cached for six hours rather than a day.
GET
/
v1
/
trends
/
explore
Search interest over time
curl --request GET \
--url https://api.surnex.io/v1/trends/exploreimport requests
url = "https://api.surnex.io/v1/trends/explore"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.surnex.io/v1/trends/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/trends/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/trends/explore"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.surnex.io/v1/trends/explore")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/trends/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"keywords": [
"<string>"
],
"date_range": "<string>",
"location_code": 123,
"series": [
{
"keyword": "<string>",
"data_points": [
{
"date": "<string>",
"date_to": "<string>",
"value": 123
}
]
}
]
},
"cached": true
}
}{}Query Parameters
Comma-separated, up to five.
Available options:
past_7_days, past_30_days, past_90_days, past_12_months, past_5_years ⌘I
Search interest over time
curl --request GET \
--url https://api.surnex.io/v1/trends/exploreimport requests
url = "https://api.surnex.io/v1/trends/explore"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.surnex.io/v1/trends/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/trends/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/trends/explore"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.surnex.io/v1/trends/explore")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/trends/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"keywords": [
"<string>"
],
"date_range": "<string>",
"location_code": 123,
"series": [
{
"keyword": "<string>",
"data_points": [
{
"date": "<string>",
"date_to": "<string>",
"value": 123
}
]
}
]
},
"cached": true
}
}{}