{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Review Classifier — complaints & returns · $0.5/1k",
    "description": "Amazon review analysis: complaints, return reasons, praise, sentiment. products = ASINs/URLs (collected by junglee, billed to you ~$6/1k; Free plan 10 reviews/run; ~$6.5/1k all-in), or datasetId from any scraper, or texts. For AliExpress use leoworks/aliexpress-reviews-classifier.",
    "version": "0.2",
    "x-build-id": "QHSSiwnh36LWdF1Tt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leoworks~amazon-review-classifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leoworks-amazon-review-classifier",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/leoworks~amazon-review-classifier/runs": {
      "post": {
        "operationId": "runs-sync-leoworks-amazon-review-classifier",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/leoworks~amazon-review-classifier/run-sync": {
      "post": {
        "operationId": "run-sync-leoworks-amazon-review-classifier",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "products": {
            "title": "Products (collect the reviews for me) — ASINs or Amazon product URLs",
            "type": "array",
            "description": "One product per line, up to 20: the 10-character ASIN (for example B0CWXNS552) or the product page URL (…/dp/ASIN; its marketplace is taken from the URL). The Actor then collects the reviews and classifies them in the same run. Collection is done by an existing Amazon reviews scraper (a separate Actor that Apify bills to your account — about $0.006 per review for the default collector, about $0.001 for the alternative; the estimate is shown in the run log before anything is collected); this Actor adds $0.0005 per classified review. No Amazon login or cookies are used, and reviewer names and profiles are switched off. Amazon shows at most about 100 reviews per product this way. Use this OR “Reviews dataset”; if both are set the run stops.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Marketplace (for ASINs)",
            "enum": [
              "com",
              "co.uk",
              "de",
              "fr",
              "it",
              "es",
              "ca",
              "com.au",
              "co.jp",
              "in",
              "com.mx",
              "com.br",
              "nl",
              "se",
              "ae"
            ],
            "type": "string",
            "description": "Which Amazon site the ASINs in “Products” belong to. A product URL carries its own marketplace and overrides this.",
            "default": "com"
          },
          "collectReviewsPerProduct": {
            "title": "Reviews to collect per product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many reviews to collect for each product (1 to 100). You pay the collector for each one, so a lower number is cheaper; “Max reviews per product” below limits only how many are classified.",
            "default": 50
          },
          "collectSort": {
            "title": "Collect: order",
            "enum": [
              "recent",
              "helpful"
            ],
            "type": "string",
            "description": "Which reviews to collect first. Newest first is the least biased sample of what buyers say now.",
            "default": "recent"
          },
          "collector": {
            "title": "Collector (advanced)",
            "enum": [
              "junglee/amazon-reviews-scraper",
              "web_wanderer/amazon-reviews-extractor"
            ],
            "type": "string",
            "description": "The Amazon reviews scraper that collects for you. The default (junglee) returned and classified reviews in our test on amazon.com. The other is about six times cheaper but returned nothing for amazon.com in the same test — try it for other marketplaces. On the Free Apify plan, junglee returns at most 10 reviews per run (its own limit). Prices are the collectors' own and can change.",
            "default": "junglee/amazon-reviews-scraper"
          },
          "datasetId": {
            "title": "Reviews dataset",
            "type": "string",
            "description": "An Apify dataset containing Amazon reviews — for example the output of an Amazon reviews scraper. Use this OR “Products” (not both) OR “Review texts”."
          },
          "texts": {
            "title": "Review texts",
            "type": "array",
            "description": "Paste review texts directly (one per line). Use this OR “Reviews dataset”.",
            "items": {
              "type": "string"
            }
          },
          "customLabels": {
            "title": "Custom labels",
            "type": "array",
            "description": "Up to 10 extra yes/no labels (each up to 200 characters) in plain language, e.g. “mentions the battery”, “compares with another brand”. Each gets a probability.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "reviewsNewerThan": {
            "title": "Only reviews newer than",
            "type": "string",
            "description": "Classify only reviews published after this date — a date like `2026-01-01` or a period like `90 days`, `6 months`, `1 year`. Needs a review date in the dataset (e.g. `date`). Leave empty for all."
          },
          "maxStars": {
            "title": "Only reviews with at most N stars",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "For example 3 = classify only 1–3 star reviews (where complaints and returns are). 0 = all ratings. Reviews without a star rating are kept.",
            "default": 0
          },
          "verifiedOnly": {
            "title": "Verified purchases only",
            "type": "boolean",
            "description": "Skip reviews not marked as a verified purchase (needs a field such as `isVerified`).",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 0,
            "type": "integer",
            "description": "Classify at most this many reviews per product (ASIN), in dataset order. 0 = no limit.",
            "default": 0
          },
          "maxItems": {
            "title": "Max reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Classify at most this many reviews (0 = all).",
            "default": 0
          },
          "photoJudging": {
            "title": "Judge review photos (beta)",
            "enum": [
              "off",
              "complaints",
              "all"
            ],
            "type": "string",
            "description": "Adds `photoEvidence` (supports_complaint_product, supports_complaint_packaging, damage_seen_text_silent, no_evidence, not_product_photo) and puts photo-backed product defects, then photo-backed packaging damage, at the top of ACTION_QUEUE.csv. \"Only reviews with a complaint or 3 stars or fewer\" judges far fewer photos and is the recommended setting.",
            "default": "off"
          },
          "maxPhotosPerReview": {
            "title": "Photos judged per review",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "The first photos of each review. With \"All reviews that have photos\", at most 2 photos per review are judged.",
            "default": 2
          },
          "photoMaxSide": {
            "title": "Photo size",
            "minimum": 512,
            "maximum": 1024,
            "type": "integer",
            "description": "Longest side in pixels requested from the photo server (512, 768 or 1024; other values are rounded). Amazon review photos arrive as 88 px thumbnails, so a larger version is requested. Photos under 280 pixels on the short side are skipped.",
            "default": 768
          },
          "textField": {
            "title": "Text field",
            "type": "string",
            "description": "Field holding the review text. Leave empty to auto-detect (reviewDescription, reviewText, text, body, …)."
          },
          "extraTextFields": {
            "title": "Extra text fields",
            "type": "array",
            "description": "Fields to prepend to the text (up to 5). Leave empty to add the review headline automatically (reviewTitle).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "idFields": {
            "title": "ID fields to keep",
            "type": "array",
            "description": "Fields copied unchanged from each input item to the output so you can join results back (e.g. reviewId, productAsin). Leave empty to auto-pick reviewId and the product ASIN.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ratingField": {
            "title": "Star rating field",
            "type": "string",
            "description": "Leave empty to auto-detect (ratingScore, rating, stars, …)."
          },
          "dateField": {
            "title": "Review date field",
            "type": "string",
            "description": "Leave empty to auto-detect (date, reviewDate, reviewedIn, …). Used for the monthly trend, the last-90-days comparison and the date filter."
          },
          "variantField": {
            "title": "Variant field",
            "type": "string",
            "description": "Leave empty to auto-detect (variant, variantName, …). Used for the worst-variants breakdown."
          },
          "photoField": {
            "title": "Photo field",
            "type": "string",
            "description": "Field with the picture addresses of each review. Auto-detected (reviewImages, reviewImageUrls, images, imageUrls, photos); set it only if your scraper uses another name."
          },
          "complaintThreshold": {
            "title": "Complaint threshold",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "Minimum probability (0–1) for the strongest complaint type, the return-intent flag or a custom label to be reported.",
            "default": 0.5
          },
          "secondaryThreshold": {
            "title": "Second complaint threshold",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "Minimum probability (0–1) for any further complaint type after the strongest one. Product complaints overlap (a weak item can also feel uncomfortable), so side labels need to be surer. Lower it to see more labels per review.",
            "default": 0.8
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "full",
              "minimal"
            ],
            "type": "string",
            "description": "Minimal mode returns only label keys — smaller and easier to aggregate.",
            "default": "full"
          },
          "summaryGroupField": {
            "title": "Summary: group by field",
            "type": "string",
            "description": "Field in your dataset that identifies the product (e.g. `productAsin`). The run then saves a REPORT record with, per product: complaint rate and complaint mix, sentiment shares, average stars, share of reviews with a return or refund and 3 example complaints. Leave empty to detect it automatically. No extra charge."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Reviews classified in parallel.",
            "default": 10
          },
          "healthCheck": {
            "title": "Health check mode (internal)",
            "type": "boolean",
            "description": "Internal: fail the run when results look degraded (used by the developer's scheduled checks).",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}