Trends Radar (Beta)
Search the radar by natural language (Beta)
POST
/
v2
/
radar
/
search
Search the radar by natural language (Beta)
curl --request POST \
--url https://api.upriver.ai/v2/radar/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"limit": 10,
"program": "general_market",
"lifecycle": "<string>",
"brand_safety": "<string>"
}
'import requests
url = "https://api.upriver.ai/v2/radar/search"
payload = {
"query": "<string>",
"limit": 10,
"program": "general_market",
"lifecycle": "<string>",
"brand_safety": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
limit: 10,
program: 'general_market',
lifecycle: '<string>',
brand_safety: '<string>'
})
};
fetch('https://api.upriver.ai/v2/radar/search', 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.upriver.ai/v2/radar/search",
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([
'query' => '<string>',
'limit' => 10,
'program' => 'general_market',
'lifecycle' => '<string>',
'brand_safety' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.upriver.ai/v2/radar/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.upriver.ai/v2/radar/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upriver.ai/v2/radar/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"item": {
"id": "<string>",
"type": "trend_moment",
"name": "<string>",
"description": "<string>",
"insight": "<string>",
"how_to_act": "<string>",
"brand_safety": "<string>",
"lifecycle_state": "<string>",
"momentum_ratio": 123,
"value_score": 123,
"stats": {},
"personas": [
{}
],
"program": "<string>",
"first_seen": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"archived": false
},
"match_score": 123
}
],
"beta": "Beta: response shapes may change and this surface may converge with /v2/trends."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Natural-language description of the trend, topic, or audience.
Required string length:
2 - 500Required range:
1 <= x <= 50Restrict results to one item type.
Available options:
trend_moment, topic, entity_breakout Production market catalog searched for results.
Allowed value:
"general_market"Restrict results to one lifecycle state.
Restrict results by brand-safety assessment.
⌘I
Search the radar by natural language (Beta)
curl --request POST \
--url https://api.upriver.ai/v2/radar/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"limit": 10,
"program": "general_market",
"lifecycle": "<string>",
"brand_safety": "<string>"
}
'import requests
url = "https://api.upriver.ai/v2/radar/search"
payload = {
"query": "<string>",
"limit": 10,
"program": "general_market",
"lifecycle": "<string>",
"brand_safety": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
limit: 10,
program: 'general_market',
lifecycle: '<string>',
brand_safety: '<string>'
})
};
fetch('https://api.upriver.ai/v2/radar/search', 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.upriver.ai/v2/radar/search",
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([
'query' => '<string>',
'limit' => 10,
'program' => 'general_market',
'lifecycle' => '<string>',
'brand_safety' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.upriver.ai/v2/radar/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.upriver.ai/v2/radar/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upriver.ai/v2/radar/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"program\": \"general_market\",\n \"lifecycle\": \"<string>\",\n \"brand_safety\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"item": {
"id": "<string>",
"type": "trend_moment",
"name": "<string>",
"description": "<string>",
"insight": "<string>",
"how_to_act": "<string>",
"brand_safety": "<string>",
"lifecycle_state": "<string>",
"momentum_ratio": 123,
"value_score": 123,
"stats": {},
"personas": [
{}
],
"program": "<string>",
"first_seen": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"archived": false
},
"match_score": 123
}
],
"beta": "Beta: response shapes may change and this surface may converge with /v2/trends."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}