---
title: "Extracts topics and sentiments and relates them."
method: POST
path: "/topic-sentiment"
tags: ["Text Analysis"]
---

# Extracts topics and sentiments and relates them.

`POST /topic-sentiment`

## Query parameters

- `domain` 'Ecom' | 'Employee' | 'Hotel' | 'Restaurant'

## Request body

- Post[]
  - `id` string — id of the post.
  - `text` string, required — the text to be analysed.
  - `language` string, required — language_code of the text.

## Response `200`

- TopicSentimentOutput[]
  - `id` string
  - `text` string
  - `language` string
  - `topicSentiments` TopicSentiment[]
    - `topic` Topic
      - `start` integer
      - `end` integer
      - `topic` string
      - `text` string
      - `category` string
      - `polarity` number, double
    - `sentiment` Sentiment
      - `start` integer
      - `end` integer
      - `text` string
      - `positive` boolean
      - `scale` number, double
      - `category` string
      - `parentCategory` string
      - `negationTerm` string
    - `sentence` string
  - `sentiments` Sentiment[]
    - `start` integer
    - `end` integer
    - `text` string
    - `positive` boolean
    - `scale` number, double
    - `category` string
    - `parentCategory` string
    - `negationTerm` string
  - `topics` Topic[]
    - `start` integer
    - `end` integer
    - `topic` string
    - `text` string
    - `category` string
    - `polarity` number, double

---

[API](https://skmtc.net/symanto/apis/psycholinguistic-text-analytics.md) · [All operations](https://skmtc.net/symanto/apis/psycholinguistic-text-analytics/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/symanto/psycholinguistic-text-analytics/revisions/d74e31f8c7cc/schema)
