Sentiment Analysis API

Sentiment analysis API uses machine learning to reveal the structure and meaning of text. You can extract information about people, places, and events, and better understand customer sentiment.

API Server is Allganize's NLU API endpoint. If you are using on-prem, please use your API endpoint.

Getting API KEY

The NLU API uses API keys to authenticate requests that you can find in the Allganize NLU API dashboard. Go to Settings > General to find your API key. If you don't have an account yet, you can create one here.

Provide your API KEY in the request header API-KEY.

Sentiment Analysis API



Request Body

  "inputText": STRING,
  "intent": {
    "id": NUMBER,
    "displayText": STRING,
    "confidence": NUMBER

Request Example

Please replace YOUR_API_KEY with your one in the example below. Please see getting-api-key section.

curl \
-d '{"text": "Loved the location and the breakfast. Would definitely stay here again!"}' \
-H "Content-Type: application/json" \

Response Example

  "inputText": "Loved the location and the breakfast. Would definitely stay here again!",
  "intent": {
    "id": 656,
    "displayText": "POSITIVE",
    "confidence": 0.9603047832230137

Error Messages

Please read the error message you get if you don't get the response that you expected.

Error Response example

    "type": "APIError",
    "code": 7000,
    "message": "Something went wrong."

Last updated