Return live relative keyword popularity and related trends
curl --request POST \
--url https://api.agentbody.io/v1/seo/google-trends \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keywords": [
"<string>"
],
"category_code": 123,
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"item_types": [
"<string>"
],
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_name": "<string>",
"tag": "<string>",
"time_range": "<string>"
}
'import requests
url = "https://api.agentbody.io/v1/seo/google-trends"
payload = {
"keywords": ["<string>"],
"category_code": 123,
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"item_types": ["<string>"],
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_name": "<string>",
"tag": "<string>",
"time_range": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keywords: ['<string>'],
category_code: 123,
date_from: '2023-12-25',
date_to: '2023-12-25',
item_types: ['<string>'],
language_code: '<string>',
language_name: '<string>',
location_code: 123,
location_name: '<string>',
tag: '<string>',
time_range: '<string>'
})
};
fetch('https://api.agentbody.io/v1/seo/google-trends', 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.agentbody.io/v1/seo/google-trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keywords' => [
'<string>'
],
'category_code' => 123,
'date_from' => '2023-12-25',
'date_to' => '2023-12-25',
'item_types' => [
'<string>'
],
'language_code' => '<string>',
'language_name' => '<string>',
'location_code' => 123,
'location_name' => '<string>',
'tag' => '<string>',
'time_range' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentbody.io/v1/seo/google-trends"
payload := strings.NewReader("{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentbody.io/v1/seo/google-trends")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentbody.io/v1/seo/google-trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"items": [],
"keywords": []
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "example error"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_INVALID_RESPONSE",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "example error"
}
}seo
Return live relative keyword popularity and related trends
Use this operation to return live relative keyword popularity and related trends. Authenticate with Authorization: Bearer <AGENTBODY_API_KEY>. Correct a 400 invalid-input error; do not retry unchanged. Retry only declared 502, 503, or 504 responses with backoff.
POST
/
v1
/
seo
/
google-trends
Return live relative keyword popularity and related trends
curl --request POST \
--url https://api.agentbody.io/v1/seo/google-trends \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keywords": [
"<string>"
],
"category_code": 123,
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"item_types": [
"<string>"
],
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_name": "<string>",
"tag": "<string>",
"time_range": "<string>"
}
'import requests
url = "https://api.agentbody.io/v1/seo/google-trends"
payload = {
"keywords": ["<string>"],
"category_code": 123,
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"item_types": ["<string>"],
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_name": "<string>",
"tag": "<string>",
"time_range": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keywords: ['<string>'],
category_code: 123,
date_from: '2023-12-25',
date_to: '2023-12-25',
item_types: ['<string>'],
language_code: '<string>',
language_name: '<string>',
location_code: 123,
location_name: '<string>',
tag: '<string>',
time_range: '<string>'
})
};
fetch('https://api.agentbody.io/v1/seo/google-trends', 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.agentbody.io/v1/seo/google-trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keywords' => [
'<string>'
],
'category_code' => 123,
'date_from' => '2023-12-25',
'date_to' => '2023-12-25',
'item_types' => [
'<string>'
],
'language_code' => '<string>',
'language_name' => '<string>',
'location_code' => 123,
'location_name' => '<string>',
'tag' => '<string>',
'time_range' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentbody.io/v1/seo/google-trends"
payload := strings.NewReader("{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentbody.io/v1/seo/google-trends")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentbody.io/v1/seo/google-trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keywords\": [\n \"<string>\"\n ],\n \"category_code\": 123,\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"item_types\": [\n \"<string>\"\n ],\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_name\": \"<string>\",\n \"tag\": \"<string>\",\n \"time_range\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"items": [],
"keywords": []
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "example error"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_INVALID_RESPONSE",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "example error"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "example error"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional key for safely retrying a billable write request.
Required string length:
1 - 255Body
application/json
Required array length:
1 - 5 elementsRequired string length:
2 - 100Maximum array length:
1Maximum string length:
255Available options:
web, news, youtube, images, froogle Was this page helpful?
⌘I
