{
  "openapi": "3.0.1",
  "info": {
    "title": "Hospitality Reviews AI Analyzer",
    "description": "Analyze and compare customer reviews from Google and TripAdvisor for restaurants, hotels, and tourist attractions. This Actor identifies recurring complaints, positive themes, platform-specific perception gaps, and generates a business-ready reputation report with recommended actions.",
    "version": "0.1",
    "x-build-id": "kIqP9O4KwS7py90lv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marketsignals~hospitality-reviews-ai-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marketsignals-hospitality-reviews-ai-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/marketsignals~hospitality-reviews-ai-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-marketsignals-hospitality-reviews-ai-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/marketsignals~hospitality-reviews-ai-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-marketsignals-hospitality-reviews-ai-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": {
          "businessName": {
            "title": "Business name",
            "type": "string",
            "description": "Name of the restaurant, hotel or attraction being analyzed. Used only for labelling the report."
          },
          "businessType": {
            "title": "Business type",
            "enum": [
              "restaurant",
              "hotel",
              "attraction",
              "generic"
            ],
            "type": "string",
            "description": "Type of establishment. Controls which themes are used to classify reviews.",
            "default": "generic"
          },
          "outputLanguage": {
            "title": "Output language",
            "enum": [
              "fr",
              "en",
              "es"
            ],
            "type": "string",
            "description": "Language used for the generated report and business conclusions.",
            "default": "fr"
          },
          "googleReviewsCsvUrl": {
            "title": "Google reviews CSV URL",
            "type": "string",
            "description": "Public URL to a CSV file containing Google reviews."
          },
          "tripadvisorReviewsCsvUrl": {
            "title": "TripAdvisor reviews CSV URL",
            "type": "string",
            "description": "Public URL to a CSV file containing TripAdvisor reviews."
          },
          "googleReviewsJson": {
            "title": "Google reviews (JSON)",
            "type": "array",
            "description": "Google reviews provided directly as an array of objects."
          },
          "tripadvisorReviewsJson": {
            "title": "TripAdvisor reviews (JSON)",
            "type": "array",
            "description": "TripAdvisor reviews provided directly as an array of objects."
          },
          "apifyDatasetIdGoogle": {
            "title": "Google reviews Apify dataset",
            "type": "string",
            "description": "Select an Apify dataset containing Google reviews."
          },
          "apifyDatasetIdTripadvisor": {
            "title": "TripAdvisor reviews Apify dataset",
            "type": "string",
            "description": "Select an Apify dataset containing TripAdvisor reviews."
          },
          "googleMapsUrl": {
            "title": "Google Maps URL",
            "type": "string",
            "description": "Public Google Maps URL of the establishment. When set (and no Google reviews are provided directly), reviews are scraped automatically via a specialized Apify Actor."
          },
          "tripadvisorUrl": {
            "title": "TripAdvisor URL",
            "type": "string",
            "description": "Public TripAdvisor URL of the establishment. When set (and no TripAdvisor reviews are provided directly), reviews are scraped automatically via a specialized Apify Actor."
          },
          "maxGoogleReviews": {
            "title": "Max Google reviews to scrape",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of Google reviews to request from the scraper when using automatic scraping.",
            "default": 1000
          },
          "maxTripadvisorReviews": {
            "title": "Max TripAdvisor reviews to scrape",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of TripAdvisor reviews to request from the scraper when using automatic scraping.",
            "default": 1000
          },
          "scrapingLanguage": {
            "title": "Scraping language",
            "enum": [
              "fr",
              "en",
              "es",
              "all"
            ],
            "type": "string",
            "description": "Preferred language of reviews collected via automatic scraping. Use \"all\" to collect reviews in every available language.",
            "default": "all"
          },
          "maxScrapingCostUsdPerSource": {
            "title": "Max scraping cost per source (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Optional cost cap forwarded to each child scraper run when the called Actor supports it. Helps keep automatic scraping within budget.",
            "default": 5
          },
          "maxReviewsPerSource": {
            "title": "Max reviews per source",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of reviews to analyze per source (0 = unlimited).",
            "default": 2000
          },
          "includeSuggestedReplies": {
            "title": "Include suggested replies",
            "type": "boolean",
            "description": "Generate template owner replies for the main negative themes.",
            "default": true
          },
          "includeActionPlan": {
            "title": "Include action plan",
            "type": "boolean",
            "description": "Generate a concrete list of recommended actions based on the analysis.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}