{
  "openapi": "3.0.1",
  "info": {
    "title": "Review Analyzer: Sentiment, Complaints, Themes & Reply Drafts",
    "description": "Returns sentiment, complaint and praise themes, verbatim quotes, urgent flags, a written report per business and optional reply drafts for reviews from any Google Maps, Trustpilot, Yelp or Amazon dataset, CSV or Google Sheet. Charged per review, report and reply. Agent-ready: x402, MCP.",
    "version": "0.1",
    "x-build-id": "QdlbjNLjJa56XsXMA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~review-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-review-analyzer",
        "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/nerolabs~review-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-review-analyzer",
        "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/nerolabs~review-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-review-analyzer",
        "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": {
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "An Apify dataset of reviews, for example the output of a Google Maps Reviews Scraper, Trustpilot, Yelp, Amazon, TripAdvisor, Booking.com or app store reviews scraper run. Every original column is kept and the analysis is added alongside. Review text, star rating, date, business and owner reply columns are found automatically. Use the picker rather than typing an ID."
          },
          "fileUrl": {
            "title": "File or Google Sheet URL",
            "type": "string",
            "description": "A public link to a CSV, TSV, Excel, JSON or JSON Lines file with one review per row (a review platform export, a survey export, a sheet of scraped reviews). A normal Google Sheets link works: share it as 'Anyone with the link can view'."
          },
          "fileFormat": {
            "title": "File format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xlsx"
            ],
            "type": "string",
            "description": "Leave on 'Detect automatically' unless the link has no file extension and the server reports the wrong content type.",
            "default": "auto"
          },
          "sheetName": {
            "title": "Excel sheet name",
            "type": "string",
            "description": "Which sheet to read from an Excel workbook. Defaults to the first sheet."
          },
          "reviewTexts": {
            "title": "Review texts",
            "type": "array",
            "description": "A plain list of reviews pasted as text, one per entry, for a quick run with no file. Use a dataset, file or Google Sheet to keep star ratings, dates and your own columns.",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "title": "Rows",
            "type": "array",
            "description": "Review rows as inline JSON, an alternative to a dataset or file. Each object needs a review text or rating field."
          },
          "businessName": {
            "title": "Business name",
            "type": "string",
            "description": "Name to use when your data has no business column (for example pasted review texts or one company's export). Reviews are grouped into one report per business; with no business column and no name they are reported together as 'All reviews'."
          },
          "output": {
            "title": "Output",
            "enum": [
              "reviews_and_reports",
              "reviews_only",
              "reports_only"
            ],
            "type": "string",
            "description": "What to return. 'Reviews and business reports' gives one analysed row per review plus one report row per business (rowType tells them apart). 'Reviews only' skips the reports. 'Business reports only' returns just the report rows; every review is still analysed and charged, because the report is built from them.",
            "default": "reviews_and_reports"
          },
          "minReviewsForReport": {
            "title": "Minimum reviews for a report",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A written business report (charged per business) is made only for businesses with at least this many reviews with text. Below it, the report row still shows the counts and averages, free.",
            "default": 5
          },
          "themes": {
            "title": "Your own themes (optional)",
            "type": "array",
            "description": "Leave empty and the AI names each complaint and praise point in a few plain words. Or give your own list (for example 'waiting time', 'staff', 'cleanliness', 'price') and every point is tagged with one of yours, so runs stay comparable month to month.",
            "items": {
              "type": "string"
            }
          },
          "replyDrafts": {
            "title": "Write reply drafts",
            "type": "boolean",
            "description": "Adds a ready-to-post owner reply to each review (charged per reply, on top of the review). Replies thank the customer, respond to their actual points, and never promise refunds, discounts or compensation, never admit fault and never invent facts. A draft that breaks a rule is rewritten once, then withheld and not charged.",
            "default": false
          },
          "replyOnlyUnanswered": {
            "title": "Only reviews the owner has not answered",
            "type": "boolean",
            "description": "Skip reviews that already have an owner reply (when the data has an owner reply column). Turn off to draft a reply for every review.",
            "default": true
          },
          "replyTone": {
            "title": "Reply tone",
            "enum": [
              "warm",
              "professional",
              "short"
            ],
            "type": "string",
            "description": "How the replies should sound.",
            "default": "warm"
          },
          "replySignOff": {
            "title": "Reply sign-off",
            "type": "string",
            "description": "Added at the end of every reply, for example 'The Riverside Cafe team' or 'Sam, Owner'. Leave empty for no sign-off."
          },
          "replyContact": {
            "title": "Contact line for unhappy customers",
            "type": "string",
            "description": "Optional line added, exactly as written, to replies to negative reviews and to mixed reviews of 3 stars or less, for example 'Please call us on 01234 567890 so we can put this right.' Without it, replies to complaints just invite the customer to get in touch, and never invent a phone number or email."
          },
          "replyLanguage": {
            "title": "Reply language",
            "type": "string",
            "description": "Leave as 'same' to reply in each review's own language, or name one language (for example 'English' or 'Spanish') for every reply.",
            "default": "same"
          },
          "textField": {
            "title": "Review text field",
            "type": "string",
            "description": "Override the detected review text column (nested fields use a dot, e.g. 'review.body'). Leave empty to detect automatically."
          },
          "ratingField": {
            "title": "Star rating field",
            "type": "string",
            "description": "Override the detected rating column. Ratings out of 5, 10 or 100 are all read as stars out of 5."
          },
          "dateField": {
            "title": "Date field",
            "type": "string",
            "description": "Override the detected review date column. Used for the 'what is changing' trend."
          },
          "businessField": {
            "title": "Business field",
            "type": "string",
            "description": "Override the detected business column (place name, company, product or app). One report is written per value."
          },
          "keepOriginalFields": {
            "title": "Keep original columns",
            "type": "boolean",
            "description": "Keep every input column next to the analysis. Turn off to return only the review text and the analysis.",
            "default": true
          },
          "exportFormats": {
            "title": "Export files",
            "type": "array",
            "description": "Also save the analysed reviews as a CSV and/or Excel file in the run's key-value store (charged per file). The readable HTML report is always saved free when reports are written.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "enumTitles": [
                "CSV",
                "Excel (xlsx)"
              ]
            }
          },
          "outputDatasetName": {
            "title": "Also append to named dataset",
            "type": "string",
            "description": "Optional name of a dataset to append every output row to, so monthly runs build one history."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional URL that receives the run summary and the business reports as JSON when the run finishes (charged per successful delivery). Works with Zapier, Make, n8n and Slack workflows."
          },
          "concurrency": {
            "title": "Parallel AI requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many batches of 20 reviews are sent to the AI at once. The default suits almost every run.",
            "default": 4
          },
          "maxItems": {
            "title": "Max reviews",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. Handy for a cheap first test on a big dataset."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}