Receive Topics

The most relevant topics of discussion from the conversation that are generated based on the combination of the overall scope of the discussion.

This API returns all the topics generated from a conversation.

Sentiment Analysis in Topics BETA#

You can enable sentiment analysis over each topics which is being discussed in the conversation. All you need to do is pass sentiment=true as a query parameter. Read more about it

Topic Hierarchy in Topics BETA#

info

"parentRefs" doesn't support "sentiment" for now.

You can enable topic hierarchy in Topics API by passing parentRefs=true. Topic Hierarchy breaks conversation in parent and child topics which helps outline the entire conversation faster. Read more about it here

HTTP Request#

GET https://api.symbl.ai/v1/conversations/{conversationId}/topics

Example API call#

curl "https://api.symbl.ai/v1/{conversationId}/topics" \
-H "x-api-key: <api_token>"

Query Params#

ParameterRequiredValueDescription
sentimentNotrueGive you sentiment analysis on each topic in conversation.
parentRefsNotrueGives you topic hierarchy.

Response#

Topic Hierarchy Sample Response (parentRefs=true):

{
"topics": [
{
"id": "5907389282779136",
"text": "interns",
"type": "topic",
"score": 0.7178597920690242,
"messageIds": [
"4600982711304192",
"5487363432120320",
"6109794119188480"
],
"parentRefs": [
{
"type": "topic",
"text": "company-wise hiring"
}
]
},
{
"id": "5776859730018304",
"text": "company-wise hiring",
"type": "topic",
"score": 0.788856914361565,
"messageIds": [
"6298570346987520",
"6330577953226752"
],
"parentRefs": []
},
{
"id": "6697188878974976",
"text": "new regulations",
"type": "topic",
"score": 0.6968750176932417,
"messageIds": [
"5356560840654848",
"5663440783802368",
"5263998490509312",
"6082396449406976",
"4925138187321344",
],
"parentRefs": [
{
"type": "topic",
"text": "company-wise hiring"
}
]
}
]
}

Sentiment Sample Response (sentiment=true):

{
"topics": [
{
"id": "5907389282779136",
"text": "interns",
"type": "topic",
"score": 0.7178597920690242,
"messageIds": [
"4600982711304192",
"5487363432120320",
"6109794119188480"
],
"sentiment": {
"polarity": {
"score": 0.389
},
"suggested": "positive"
},
"parentRefs": []
},
{
"id": "5776859730018304",
"text": "company-wise hiring",
"type": "topic",
"score": 0.788856914361565,
"messageIds": [
"6298570346987520",
"6330577953226752"
],
"sentiment": {
"polarity": {
"score": 0.012
},
"suggested": "neutral"
},
"parentRefs": []
},
{
"id": "6697188878974976",
"text": "new regulations",
"type": "topic",
"score": 0.6968750176932417,
"messageIds": [
"5356560840654848",
"5663440783802368",
"5263998490509312",
"6082396449406976",
"4925138187321344",
],
"sentiment": {
"polarity": {
"score": -0.809
},
"suggested": "negative"
},
"parentRefs": []
}
]
}

Response Object#

FieldDescription
idunique conversation identifier
textconversation text
typeresponse type. default is topics
scoreconfidence score of the generated topic. value from 0 - 1
messageIdsunique message identifiers of the corresponding messages
entitieslist of detected entity objects in the insight with type - entity type and text - corresponding text
parentRefsThis is enabled when parentRefs is set to true in request.
sentimentShows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral)