> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/002_company/003_message_sentiment_analysis/003__list_sentiment_analysis_results.md).

# List Sentiment Analysis Results

GraphQL endpoint: `/company`

Lists sentiment analysis results for the company's external communications, page-numbered via `page` and `limit`. Results can be filtered by host address, remote address, communication type and timestamp range.

## Query

```graphql
query (
  $hostAddress: String
  $remoteAddress: String
  $type: ExternalCommunicationType
  $page: Int
  $limit: Int
) {
  sentimentAnalysisResults (
    hostAddress: $hostAddress
    remoteAddress: $remoteAddress
    type: $type
    page: $page
    limit: $limit
  ) {
    records {
      id
      action
      certaintyFactor
      topics
      externalCommunication {
        id
        hostAddress
        remoteAddress
        messageBody
        type
        direction
      }
    }
    page
    totalRecords
  }
}

```

## Variables

```json
{}
```

## Response

```json
{
  "data": {
    "sentimentAnalysisResults": {
      "page": 1,
      "records": [
        {
          "action": "UNSUBSCRIBE",
          "certaintyFactor": 0.95,
          "externalCommunication": {
            "direction": "INBOUND",
            "hostAddress": "1",
            "id": "00000000-0000-4000-8000-000000000001",
            "messageBody": "This is a test message",
            "remoteAddress": "1",
            "type": "SMS"
          },
          "id": "00000000-0000-4000-8000-000000000002",
          "topics": [
            "opt-out"
          ]
        },
        {
          "action": "UNSUBSCRIBE",
          "certaintyFactor": 0.95,
          "externalCommunication": {
            "direction": "INBOUND",
            "hostAddress": "1",
            "id": "00000000-0000-4000-8000-000000000001",
            "messageBody": "This is a test message",
            "remoteAddress": "1",
            "type": "SMS"
          },
          "id": "00000000-0000-4000-8000-000000000003",
          "topics": [
            "opt-out"
          ]
        }
      ],
      "totalRecords": 2
    }
  }
}
```
