{
  "openapi": "3.0.1",
  "info": {
    "title": "Review Alerts & AI Reply Drafts – Google, App Store, Any Source",
    "description": "Get alerted about new bad or urgent reviews with a ready-to-post reply draft in the reviewer's language. Works with Google Maps, Trustpilot or any review scraper (as an integration), App Store reviews built in. Sends to Slack, Discord, Telegram, email or a webhook.",
    "version": "0.1",
    "x-build-id": "Pl2NHJ8JyAhCYqdtj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yck69~review-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yck69-review-alerts",
        "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/yck69~review-alerts/runs": {
      "post": {
        "operationId": "runs-sync-yck69-review-alerts",
        "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/yck69~review-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-yck69-review-alerts",
        "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": {
          "appStoreApps": {
            "title": "App Store apps",
            "type": "array",
            "description": "App Store links, IDs or names. Their newest reviews are read on each run.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "App Store countries",
            "type": "array",
            "description": "Two-letter store codes (us, gb, fr…). Empty: the country in the link, else us.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Reviews from an Apify dataset",
            "type": "array",
            "description": "Dataset IDs of any review scraper (Google Maps, Trustpilot, Booking, Tripadvisor…). Easier: add this Actor as an integration of the scraper, see the README.",
            "items": {
              "type": "string"
            }
          },
          "fileUrls": {
            "title": "Review files (URLs)",
            "type": "array",
            "description": "CSV, JSON or JSON Lines exports with one review per row.",
            "items": {
              "type": "string"
            }
          },
          "fieldMapping": {
            "title": "Field mapping",
            "type": "object",
            "description": "Only if detection picks the wrong fields: {\"text\": \"reviewBody\", \"rating\": \"stars\", \"date\": \"publishedAtDate\", \"author\": \"name\", \"ownerReply\": \"responseFromOwnerText\"}."
          },
          "businessName": {
            "title": "Business name",
            "type": "string",
            "description": "Used in alerts and replies."
          },
          "businessType": {
            "title": "Business type",
            "enum": [
              "local",
              "online",
              "app"
            ],
            "type": "string",
            "description": "Adapts the wording of replies.",
            "default": "local"
          },
          "contactInfo": {
            "title": "Contact for unhappy customers",
            "type": "string",
            "description": "Email, phone or page given in replies to complaints, e.g. support@yourshop.com."
          },
          "signature": {
            "title": "Signature",
            "type": "string",
            "description": "Ends each reply, e.g. \"Claire, owner\"."
          },
          "replyTone": {
            "title": "Tone (AI replies)",
            "enum": [
              "warm",
              "professional",
              "brief"
            ],
            "type": "string",
            "description": "Style of AI-written replies.",
            "default": "warm"
          },
          "replyLanguage": {
            "title": "Reply language",
            "enum": [
              "auto",
              "en",
              "fr",
              "de",
              "es",
              "it",
              "pt",
              "nl"
            ],
            "type": "string",
            "description": "Without AI, replies are written in English, French, German or Spanish.",
            "default": "auto"
          },
          "replyGuidelines": {
            "title": "Guidelines for AI replies",
            "type": "string",
            "description": "Anything the AI should know: opening hours, how refunds work, what never to say…"
          },
          "alertOn": {
            "title": "Alert on",
            "enum": [
              "negative",
              "urgent",
              "all"
            ],
            "type": "string",
            "description": "Which new reviews trigger an alert.",
            "default": "negative"
          },
          "maxRating": {
            "title": "Bad review = this many stars or fewer",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "With \"Bad and urgent reviews\".",
            "default": 3
          },
          "skipAnswered": {
            "title": "Skip reviews already answered",
            "type": "boolean",
            "description": "When the source includes the owner's reply.",
            "default": true
          },
          "firstRunDays": {
            "title": "First run: alert on the last (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "On the very first run, older reviews are only remembered, so you are not flooded.",
            "default": 7
          },
          "maxReviewsPerSource": {
            "title": "Reviews read per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Newest reviews read from each app or dataset per run.",
            "default": 200
          },
          "alertName": {
            "title": "Alert name",
            "type": "string",
            "description": "Separate memory per alert. Defaults to one per set of sources."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack → Apps → Incoming Webhooks."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Channel settings → Integrations → Webhooks."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "From @BotFather."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Your chat or group ID (send a message to your bot, then open api.telegram.org/bot<token>/getUpdates)."
          },
          "emailTo": {
            "title": "Email to",
            "type": "string",
            "description": "One email per run with all alerts, sent with Apify's free Send Email Actor. Several addresses: comma-separated."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Receives {\"alerts\": [...]} as JSON: for Zapier, Make, n8n or your own system."
          },
          "aiProvider": {
            "title": "AI",
            "enum": [
              "none",
              "apify",
              "anthropic"
            ],
            "type": "string",
            "description": "An AI model writes a tailored reply and a one-line summary for each alert, in the reviewer's language. Apify AI bills the model's list price on paid Apify plans (about 10 times more on the free plan): with the default Claude Opus 5.5 under a cent per review, far less with anthropic/claude-haiku-5.5.",
            "default": "none"
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Used only with the Anthropic option."
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Default: Claude Opus 5.5 (anthropic/claude-opus-5.5 with Apify AI, claude-opus-5-5 with your key)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}