# Industry Review Complaint Analyzer | Dental & Restaurant AI (`riad_h/industry-review-complaint-analyzer`) Actor

Turn customer reviews into actionable business intelligence. Find industry-specific complaints, rank problems by priority, and generate recommendations.

- **URL**: https://apify.com/riad\_h/industry-review-complaint-analyzer.md
- **Developed by:** [Riad Hossain](https://apify.com/riad_h) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **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 usage examples, see the [API](#api) section below.

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

# README

## Industry Review Complaint Analyzer | Dental & Restaurant AI

> Turn customer reviews into actionable business intelligence. Find the problems customers mention most, rank them by priority, and get evidence-based recommendations.

### The Problem This Solves

Businesses can have hundreds or thousands of reviews. Reading them manually is slow. Generic sentiment analysis only tells you "70% positive, 30% negative" — which isn't actionable.

**This Actor answers the real questions:**

- What are customers complaining about?
- How frequently does each problem occur?
- How serious is each problem?
- What should the business prioritize?
- What actions should the business take?

### Who Is It For?

- **Dental clinic owners** — identify operational issues before they hurt your reputation
- **Restaurant managers** — pinpoint food quality, service, and ambience problems
- **Marketing agencies** — provide actionable review analysis to your clients
- **Business consultants** — use data-driven insights for operational audits
- **Reputation management firms** — go beyond sentiment to specific complaint categories

### How It Works

```
Customer Reviews
       ↓
Cleaning & Validation
       ↓
Duplicate Detection
       ↓
Industry-Specific Classification (12-13 categories per industry)
       ↓
Sentiment Analysis (keyword + rating augmented)
       ↓
Priority Calculation (frequency × severity × rating)
       ↓
Recommendation Generation (evidence-based)
       ↓
Structured JSON Output
```

The Actor uses a **hybrid deterministic architecture** — keyword-based industry classification with no external LLM API calls. This means:

- **Zero AI API costs** (deterministic analysis)
- **Sub-millisecond per-review processing** (0.23ms/review)
- **Explainable results** (every detection is traceable to keywords)
- **Consistent output** (no LLM hallucination risk)

### Supported Industries

#### Dental Clinics (12 categories)

| Category | What it detects |
|----------|----------------|
| `waiting_time` | Long waits, delays, waiting room complaints |
| `appointment_availability` | Booking difficulty, no availability |
| `treatment_cost` | Expensive, overpriced, insurance issues |
| `unexpected_cost` | Hidden fees, surprise charges |
| `pain_discomfort` | Pain, soreness, sensitivity, swelling |
| `dentist_communication` | Explanation quality, rushed, didn't listen |
| `staff_behavior` | Rude receptionist, friendly staff, professional |
| `cleanliness` | Clean/dirty, hygienic, spotless |
| `treatment_quality` | Filling/crown quality, procedure outcomes |
| `billing_problem` | Overcharged, claim denied, wrong amount |
| `booking_problem` | Online system issues, no reminders |
| `location_parking` | Hard to find, no parking, inconvenient |

#### Restaurants (13 categories)

| Category | What it detects |
|----------|----------------|
| `food_quality` | Delicious, bland, fresh, stale |
| `food_temperature` | Cold food, not hot, reheated |
| `food_portion` | Small portions, generous, tiny |
| `food_price` | Overpriced, affordable, good value |
| `waiting_time` | Slow service, long wait, quick |
| `staff_behavior` | Rude waiter, friendly server, attentive |
| `customer_service` | Complaint handling, manager response |
| `cleanliness` | Dirty tables, filthy bathroom, spotless |
| `delivery` | Late delivery, cold on arrival, missing items |
| `order_accuracy` | Wrong order, missing dishes, mixed up |
| `menu_availability` | Out of stock, sold out, unavailable |
| `ambience` | Loud, noisy, cozy, romantic |
| `parking_location` | No parking, hard to find, convenient |

### Input

```json
{
  "industry": "dental",
  "reviews": [
    {
      "text": "I waited for an hour and the staff were rude. The dentist was good though.",
      "rating": 2
    },
    {
      "text": "Excellent service, very clean and professional.",
      "rating": 5
    }
  ],
  "businessName": "Smile Dental Clinic",
  "analysisMode": "balanced",
  "includeRecommendations": true
}
```

#### Required fields

| Field | Type | Description |
|-------|------|-------------|
| `industry` | string | `"dental"` or `"restaurant"` |
| `reviews` | array | List of review objects with `text` (required) and `rating` (optional, 0-5) |

#### Optional fields

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `businessName` | string | — | Business name for the report |
| `language` | string | `"en"` | Language code |
| `analysisMode` | string | `"balanced"` | `fast`, `balanced`, or `deep` |
| `includeRecommendations` | boolean | `true` | Generate actionable recommendations |

### Output

The Actor pushes two types of items to the dataset:

#### 1. Summary item (first row)

```json
{
  "business_name": "Smile Dental Clinic",
  "industry": "dental",
  "analysis_mode": "balanced",
  "generated_at": "2026-08-29T12:00:00Z",
  "summary": {
    "total_reviews": 200,
    "processed_reviews": 195,
    "skipped_duplicates": 3,
    "skipped_invalid": 2,
    "positive_reviews": 110,
    "neutral_reviews": 30,
    "negative_reviews": 55,
    "avg_rating": 3.8
  },
  "top_problems": [
    {
      "category": "waiting_time",
      "label": "Waiting time",
      "mentions": 42,
      "percentage": 21.5,
      "priority": "HIGH",
      "avg_rating": 2.3,
      "example_themes": ["...I waited for an hour...", "...long wait..."]
    }
  ],
  "top_positive_themes": [
    {
      "category": "treatment_quality",
      "label": "Treatment quality",
      "mentions": 88,
      "percentage": 45.1
    }
  ],
  "recommendations": [
    {
      "issue": "Waiting time",
      "category": "waiting_time",
      "priority": "HIGH",
      "recommendation": "Review appointment scheduling and staffing during peak hours. Consider implementing a patient notification system for delays.",
      "evidence": "Found in 42 review(s) (21.5% of total). Priority: HIGH. Example themes: ...I waited for an hour..., ...long wait...."
    }
  ]
}
```

#### 2. Per-review analysis items (subsequent rows)

```json
{
  "type": "review_analysis",
  "industry": "dental",
  "review": "I waited for an hour and the staff were rude.",
  "rating": 2,
  "sentiment": "negative",
  "sentiment_score": -0.65,
  "categories": ["waiting_time", "staff_behavior"],
  "confidence": 0.667
}
```

### Priority System

Each problem is assigned a priority based on:

| Factor | Weight | Description |
|--------|--------|-------------|
| Frequency | 40% | What percentage of reviews mention this problem |
| Negative sentiment | 35% | What percentage of mentions are negative |
| Rating severity | 25% | How low the average rating is for this problem |

| Priority | Score range | Meaning |
|----------|-------------|---------|
| `CRITICAL` | ≥ 0.70 | Address immediately — high frequency, very negative |
| `HIGH` | 0.50–0.69 | Significant issue affecting many customers |
| `MEDIUM` | 0.25–0.49 | Notable but manageable issue |
| `LOW` | < 0.25 | Minor issue or isolated incidents |

### Performance

| Reviews | Time | Per review |
|---------|------|-----------|
| 100 | 26ms | 0.26ms |
| 500 | 118ms | 0.24ms |
| 1,000 | 234ms | 0.23ms |

### Pricing

This Actor uses **pay-per-event** pricing:

| Event | Price | Charged when |
|-------|-------|-------------|
| `review-analyzed` | $0.002 per review | For every review successfully analyzed |

**Example costs:**

- 100 reviews = $0.20
- 1,000 reviews = $2.00
- 5,000 reviews = $10.00

This is competitive with generic sentiment analyzers ($1/1000) while providing significantly more value through industry-specific categorization, priority ranking, and recommendations.

### Use Cases

1. **Operational audits** — Identify the top 3 issues affecting a dental clinic or restaurant
2. **Competitive analysis** — Compare your review profile to competitors
3. **Customer experience optimization** — Prioritize which issues to fix first
4. **Reputation monitoring** — Track complaint categories over time
5. **Business acquisition due diligence** — Analyze a target business's reviews before buying

### Limitations

- **English only** (MVP) — keyword dictionaries are in English
- **Two industries** (MVP) — dental and restaurant; more can be added
- **No scraping** — this Actor analyzes reviews you provide; it does not scrape Google Maps or Yelp
- **Keyword-based** — uses deterministic keyword matching, not LLM inference (this is a feature: explainable, fast, and free of API costs)

### Privacy

- Your review data is processed within the Apify platform
- No data is sent to external LLM APIs
- No credentials are stored
- Results are stored in your Apify dataset

### License

MIT

# Actor input Schema

## `industry` (type: `string`):

The industry to analyze reviews for. Determines which complaint categories are detected.

## `reviews` (type: `array`):

List of customer reviews to analyze. Each review must have a 'text' field. 'rating' (0-5) is optional but improves accuracy.

## `businessName` (type: `string`):

Optional business name for the analysis report.

## `language` (type: `string`):

Language code for the reviews (default: en). Currently only English is fully supported.

## `analysisMode` (type: `string`):

Analysis depth. Fast = keyword detection only. Balanced = keyword + priority + recommendations. Deep = same as balanced in MVP.

## `includeRecommendations` (type: `boolean`):

Whether to generate actionable recommendations based on the analysis.

## Actor input object example

```json
{
  "industry": "dental",
  "reviews": [
    {
      "text": "I waited for an hour past my appointment time. The dentist was good but the staff were rude.",
      "rating": 2
    },
    {
      "text": "Excellent service, friendly staff and quick appointment. Very clean clinic.",
      "rating": 5
    },
    {
      "text": "The treatment was expensive and there were hidden fees I wasn't told about.",
      "rating": 2
    }
  ],
  "businessName": "",
  "language": "en",
  "analysisMode": "balanced",
  "includeRecommendations": true
}
```

# Actor output Schema

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

View the complete analysis: summary, top problems, recommendations, and per-review breakdown.

## `run_details` (type: `string`):

Full run metadata including input, output, and logs.

# 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 = {
    "industry": "dental",
    "reviews": [
        {
            "text": "I waited for an hour past my appointment time. The dentist was good but the staff were rude.",
            "rating": 2
        },
        {
            "text": "Excellent service, friendly staff and quick appointment. Very clean clinic.",
            "rating": 5
        },
        {
            "text": "The treatment was expensive and there were hidden fees I wasn't told about.",
            "rating": 2
        }
    ],
    "businessName": "",
    "language": "en",
    "analysisMode": "balanced",
    "includeRecommendations": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("riad_h/industry-review-complaint-analyzer").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 = {
    "industry": "dental",
    "reviews": [
        {
            "text": "I waited for an hour past my appointment time. The dentist was good but the staff were rude.",
            "rating": 2,
        },
        {
            "text": "Excellent service, friendly staff and quick appointment. Very clean clinic.",
            "rating": 5,
        },
        {
            "text": "The treatment was expensive and there were hidden fees I wasn't told about.",
            "rating": 2,
        },
    ],
    "businessName": "",
    "language": "en",
    "analysisMode": "balanced",
    "includeRecommendations": True,
}

# Run the Actor and wait for it to finish
run = client.actor("riad_h/industry-review-complaint-analyzer").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 '{
  "industry": "dental",
  "reviews": [
    {
      "text": "I waited for an hour past my appointment time. The dentist was good but the staff were rude.",
      "rating": 2
    },
    {
      "text": "Excellent service, friendly staff and quick appointment. Very clean clinic.",
      "rating": 5
    },
    {
      "text": "The treatment was expensive and there were hidden fees I wasn'\''t told about.",
      "rating": 2
    }
  ],
  "businessName": "",
  "language": "en",
  "analysisMode": "balanced",
  "includeRecommendations": true
}' |
apify call riad_h/industry-review-complaint-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,riad_h/industry-review-complaint-analyzer"
        }
    }
}

```

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/JsXjrDtz7NaQvfHLS/builds/SIdnASl5odkXmvecV/openapi.json
