# Ai Classify Review Sentiment And Topics

**Use case:** 

Run customer reviews through Claude Haiku 4.5 and get back a sentiment label, the main topic and the product aspects mentioned, as three new columns you can filter and count. Uses four built-in example reviews; point it at your own reviews dataset or file.

## Input

```json
{
  "fileFormat": "auto",
  "data": [
    {
      "id": 1,
      "product": "Wireless earbuds",
      "review": "Battery life is fantastic and the sound is crisp, but the charging case feels cheap and creaks."
    },
    {
      "id": 2,
      "product": "Standing desk",
      "review": "Arrived with a scratched top and the motor is loud enough to annoy my colleagues. Returned it."
    },
    {
      "id": 3,
      "product": "Coffee grinder",
      "review": "Does the job. Nothing special, nothing wrong, grinds evenly."
    },
    {
      "id": 4,
      "product": "Running shoes",
      "review": "Best pair I have owned. Light, grippy, zero blisters after 200 km."
    }
  ],
  "prompt": "Classify the sentiment of this customer review as positive, neutral or negative. Then name the main topic in one to three words, and list up to three product aspects the customer mentions.\n\nProduct: {{product}}\nReview: {{review}}",
  "outputFields": [
    {
      "name": "sentiment",
      "type": "string",
      "description": "exactly one of: positive, neutral, negative"
    },
    {
      "name": "topic",
      "type": "string",
      "description": "what the review is mainly about, one to three words, never the product name"
    },
    {
      "name": "aspects",
      "type": "array",
      "description": "up to three short product aspects the customer mentions"
    }
  ],
  "model": "anthropic/claude-haiku-4.5",
  "previewRows": 0,
  "maxRows": 1000,
  "rowsPerRequest": 5,
  "concurrency": 4,
  "maxInputCharsPerField": 4000,
  "maxOutputTokensPerRow": 150,
  "temperature": 0,
  "skipIfEmpty": true,
  "includeOriginalFields": true,
  "exportFormats": [
    "csv"
  ]
}
```

## Output

```json
{
  "id": {
    "label": "Id",
    "format": "number"
  },
  "product": {
    "label": "Product",
    "format": "text"
  },
  "review": {
    "label": "Review",
    "format": "text"
  },
  "sentiment": {
    "label": "Sentiment",
    "format": "text"
  },
  "topic": {
    "label": "Topic",
    "format": "text"
  },
  "aspects": {
    "label": "Aspects",
    "format": "array"
  },
  "aiModel": {
    "label": "Model",
    "format": "text"
  },
  "aiError": {
    "label": "Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Dataset AI Enrich (LLM Classify, Extract, Summarise Rows)](https://apify.com/nerolabs/dataset-ai-enrich.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/nerolabs/dataset-ai-enrich.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
This Task's input is already configured above — use it as-is rather than inventing a new one.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/nerolabs/dataset-ai-enrich.md

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).
