Review Analysis API
Review Analysis API identifies recurring themes and topics in comments and reviews, allows retailers to understand how their customers feel without having to read every review individually.

API Server

nlu-api.allganize.ai 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.

post
https://nlu-api.allganize.ai
/api/inference
Review Analysis API

Request Example

Please replace YOUR_API_KEY with your one in the example below. Please see getting-api-key section.
1
curl https://nlu-api.allganize.ai/api/inference \
2
-d '{"text": "Cannot recommend highly enough! Absolutely fantastic apartment in a fantastic area! Great thoughtful touches and close amenities! Good vibes all round!"}' \
3
-H "Content-Type: application/json" \
4
-H "API-KEY: YOUR_API_KEY"
Copied!

Response Example

1
{
2
"inputText": "Cannot recommend highly enough! Absolutely fantastic apartment in a fantastic area! Great thoughtful touches and close amenities! Good vibes all round!"
3
"reviewSentiments": [
4
{"category": "location", "sentiment": "2", "keywords": [{"text": "in a fantastic area","index": 63}]},
5
{"category": "rooms", "sentiment": “3”, “keywords": [{"text": “Absolutely fantastic apart”ment, ”index": 32}]},
6
{"category": "service", "sentiment": “1”, "keywords": [{"text": “Great thoughtful touches”, ”index": 84}]}
7
]
8
}
Copied!

Error Messages

Please read the error message you get if you don't get the response that you expected.
Status Code
Error Code
Name
Message
Description
500
7000
API Error
Something went wrong
Default API error message for any uncategorized errors.
403
7001
Invalid API Key
API-KEY is not valid.
When the API Key requested to the header is invalid.
403
7002
Invalid JSON
Cannot decode the requested JSON body.
When the requested JSON is not decodable.
400
7003
Invalid Parameter
Requested parameters are not valid. 'text' is empty.
When the requested parameter is invalid (for example, when requesting inference with empty text).
405
-
Wrong HTTP Method
-
When the HTTP method used is not valid.

Error Response example

1
{
2
"type": "APIError",
3
"code": 7000,
4
"message": "Something went wrong."
5
}
Copied!
Last modified 4d ago