Get Overall Sentiment
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions', 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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"positiveSentiment": 123,
"neutralSentiment": 123,
"negativeSentiment": 123,
"positiveSentimentDelta": 123,
"neutralSentimentDelta": 123,
"negativeSentimentDelta": 123
}Sentiment
Get Overall Sentiment
Retrieve aggregated positive, neutral, and negative sentiment counts for brand mentions.
GET
/
ai-analytics-service
/
api
/
public
/
v1
/
sentiment
/
overall
/
mentions
Get Overall Sentiment
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions', 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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"positiveSentiment": 123,
"neutralSentiment": 123,
"negativeSentiment": 123,
"positiveSentimentDelta": 123,
"neutralSentimentDelta": 123,
"negativeSentimentDelta": 123
}Returns overall sentiment breakdown for your brand mentions across AI platforms. Includes counts for positive, neutral, and negative sentiment, plus the change (delta) compared to the previous period of equal length.
Parameters
string
required
Bearer token. Format:
Bearer slat_<your-token>.integer
Number of days for the analysis window.
string
Start of date range. ISO 8601 format (e.g.,
2026-02-01T00:00:00Z).string
End of date range. ISO 8601 format.
number
Filter by topic ID.
number
Filter by brand ID.
string
Filter by brand name.
string[]
Filter by one or more platforms:
CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.string
Filter by ISO country code for region.
number
Filter by a single prompt ID.
number[]
Filter by multiple prompt IDs. Maximum 10 values.
Response
Returns200 OK with the sentiment summary.
integer
required
Count of positive sentiment mentions.
integer
required
Count of neutral sentiment mentions.
integer
required
Count of negative sentiment mentions.
integer
required
Change in positive sentiment compared to the previous period.
integer
required
Change in neutral sentiment compared to the previous period.
integer
required
Change in negative sentiment compared to the previous period.
Example
curl -s "https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions?dateRange=30&topicId=42" \
-H "Authorization: Bearer slat_YOUR_TOKEN"
import requests
response = requests.get(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
},
params={
"dateRange": 30,
"topicId": 42,
},
)
sentiment = response.json()
print(f"Positive: {sentiment['positiveSentiment']} ({sentiment['positiveSentimentDelta']:+d})")
print(f"Neutral: {sentiment['neutralSentiment']} ({sentiment['neutralSentimentDelta']:+d})")
print(f"Negative: {sentiment['negativeSentiment']} ({sentiment['negativeSentimentDelta']:+d})")
const params = new URLSearchParams({
dateRange: "30",
topicId: "42",
});
const response = await fetch(
`https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/overall/mentions?${params}`,
{
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
},
}
);
const sentiment = await response.json();
console.log("Positive:", sentiment.positiveSentiment);
console.log("Neutral:", sentiment.neutralSentiment);
console.log("Negative:", sentiment.negativeSentiment);
Response
{
"positiveSentiment": 120,
"neutralSentiment": 80,
"negativeSentiment": 15,
"positiveSentimentDelta": 10,
"neutralSentimentDelta": -5,
"negativeSentimentDelta": -2
}
Delta values compare the current period to the previous period of equal length. A
positiveSentimentDelta of 10 means 10 more positive mentions than the prior period.Status codes
| Status | Description |
|---|---|
200 | Sentiment data returned. |
400 | promptIds exceeds maximum of 10 values. |
401 | Missing or invalid Bearer token. See Authentication. |
500 | Internal server error. |
What’s next
- Get Theme Sentiment — View sentiment broken down by theme.
- Get Trends — View visibility trends over time.
Was this page helpful?