Skip to content



Lettria’s API allows you to extract emotion from text data. The goal is to automatically classify text data according to the emotions it conveys, such as happiness, sadness, anger, fear, and so on.

To do this, our algorithms have been trained on large amounts of annotated text data, manually labeled according to the emotions it conveys.

We use a combination of rule-based and machine learning algorithms, along with custom solutions that you can build on the Lettria platform, to accurately detect emotion on sentence and subsentence level.


Emotions are received inside an Array()

A comprehensive list of emotions can be found here.


	{ "type": "joy", "value": 1 },
	{ "type": "remorse", "value": 1 }


Emotion Format

typeStringEmotion type
valueNumberEmotion value

Emotion Example

{ "type": "joy", "value": 1 }

Next steps