{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Review Analyzer: Trustpilot, Google Maps, Amazon & More",
    "description": "Turn reviews from any scraper, CSV or JSON into insights: AI finds the top complaints, problems, requests and praise, tags every review with topics and sentiment, and writes what to fix first. Ready HTML report. No API keys needed.",
    "version": "0.0",
    "x-build-id": "V6WVGisceURH1o2hy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/macgitarra~ai-review-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-macgitarra-ai-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/macgitarra~ai-review-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-macgitarra-ai-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/macgitarra~ai-review-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-macgitarra-ai-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": {
          "datasetIds": {
            "title": "Reviews from Apify datasets",
            "maxItems": 10,
            "type": "array",
            "description": "Pick the dataset(s) of a review scraper run: Trustpilot, Google Maps, Amazon, Tripadvisor, Booking, Yelp, G2, app stores or any other. Fields are detected automatically. The Actor gets read-only access to the datasets you pick."
          },
          "fileUrl": {
            "title": "Or a link to a CSV / JSON file",
            "type": "string",
            "description": "Public link to a CSV or JSON file with reviews, e.g. a Google Sheet published as CSV (File > Share > Publish to web > CSV) or an export from your helpdesk or shop."
          },
          "reviews": {
            "title": "Or paste reviews",
            "type": "array",
            "description": "A JSON array of review objects (e.g. {\"text\": \"…\", \"rating\": 4, \"date\": \"2026-11-30\"}) or plain strings."
          },
          "context": {
            "title": "What are the reviews about?",
            "type": "string",
            "description": "Optional, helps the AI: e.g. \"our Lisbon hotel\", \"a fashion e-shop\", \"competitor's project management app\"."
          },
          "maxAnalyzedReviews": {
            "title": "Max reviews analysed by AI per group",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "AI reads the newest reviews with text, up to this number per place / company / product (10-2,000). 300-500 is usually enough to see the main topics.",
            "default": 500
          },
          "reportLanguage": {
            "title": "Report language",
            "type": "string",
            "description": "Language of the AI topics, summary and actions, e.g. English, German, Spanish, Polish. Quotes stay in their original language.",
            "default": "English"
          },
          "sinceDate": {
            "title": "Only reviews since",
            "type": "string",
            "description": "Optional. Skip reviews older than this date, e.g. 2026-10-01."
          },
          "groupByField": {
            "title": "Group by field",
            "type": "string",
            "description": "Optional. Field that names the place, company or product (dot paths like placeInfo.name work). Detected automatically: one report section per group."
          },
          "textField": {
            "title": "Text field",
            "type": "string",
            "description": "Field with the review text."
          },
          "ratingField": {
            "title": "Rating field",
            "type": "string",
            "description": "Field with the rating (stars, score)."
          },
          "dateField": {
            "title": "Date field",
            "type": "string",
            "description": "Field with the review date."
          },
          "titleField": {
            "title": "Title field",
            "type": "string",
            "description": "Field with the review title, if any."
          },
          "ratingScale": {
            "title": "Rating scale",
            "enum": [
              "auto",
              "5",
              "10",
              "100"
            ],
            "type": "string",
            "description": "Detected automatically (1-5, 1-10 like Booking, or 1-100). Ratings are converted to 1-5 stars in the report.",
            "default": "auto"
          },
          "maxGroups": {
            "title": "Max groups",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Most groups (places, companies, products) analysed in one run, largest first.",
            "default": 20
          },
          "reportTitle": {
            "title": "Report title",
            "type": "string",
            "description": "Optional title shown at the top of the HTML report."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}