Sentiment analyzer · Score −1 to +1

Sentiment for your own texts.

Send a headline, a post or a sentence and get a score with a label. Name a company and the response adds the sentiment towards that company.

The endpoint at a glance

Request
POST /v1/sentiment/analyze
Plan
Pro and above
Per request
Up to 20 texts of 2,000 characters
Labels
positive · neutral · negative

Underlined: a phrase the lexicon found. Marked: a company the text names. The lighter band in each bar is neutral, between −0.35 and +0.35.

Engine
Phrases found
Message type
Confidence

              
POST /v1/sentiment/analyzeExample data

This page does not call the API. The endpoint needs a key on the Pro plan, so the responses here are prepared examples in the schema of the API. Copy the curl command and run it with your key.

How it scores

A lexicon first. A model where it is needed.

Every text goes through the same five steps. The fourth runs only when a text names several companies.

One text, step by stepExample data
Send

Tesla beats estimates and closes at an all-time high

Score
beats estimatesall-time high+0.74positive
Match
TSLATesla, Inc.US88160R1014
Model
lexiconOne company, so no model runs
Serve
POST /v1/sentiment/analyze
{ "results": [{ "sentiment": "positive", "sentimentScore": 0.74 }] }

FAQ

Questions about the sentiment endpoint.

What does the score mean?

sentimentScore runs from −1 (bearish) to +1 (bullish). sentiment is its label: positive from +0.35 up, negative from −0.35 down, neutral in between. confidence runs from 0 to 1. For a lexicon score it is not calibrated: it grows with the size of the score.

What kind of text works?

English text: headlines, posts and sentences from articles. The lexicon reads English only. A text in another language comes back neutral with confidence 0 and a note in components.note.

When should I name a company?

Send target when you want the sentiment towards one company. It takes a ticker, an ISIN or a name. If the text does not name that company, target.mentioned is false and its sentiment is null. An unknown or ambiguous target is an error.

What else is in the response?

messageType says whether the text reads as informative, emotional or mixed, and emotionIntensity runs from 0 to 1. components shows the engine, the lexicon score and the phrases found.

How many texts fit in one request?

Up to 20 texts of 2,000 characters each. A text can be a plain string, or an object with its own id, lang and target.

Which plan do I need?

Pro or above. On the Free and Hobby plans the endpoint answers with the error code forbidden_plan.

How does this differ from the ticker endpoints?

The ticker endpoints aggregate posts and articles that SentiStream collected. This endpoint scores text you send. That text does not enter the figures of any ticker.