# Spanish Review Classifier — sentiment & complaints · $0.5/1k (`leoworks/spanish-review-classifier`) Actor

Classify Spanish customer reviews — MercadoLibre (reseñas y opiniones), AliExpress and any review scraper's dataset — into complaint types, sentiment and purchase motive with probabilities. Spanish review sentiment analysis (análisis de reseñas), no prompts, no LLM key. Beta.

- **URL**: https://apify.com/leoworks/spanish-review-classifier.md
- **Developed by:** [Leoworks](https://apify.com/leoworks) (community)
- **Categories:** AI, E-commerce, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.43 / 1,000 review classifications

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## Spanish Review Classifier — sentiment & complaints (beta)

**For sellers, dropshippers and AI agents that have Spanish reviews** — from a MercadoLibre review scraper, AliExpress, any other Apify dataset, or pasted as text — and need every review labelled with complaint type, sentiment and purchase motive, for $0.50 per 1,000 reviews, with no scraping, prompt writing or LLM key.

> **Beta: complaint-type accuracy is below our 85% bar (79% on reviews not used for tuning) — the numbers in Accuracy are measured; rely mainly on sentiment (92–96%).**

- **Complaint types** — delivery, quality/defect, size/fit, price/value, customer service, packaging, no effect, skin/body reaction, other (multi-label, each with a probability)
- **Sentiment** — positive / neutral / negative
- **Purchase motive** — price/discount, reviews & reputation, brand, gift, repurchase, unknown
- **Your own labels** — up to 10 yes/no criteria in plain English or Spanish (e.g. "mentions sound quality", "menciona el olor")

Labels come with English keys **and Spanish names** (e.g. `quality_defect` / `calidad / defecto`, field `labelEs`).

**Use it to:** see why MercadoLibre or AliExpress buyers leave 1-star reviews (análisis de reseñas) · compare complaint mix against competitors · track sentiment of your listings · tag Spanish reviews for a dashboard.

### Output sample

Real rows from run `q0y7cT0IwDbeW9G3O` (2026-10-08), AliExpress earbuds reviews from Spain, Chile and Colombia, with one custom label ("mentions sound quality"). English translations are added here for readers; the Actor returns the original text.

| text (Spanish) | English (added) | complaint (probability) | sentiment | motive | custom: mentions sound quality |
|---|---|---|---|---|---|
| llegó bien empacado y lo volví a comprar por qué ya compré uno y fun… | Arrived well packed and I bought it again | none (0.98) | positive (1.00) | repurchase | false |
| Son demasiado grandes y no se quedan en la oreja, se caen | Too big, they don't stay in the ear | size_fit (0.98) | negative (1.00) | unknown | false |
| la caja viene quebrada , solo carga 1 audífono, es lamentable, solo … | The case arrives broken, only one earbud charges | quality_defect (0.95), packaging (0.91) | negative (1.00) | unknown | false |
| se lo robaron por el camino, nunca llegó. Después de estar realizand… | Stolen on the way, it never arrived… | delivery (0.92), customer_service (0.71) | negative (1.00) | unknown | false |

Each row also has `labelEs` names, the rating and the ID fields you choose, and in full mode `complaintScores` for every complaint type.

### Input example

The form default — two pasted reviews, no dataset needed (about $0.001, 4 seconds):

```json
{
  "texts": [
    "El paquete llegó aplastado y uno de los auriculares no funciona.",
    "Siempre lo compro, excelente calidad. ¡Lo volvería a comprar!"
  ]
}
```

Beta: accuracy below our 85% bar — see **Accuracy**. To classify a scraper's output, pass its dataset instead — the text, rating and ID fields are detected automatically:

```json
{
  "datasetId": "YOUR_MERCADOLIBRE_REVIEW_DATASET_ID",
  "customLabels": ["mentions sound quality"]
}
```

### Pricing

Pay only for classified reviews — no subscription.

| Event | Price | When |
|---|---|---|
| `review-judged` | $0.0005 | One review classified (complaint types, sentiment, purchase motive and any custom labels). |

That is **$0.50 per 1,000 reviews**. **First run with the form defaults: about $0.001** (2 reviews, 4 seconds).

**Cost examples**

| Reviews | Cost |
|---|---|
| 100 | $0.05 |
| 1,000 | $0.50 |
| 10,000 | $5.00 |
| 100,000 | $50.00 |

With the free $5 monthly Apify credit you can classify about **10,000 reviews**.

Items without review text are skipped and **not charged**. Reviews that fail after retries are reported with an `error` field and **not charged**. If you set a maximum cost per run, the Actor stops cleanly when it is reached.

### Works with

| Source | Scraper on Apify Store | Text field | Rating | IDs kept |
|---|---|---|---|---|
| MercadoLibre reviews | [MercadoLibre Reviews Scraper (saswave)](https://apify.com/saswave/mercadolibre-reviews-scraper) | `content` | `rating` | `id`, `sku` |
| AliExpress reviews | [AliExpress Reviews Scraper (leoworks)](https://apify.com/leoworks/aliexpress-reviews-classifier) — already labels reviews itself; use this Actor only for Spanish-specific custom labels | `text` | `rating` | `reviewId`, `productId` |

Field detection was checked against real output of both. **Also:** the Apify API and JavaScript/Python clients · Apify Schedules · Claude, Cursor and Claude Code through the Apify MCP server (next section).

### Use with Claude, Cursor or Claude Code (MCP)

Add the Apify MCP server with this Actor as a tool and ask your agent in plain language — for example *"Classify these Spanish reviews and tell me the top complaint types: …"* or *"Classify dataset abc123 from my review scraper run and summarize the complaints."* The agent calls the tool `leoworks--spanish-review-classifier` and reads the labels with `get-dataset-items`.

Claude Desktop or Cursor (`mcp.json`):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=leoworks/spanish-review-classifier",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

Claude Code: `claude mcp add --transport http apify "https://mcp.apify.com?tools=leoworks/spanish-review-classifier" --header "Authorization: Bearer YOUR_APIFY_TOKEN"`. Leave out the header to sign in with OAuth in the browser instead. Your Apify token is in Console → Settings → API & Integrations. We verified this setup with the Apify MCP server (v0.17.3) on 2026-10-08: the agent classified a pasted review in 5.5 seconds (run `9J1ddgbOq59Fl9B7f`).

### Output (one row per review)

```json
{
  "index": 0,
  "text": "la caja viene quebrada , solo carga 1 audífono, es lamentable, solo porque lo gane en el huerto mágico no debiera venir malo. he canjeado varias cosas y esta es la primera decepción. que pena que no funciona.",
  "labels": {
    "complaint": [
      {
        "label": "quality_defect",
        "labelEs": "calidad / defecto",
        "probability": 0.95
      },
      {
        "label": "packaging",
        "labelEs": "embalaje",
        "probability": 0.91
      }
    ],
    "sentiment": {
      "label": "negative",
      "labelEs": "negativo",
      "probability": 1,
      "confidence": 1
    },
    "motive": {
      "label": "unknown",
      "labelEs": "desconocido",
      "probability": 0.59,
      "confidence": 0.51
    }
  }
}
```

When no complaint type passes the threshold, `complaint` is `[{ "label": "none", "labelEs": "sin queja" }]`. **Minimal mode** returns label keys only.

#### Summary by product (REPORT)

Each run also saves a **REPORT** record (Output tab → *Summary by product*) at no extra charge: for every product, the complaint rate and complaint mix, sentiment shares, purchase motives, average rating and the 3 strongest complaint reviews — plus the same for all reviews together. Products are grouped by `summaryGroupField` (detected automatically from fields such as `productId`, `productName` or `placeId` when empty).

```json
{
  "groupField": "productId",
  "groups": [{
    "group": "A",
    "reviews": 3,
    "averageRating": 2.67,
    "complaintRate": 0.667,
    "complaints": [{ "label": "delivery", "count": 1, "share": 0.333 }, { "label": "quality_defect", "count": 1, "share": 0.333 }],
    "sentiment": { "negative": 0.667, "positive": 0.333 },
    "motive": { "unknown": 0.667, "price": 0.333 },
    "exampleComplaints": [{ "complaint": "delivery", "rating": 2, "text": "El envío tardó una semana, demasiado lento" }]
  }]
}
```

### Accuracy

Measured on hand-labelled Spanish reviews (2026-10-07/08). The questions were adjusted on the first set, then checked on two sets of different products.

| Set | Products | Reviews (1–2 stars) | Complaint type | Sentiment |
|---|---|---|---|---|
| **Check sets — not used for adjusting** | iPhone (MercadoLibre MX) + earbuds (AliExpress ES/LatAm) | 91 (74) | **79%** | **93%** |
| — of which | iPhone 15, MercadoLibre MX | 41 | 80% | 95% |
| — of which | Earbuds, AliExpress | 50 | 78% | 92% |
| First set (used for adjusting) | Panettone, MercadoLibre AR | 45 (15) | 98% | 96% |

Most misses add a second, broader label ("other") next to the right one, or miss "not as described" cases (used or refurbished item sold as new). **Beta** until it passes 85% on a new check set. Automated labels can be wrong; check samples before making big decisions.

### Limits

| Item | Limit |
|---|---|
| Review length | First 4,000 characters are used |
| Custom labels | Up to 10, each up to 200 characters |
| Dataset size | Any — datasets are read in pages of 1,000 |
| Language | Spanish (beta, measured above). Other languages: see our Korean and Japanese classifiers |
| Speed | About 100 reviews in 5 seconds |
| Data | Only the text, rating and the ID fields you choose are sent for classification; reviewer names are not output |

### FAQ

**Which AI makes the judgments?** Jev, TypeSafe's decision model (version `jev-1.13.0`, pinned). Jev answers each label with a calibrated probability instead of generated text, so the same input gets the same answer from run to run. Only the review text, its rating and your custom labels are sent to Jev; reviewer names and other fields are not.

**Why beta?** Complaint-type accuracy on reviews not used for tuning is 79%, below the 85% we require for a measured language. Sentiment is reliable (92–96%).

**Does it scrape MercadoLibre?** No. It classifies reviews you already have — run a review scraper first (see **Works with**) or paste texts.

### Disclaimer

> Independent tool — not affiliated with, endorsed by or sponsored by MercadoLibre or AliExpress, or by the authors of the scrapers listed above. Names are used only to describe compatible data sources.

### Reviews and support

If this Actor saved you time, a short review on Apify Store helps others find it. Questions or a dataset whose fields are not detected? Open an issue in the **Issues** tab — we answer within a day.

### Changelog

See the Changelog tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/leoworks/spanish-review-classifier/changelog.md

# Actor input Schema

## `datasetId` (type: `string`):

An Apify dataset containing reviews — for example the output of a MercadoLibre review scraper. Use this OR “Review texts”.

## `texts` (type: `array`):

Paste review texts directly (one per line). Use this OR “Reviews dataset”.

## `textField` (type: `string`):

Field holding the review text. Leave empty to auto-detect (content, text, review, body, reviewText, …).

## `extraTextFields` (type: `array`):

Fields to prepend to the text (up to 5), e.g. `title` for Coupang review headlines. Leave empty if unsure.

## `idFields` (type: `array`):

Fields copied unchanged from each input item to the output so you can join results back (e.g. reviewId, productId). Leave empty to auto-pick reviewId/id/url.

## `customLabels` (type: `array`):

Up to 10 extra yes/no labels (each up to 200 characters) written in plain language (English or Spanish), e.g. “mentions the smell”, “menciona el olor”. Each gets a probability.

## `complaintThreshold` (type: `number`):

Minimum probability (0–1) for a complaint type or custom label to be reported. Raise it for fewer, surer labels.

## `outputMode` (type: `string`):

Minimal mode returns only label keys — smaller and easier to aggregate.

## `summaryGroupField` (type: `string`):

Field in your dataset that identifies the product (e.g. `productId`, `productName`, `placeId`). The run then saves a REPORT record with, per product: complaint rate and complaint mix, sentiment shares, purchase motives, average rating and 3 example complaints. Leave empty to detect it automatically (overall summary only if none is found). No extra charge.

## `maxItems` (type: `integer`):

Classify at most this many reviews (0 = all).

## `maxConcurrency` (type: `integer`):

Reviews classified in parallel.

## `healthCheck` (type: `boolean`):

Internal: fail the run when results look degraded (used by the developer's scheduled checks).

## Actor input object example

```json
{
  "texts": [
    "El paquete llegó aplastado y uno de los auriculares no funciona.",
    "Siempre lo compro, excelente calidad. ¡Lo volvería a comprar!"
  ],
  "extraTextFields": [],
  "idFields": [],
  "customLabels": [],
  "complaintThreshold": 0.5,
  "outputMode": "full",
  "maxItems": 0,
  "maxConcurrency": 10,
  "healthCheck": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `report` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "texts": [
        "El paquete llegó aplastado y uno de los auriculares no funciona.",
        "Siempre lo compro, excelente calidad. ¡Lo volvería a comprar!"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leoworks/spanish-review-classifier").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "texts": [
        "El paquete llegó aplastado y uno de los auriculares no funciona.",
        "Siempre lo compro, excelente calidad. ¡Lo volvería a comprar!",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("leoworks/spanish-review-classifier").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "texts": [
    "El paquete llegó aplastado y uno de los auriculares no funciona.",
    "Siempre lo compro, excelente calidad. ¡Lo volvería a comprar!"
  ]
}' |
apify call leoworks/spanish-review-classifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,leoworks/spanish-review-classifier"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vGtYXEvmUI20LWCso/builds/q0MVvsAnyLpNYeyw0/openapi.json
