Skip to main content
GET
/
ai-analytics-service
/
api
/
public
/
v1
/
sentiment
/
theme
/
{themeId}
/
keyword
/
mentions
Get Theme Keyword Sentiment
curl --request GET \
  --url https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/theme/{themeId}/keyword/mentions \
  --header 'Authorization: <authorization>'
{
  "keywords": [
    {
      "keywordId": "<string>",
      "keyword": "<string>",
      "positiveSentiment": 123,
      "neutralSentiment": 123,
      "negativeSentiment": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://slatehq.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Returns sentiment data for each keyword within a theme. Use this to identify which keywords drive positive or negative sentiment.

Parameters

themeId
string
required
Unique identifier for the theme.
Authorization
string
required
Bearer token. Format: Bearer slat_<your-token>.
dateRange
integer
Number of days for the analysis window.
from
string
Start of date range. ISO 8601 format (e.g., 2026-02-01T00:00:00Z).
to
string
End of date range. ISO 8601 format.
topicId
number
Filter by topic ID.
brandId
number
Filter by brand ID.
brand
string
Filter by brand name.
platform
string[]
Filter by one or more platforms: CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.
region
string
Filter by ISO country code for region.
sentiment
string
Filter by sentiment label (e.g., positive, neutral, negative).
page
integer
Page number for pagination.
size
integer
Page size for pagination.
promptId
number
Filter by a single prompt ID.
promptIds
number[]
Filter by multiple prompt IDs. Maximum 10 values.

Response

Returns 200 OK with an array of keyword sentiment objects.
keywords
object[]
required
Array of keyword sentiment objects.

Example

curl -s "https://api.slatehq.ai/ai-analytics-service/api/public/v1/sentiment/theme/theme-abc-123/keyword/mentions?dateRange=30&topicId=42" \
  -H "Authorization: Bearer slat_YOUR_TOKEN"

Response

[
  {
    "keywordId": "kw-001",
    "keyword": "ease of use",
    "positiveSentiment": 28,
    "neutralSentiment": 12,
    "negativeSentiment": 3
  },
  {
    "keywordId": "kw-002",
    "keyword": "pricing",
    "positiveSentiment": 10,
    "neutralSentiment": 15,
    "negativeSentiment": 18
  }
]

Status codes

StatusDescription
200Keyword sentiment data returned.
400promptIds exceeds maximum of 10 values.
401Missing or invalid Bearer token. See Authentication.
500Internal server error.

What’s next