{
  "openapi": "3.0.1",
  "info": {
    "title": "Review Analyzer API — Sentiment, Topics & Complaints",
    "description": "Analyze customer reviews in bulk: sentiment, topics praised or criticized, complaint severity and unanswered complaints, with a summary per business. Works on any Google Maps, Trustpilot or Tripadvisor reviews dataset. Pay per review.",
    "version": "0.1",
    "x-build-id": "83IFmsFS2P0q0WkwG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sherwood~review-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sherwood-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/sherwood~review-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-sherwood-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/sherwood~review-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-sherwood-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": {
          "reviews": {
            "title": "Reviews",
            "type": "array",
            "description": "Reviews to analyze: plain strings, or objects with text and optionally rating, date, placeName, category and reviewUrl. Reviews of several businesses are grouped by placeId or placeName. For the output of a scraper run, use datasetId instead.",
            "default": [
              {
                "text": "Lovely dinner, the duck was perfect and the staff were warm. We will come back.",
                "rating": 5,
                "placeName": "Sample Bistro",
                "category": "Restaurant"
              },
              {
                "text": "Food was good but we waited 50 minutes for our mains and nobody apologized.",
                "rating": 3,
                "placeName": "Sample Bistro",
                "category": "Restaurant"
              },
              {
                "text": "Overpriced for tiny portions. Our table next to the door was freezing.",
                "rating": 2,
                "placeName": "Sample Bistro",
                "category": "Restaurant"
              },
              {
                "text": "Found a hair in my salad and the waiter just shrugged. Never again.",
                "rating": 1,
                "placeName": "Sample Bistro",
                "category": "Restaurant"
              },
              {
                "text": "Great wine list and a cozy atmosphere, a bit noisy on Friday night.",
                "rating": 4,
                "placeName": "Sample Bistro",
                "category": "Restaurant"
              }
            ]
          },
          "datasetId": {
            "title": "Dataset with the reviews (instead of the list)",
            "type": "string",
            "description": "Read the reviews from an Apify dataset, for example the output of a Google Maps, Trustpilot or Tripadvisor reviews scraper. Text, rating, date, owner reply and business are detected automatically. When this Actor runs as an integration after a scraper, leave it empty: the dataset of the run that triggered it is used. The sample reviews are ignored when a dataset is given."
          },
          "textField": {
            "title": "Review text field",
            "type": "string",
            "description": "Field holding the review text, dots for nested fields (default: text, reviewText, reviewBody, review, content...)."
          },
          "ratingField": {
            "title": "Rating field",
            "type": "string",
            "description": "Field holding the rating (default: stars, rating, reviewRating, ratingValue). Ratings out of 10 or 50 are converted to 5."
          },
          "dateField": {
            "title": "Date field",
            "type": "string",
            "description": "Field holding the publication date (default: publishedAtDate, publishedAt, datePublished, date)."
          },
          "replyField": {
            "title": "Owner reply field",
            "type": "string",
            "description": "Field holding the business owner's reply (default: responseFromOwnerText, ownerResponse, companyReply, reply)."
          },
          "placeIdField": {
            "title": "Business ID field",
            "type": "string",
            "description": "Field used to group reviews by business (default: placeId, place.placeId, businessUnit.id, cid)."
          },
          "placeNameField": {
            "title": "Business name field",
            "type": "string",
            "description": "Field holding the business name (default: title, place.name, placeName, businessName, companyName)."
          },
          "categoryField": {
            "title": "Business category field",
            "type": "string",
            "description": "Field holding the business category, used to pick the themes (default: categoryName, categories, category)."
          },
          "businessType": {
            "title": "Business type",
            "enum": [
              "auto",
              "restaurant",
              "hotel",
              "health",
              "trades",
              "beauty",
              "professional",
              "retail",
              "generic"
            ],
            "type": "string",
            "description": "Picks the themes checked in every review. Auto detects it from each business's category or name. Restaurant: food, service, waiting time, price, atmosphere, cleanliness. Hotel: room, cleanliness, staff, location, noise, breakfast, value. Health: reception, waiting time, listening, care quality, fees, appointments. Trades: punctuality, work quality, price and quote, honesty, communication.",
            "default": "auto"
          },
          "themes": {
            "title": "Your own themes",
            "type": "array",
            "description": "Themes to check in every review instead of the default ones, optionally with a description after a colon: \"parking: parking space and access\". Each theme comes back as praised or criticized.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Max reviews per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many reviews with a text. Default 500.",
            "default": 500
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per business",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Most recent reviews kept per business. Default 100.",
            "default": 100
          },
          "includeReviewText": {
            "title": "Include the review text in the output",
            "type": "boolean",
            "description": "Copy the first 1,000 characters of each review into its result. Reviewer names are never copied.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}