# Apparel Product Review Issue & Trend Analyzer (`davidlee2026/my-actor`) Actor

Find recurring sizing, fabric, durability, delivery, and description problems in authorized English apparel reviews. Get per-product counts, cautious time-window trends, spreadsheet-safe CSV, and exact source quotes for every finding. Bring your own Tencent TokenHub key; no scraping is performed.

- **URL**: https://apify.com/davidlee2026/my-actor.md
- **Developed by:** [david lee](https://apify.com/davidlee2026) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 76.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 review analysis reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Apparel Product Review Issue & Trend Analyzer

Turn authorized English apparel reviews into six-topic issue counts with exact source quotes, per-product shares, and cautious time-window comparisons. This public Actor analyzes supplied text; it does not scrape websites or discover customers. It charges $0.03 for each successfully completed review-analysis report. Store availability and technical tests do not prove paid demand or profitability.

### Features and scope

Semantic mode uses glm-5.3-flash through Tencent Cloud TokenHub's Guangzhou pay-as-you-go endpoint. Topics: sizing too small/large, disliked material, actual damage or care-related deterioration, delivery problems, and factual description mismatches. Price, style, and unflattering shape are outside this taxonomy. Rating alone never establishes a complaint.

Findings include product, topic, mentions, shareOfReviews, lowRatingMentions, periodReviewCounts, periodMentions, periodRates, rateChangePercentagePoints, trend, and up to three exact evidence objects. The complete JSON also contains summary, engine, version, asOf, limitations, and modelAccounting. REPORT.csv provides a spreadsheet-safe summary.

### Quick start

1. Supply authorized English review objects with text or body, not both. Optional fields: id, product, rating (1-5), and ISO date. Remove personal information first.
2. The default rules mode is a key-free smoke test using synthetic example input. For AI analysis, choose semantic and provide your Guangzhou TokenHub pay-as-you-go key in the encrypted tokenhubApiKey field. Never put keys inside reviews. Rules mode is a limited offline diagnostic, not equivalent AI analysis.
3. Set windowDays from 1 to 365 (default 30); optionally set asOf for reproducibility.
4. Read the dataset, complete OUTPUT JSON, or REPORT.csv.

Example, no key needed:

```
{"mode":"rules","reviews":[
  {"id":"demo-1","product":"Demo shirt","text":"Too small across the shoulders.","rating":2},
  {"id":"demo-2","product":"Demo shirt","text":"Perfect fit and comfortable fabric.","rating":5}
]}
```

### Limits, costs, and failures

Maximum 500 submitted records, 100 unique reviews, and 30,000 unique text characters per run; each review text is limited to 6,000 characters. Identical normalized text is deduplicated within each product. Unknown input fields and caller-supplied URLs or endpoints are rejected. No browser, shell, remote tools, or arbitrary URL fetching are used.

Semantic mode batches 20 reviews, caps output at 4,000 tokens per request, and preflights the run against an estimated CNY 0.20 model budget. This estimate is not a provider-enforced hard cap. Requests are sequential, with no automatic model retries or silent rules fallback. A network failure, incomplete output, unsupported label, or ungrounded quote fails the run; requests already sent can still cost money.

Customers bring their own key and pay Tencent model fees directly. The public Store price is one $0.03 review-analysis event per successfully completed report. Apify platform usage, storage, transfer, and external model fees are separate according to the customer's accounts and plans. Before any model request, the Actor requires PAY_PER_EVENT pricing with review-analysis at no more than $0.05. It requests exactly one developer charge only after OUTPUT and REPORT.csv exist, records billing intent before charging, uses the Apify run ID for idempotency, and withholds dataset publication if charging is unconfirmed. An unresolved pending intent blocks retry charging until manual reconciliation. Invalid-input tests completed with no developer charge. Reported model cost is an estimate, not a verified invoice or total bill.

Public runs require BYOK. Creator environment-key fallback is blocked whenever the Actor is public or the runner is not its owner; no creator key is required for public operation.

### Quality and privacy

A diagnostic evaluation of 60 public historical reviews produced 55 exact matches, 95.1% micro precision, and 92.9% recall after case-only evidence alignment. This was not independent human validation, a production guarantee, or a complaint-prevalence estimate.

Common emails, phone patterns, and sk-style keys are redacted before model calls and reports, but this is not comprehensive PII removal. Raw input remains subject to Apify storage behavior; sanitized text is sent to Tencent Cloud. Submit only lawful, authorized text without unnecessary sensitive information. Exact evidence proves grounding, not classification correctness. Do not profile individual reviewers.

Trends require ten dated reviews in each comparison window and four issue mentions. Missing, invalid, or future dates cannot establish trends. Shares use all unique product reviews. These are descriptive signals, not significance tests or causal conclusions.

### Troubleshooting and development

For failures, check Guangzhou key access, model availability, balance or quota, restart settings, and the safe error record. No alternate model is selected silently. On interruption, the handler attempts to write ABORT_STATUS and prevent further batches, but a direct platform abort can terminate the container first and an in-flight request can still cost money. No background scheduler, outreach, customer acquisition, or payout automation is configured.

Core offline tests: Python 3.11+, python3 -m unittest discover -v. Runtime dependencies are in requirements.txt; Docker entry point is main.py. Standalone analyzer.py is only the rules diagnostic. Verify the current run estimate and Store pricing before starting.

# Actor input Schema

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

Up to 100 unique English reviews and 30000 characters per run; max 6000 per review. text or body, optional product, rating, date and id. Authorized text only; remove personal data.

## `mode` (type: `string`):

Rules is the key-free default for smoke tests. Choose semantic and provide your TokenHub key for AI analysis; rules is not equivalent AI analysis.

## `tokenhubApiKey` (type: `string`):

Required for semantic mode; not needed for the rules smoke test. Bring your own Guangzhou TokenHub pay-as-you-go key and your account pays model fees. Do not paste keys into reviews.

## `windowDays` (type: `integer`):

Recent and preceding equal-duration windows. At least 10 dated reviews per window are required for a trend.

## `asOf` (type: `string`):

Omit for current UTC time. Set for reproducible tests.

## Actor input object example

```json
{
  "reviews": [
    {
      "id": "synthetic-1",
      "product": "Demo shirt",
      "text": "Too small across the shoulders.",
      "rating": 2
    },
    {
      "id": "synthetic-2",
      "product": "Demo shirt",
      "text": "Not too small. Fits perfectly.",
      "rating": 5
    }
  ],
  "mode": "rules",
  "tokenhubApiKey": "",
  "windowDays": 30,
  "asOf": ""
}
```

# Actor output Schema

## `findings` (type: `string`):

No description

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

No description

## `csv` (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 = {
    "reviews": [
        {
            "id": "synthetic-1",
            "product": "Demo shirt",
            "text": "Too small across the shoulders.",
            "rating": 2
        },
        {
            "id": "synthetic-2",
            "product": "Demo shirt",
            "text": "Not too small. Fits perfectly.",
            "rating": 5
        }
    ],
    "tokenhubApiKey": "",
    "asOf": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("davidlee2026/my-actor").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 = {
    "reviews": [
        {
            "id": "synthetic-1",
            "product": "Demo shirt",
            "text": "Too small across the shoulders.",
            "rating": 2,
        },
        {
            "id": "synthetic-2",
            "product": "Demo shirt",
            "text": "Not too small. Fits perfectly.",
            "rating": 5,
        },
    ],
    "tokenhubApiKey": "",
    "asOf": "",
}

# Run the Actor and wait for it to finish
run = client.actor("davidlee2026/my-actor").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 '{
  "reviews": [
    {
      "id": "synthetic-1",
      "product": "Demo shirt",
      "text": "Too small across the shoulders.",
      "rating": 2
    },
    {
      "id": "synthetic-2",
      "product": "Demo shirt",
      "text": "Not too small. Fits perfectly.",
      "rating": 5
    }
  ],
  "tokenhubApiKey": "",
  "asOf": ""
}' |
apify call davidlee2026/my-actor --silent --output-dataset

```

## MCP server setup

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

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/di9anI0lwcSfL4tAd/builds/9ixW4wWbhpRAan3Ii/openapi.json
