Read Sentiment, Entities & Intents
Posts, comments, reviews and other opinionated documents are analyzed automatically after ingest for three things: sentiment and emotions, mentioned entities, and the author’s intent. By the end of this page you can read results per document, sync them in bulk, and view daily statistics.
Product details, search results and rankings aren’t analyzed.
| Analysis | Field access needed | Per-document endpoint |
|---|---|---|
| Sentiment and emotions | affect | GET /v1/documents/{document_id}/affect |
| Entities | entities | GET /v1/documents/{document_id}/entities |
| Intents | intents | GET /v1/documents/{document_id}/intents |
All three work the same way:
- They read the current version by default; add
?version_id=for another version. - Add
?detail=truefor probabilities and confidence. - Without the matching access they return
403.
Read sentiment and emotions
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/affect" \
-H "Authorization: Bearer $WHALE_API_KEY"{
"document_id": "doc_01J...",
"version_id": "ver_01J...",
"sentiment": {"score": -0.82, "confidence": 0.71, "analyzed_at": "2026-10-26T08:45:43Z"},
"emotions": {
"scores": {"anger": 0.64, "disgust": 0.12, "fear": 0.05, "joy": 0.02, "sadness": 0.31, "surprise": 0.04, "neutral": 0.08},
"labels": ["anger", "sadness"],
"analyzed_at": "2026-10-26T08:45:43Z"
}
}| Field | Meaning |
|---|---|
sentiment.score | -1 to 1; higher is more positive |
sentiment.confidence | 0 to 1, how sure the model is. Don’t use results below 0.4 directly |
emotions.scores | Strength of anger, disgust, fear, joy, sadness, surprise and neutral, 0 to 1 |
emotions.labels | Clearly present emotions; can be several or none |
- There’s no positive/neutral/negative label; bucket the score yourself. For example above 0.3 is positive and below -0.3 negative.
- Documents not analyzed yet have
sentimentandemotionsset tonull. - Results may later be replaced by better ones, such as human review. The endpoint always returns the best available.
Read mentioned entities
Brands, products, models, people, places and prices are extracted automatically:
{
"document_id": "doc_01J...",
"version_id": "ver_01J...",
"analyzed": true,
"analyzed_at": "2026-10-29T03:48:28Z",
"entities": [
{"type": "brand", "text": "Huawei", "norm": "huawei", "sentiment": "positive"},
{"type": "model", "text": "Mate 60 Pro", "norm": "mate 60 pro"},
{"type": "location", "text": "Shenzhen", "norm": "shenzhen"},
{"type": "price", "text": "$999", "norm": "$999"}
]
}Seven type values:
type | Meaning |
|---|---|
brand | Brand |
organization | Company, institution, platform, media outlet |
product | Product, app, game, book, film or show |
model | Model or version |
person | Person or online handle |
location | Place |
price | A price with an amount |
Fields:
textis as written;normunifies case and full/half width and removes@,#, title brackets and quotes, for aggregation.- Aliases aren’t merged: “Alibaba” and “Alibaba Group” are two entities.
sentimentis this document’s attitude toward the brand, organization or product:positive,negativeorneutral. Merely mentioning, asking, reporting or official self-promotion counts asneutral.- Attitude toward an entity differs from overall sentiment. A post criticizing one brand while praising another can be negative overall but
positivetoward the second brand. analyzed: falsemeans not analyzed yet;analyzed: truewith emptyentitiesmeans analyzed with no entities.
Accuracy:
- Brand, organization and product are judged by how the name is used in that document, so the same name can differ across documents (TikTok can be a company or an app). About 85% are classified correctly among the three.
- Attitude toward entities agrees with human review about 82% of the time. Documents analyzed before 2026-10-30 have no
sentiment. - Documents with a detected model are reviewed again, and the reviewed result is returned afterwards.
?detail=trueaddstype_confidenceandsentiment_confidence.
Read author intent
What the author wanted to do with the post:
{
"document_id": "doc_01J...",
"version_id": "ver_01J...",
"intents": {"labels": ["support", "complaint"], "analyzed_at": "2026-10-29T14:02:11Z"}
}Up to 3 intents per document, most evident first. 14 values:
| Value | Meaning |
|---|---|
question | Asking for information, usage, rules or prices |
recommendation | Asking for recommendations |
comparison | Comparing or torn between options |
purchase | Wants to buy, or asks where to buy |
support | Reporting a problem: a fault, error, account or order issue |
complaint | Complaining |
praise | Praising |
suggestion | Asking for a feature or improvement |
churn | Has stopped or plans to stop using, unsubscribe, return or switch |
review | Sharing experience: usage, reviews, tutorials, guides |
sell | Selling or promoting: listings, affiliate posts, ads |
news | Reports, launches, announcements |
opinion | Opinions on a topic |
recruit | Hiring or job seeking |
- Empty
labelsmeans no clear intent, such as small talk, greetings or emoji only. - Documents not analyzed yet have
intentsset tonull. - Intent and sentiment are different: complaints are usually negative, but negative posts aren’t always complaints.
Read in batch
When reading documents in batch, add:
"include_affect": trueforaffect"include_entities": trueforentities"include_intents": trueforintents
If a document’s analysis fails to load, you get affect_error, entities_error or intents_error; the document itself is unaffected.
Sync all results by time window
To sync analysis results into your own system:
| Endpoint | Each record |
|---|---|
GET /v1/affect | One version’s sentiment or emotion result |
GET /v1/entities | One version’s entities |
GET /v1/intents | One version’s intent labels |
Parameters are the same as copying snapshots by window, with analyzed_from and analyzed_to (analysis time) as the time parameters. Up to 1000 per page.
- Each record carries
source_platform,content_type,languageandpublished_at, so you can aggregate directly. - Reviewed entity results appear again after review. Keep the last one received per version.
- A page may have fewer than
limitrecords; rely on whether there’s a next cursor.
View daily statistics
You can see daily totals without pulling every result. Days are UTC dates of analysis time.
Sentiment, emotions and intents
curl -sS "$WHALE_BASE_URL/v1/stats/affect?source_platform=reddit,x&days=30" \
-H "Authorization: Bearer $WHALE_API_KEY"{
"from": "2026-10-01",
"to": "2026-10-30",
"totals": {
"sentiment": {"results": 182340, "mean_score": 0.06, "labels": {"negative": 41210, "neutral": 88420, "positive": 52710}},
"emotion": {"results": 182340, "labels": {"anger": 9120, "joy": 30210, "none": 70110}},
"intent": {"results": 91200, "labels": {"complaint": 7340, "question": 9810, "none": 41020}}
},
"days": [{"date": "2026-10-01", "sentiment": {}, "emotion": {}, "intent": {}}],
"platforms": [{"platform": "reddit", "sentiment": {}, "emotion": {}, "intent": {}}]
}days: the most recent days including today; default 7, up to 90.source_platform: defaults to all platforms in your access.resultsis the number of analyzed documents;noneis the number with no clear emotion or intent.- A document can have several emotions and intents, so
labelscan add up to more thanresults. dayshas an entry for every day, including days without data.sentimentandemotionneedaffectaccess;intentneedsintents. With only one, you get only that part.
Entity mentions
curl -sS "$WHALE_BASE_URL/v1/stats/entities?source_platform=reddit&days=30&type=brand&limit=50" \
-H "Authorization: Bearer $WHALE_API_KEY"{
"from": "2026-10-01",
"to": "2026-10-30",
"type": "brand",
"totals": {"mentions": {"brand": 52310, "product": 80240, "person": 120330}, "versions_without_entities": 301200},
"days": [{"date": "2026-10-01", "mentions": {"brand": 1720, "product": 2610, "person": 3980}, "versions_without_entities": 9840}],
"platforms": [{"platform": "reddit", "mentions": {"brand": 30120, "product": 41020, "person": 70110}, "versions_without_entities": 160200}],
"top": [{"type": "brand", "norm": "xiaomi", "mentions": 1840}]
}- Returns daily and per-platform mention counts by type, plus the most-mentioned entities in
top. typeonly affectstop.limitdefaults to 50, up to 200.
To follow one entity, add entity=brand:Xiaomi (a name alone matches any type). Brands, organizations and products also return entity:
"entity": {
"type": "brand",
"norm": "xiaomi",
"totals": {"versions": 17188, "sentiments": {"results": 5929, "labels": {"positive": 1180, "negative": 950, "neutral": 3799}}, "intents": {"results": 12327, "labels": {"opinion": 5857, "question": 1944, "complaint": 1210, "none": 3020}}},
"days": [{"date": "2026-10-29", "versions": 11259, "intents": {"results": 6399, "labels": {"opinion": 2890}}}]
}versionsis the number of documents mentioning it each day.sentimentsis these documents’ attitude toward it;intentsis the intent distribution (needsintentsaccess). For shares, divide by each part’s ownresults.- This part updates every 30 minutes.
- Statistics use the automatic extraction; later reviews don’t change them.
Statistics limits
- Statistics are split by platform only. Access limited by language, region or publish time can’t use these two endpoints and returns
403. - Sentiment and emotion data starts 2026-10-26; entities and intents start 2026-10-29.
When something fails
See Error codes.