# LinkedIn Comment Thread Sentiment Analysis with AI

**Use case:** 

Score every person who engaged with a viral LinkedIn comment as positive, neutral, or negative - with a confidence score so you can filter out weak inferences from reaction-only rows. AI-powered via Claude Haiku on your own key. Built for community managers and crisis monitoring teams who need thread-level tone at a glance.

## Input

```json
{
  "comment_urls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7408723748973056001?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7408723748973056001%2C7408723949095772161%29"
  ],
  "include_replies": true,
  "include_reactions": true,
  "max_replies": 0,
  "max_reactions": 0,
  "sort_replies_by": "date",
  "emit_engagers": true,
  "enrich_engagers": true,
  "anthropic_api_key": "<YOUR_SECRET>",
  "icp_description": "Anyone commenting on this thread - I want to understand the emotional tone across the debate."
}
```

## Output

```json
{
  "type": {
    "label": "Type",
    "format": "string"
  },
  "comment_url": {
    "label": "Comment url",
    "format": "string"
  },
  "author_name": {
    "label": "Author name",
    "format": "string"
  },
  "reactor_name": {
    "label": "Reactor name",
    "format": "string"
  },
  "reaction_type": {
    "label": "Reaction type",
    "format": "string"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "created_at": {
    "label": "Created at",
    "format": "string"
  },
  "author_position": {
    "label": "Author position",
    "format": "string"
  },
  "reactor_position": {
    "label": "Reactor position",
    "format": "string"
  },
  "author_linkedin_url": {
    "label": "Author linkedin url",
    "format": "string"
  },
  "reactor_linkedin_url": {
    "label": "Reactor linkedin url",
    "format": "string"
  },
  "error_code": {
    "label": "Error code",
    "format": "string"
  },
  "error_description": {
    "label": "Error description",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [🔬 LinkedIn Comment Thread: Replies + Reactors [No Login] ✅](https://apify.com/unseenuser/comment-reactions-and-replies.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/unseenuser/comment-reactions-and-replies.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/unseenuser/comment-reactions-and-replies.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
