{
  "openapi": "3.0.1",
  "info": {
    "title": "App Release Complaint Regression Monitor",
    "description": "Compare public complaint rates before and after an app release, with denominators, sample sizes, and short review examples. A rate change is a time-window association, not proof of cause.",
    "version": "0.1",
    "x-build-id": "SWtm8a631iaIor44O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~app-release-complaint-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-app-release-complaint-monitor",
        "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/plusonets~app-release-complaint-monitor/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-app-release-complaint-monitor",
        "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/plusonets~app-release-complaint-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-app-release-complaint-monitor",
        "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": {
          "appIds": {
            "title": "Google Play app IDs",
            "type": "array",
            "description": "Package names such as com.whatsapp. One analysis is run for each app, language, and country.",
            "items": {
              "type": "string"
            },
            "default": [
              "com.whatsapp"
            ]
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Google Play language codes, for example en or pt-BR. Apple's public feed is not language-scoped.",
            "items": {
              "type": "string"
            },
            "default": [
              "en"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Storefront country codes, for example us or de.",
            "items": {
              "type": "string"
            },
            "default": [
              "us"
            ]
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days of review timestamps to compare. The default splits that span into two equal windows.",
            "default": 7
          },
          "maxReviewsPerScope": {
            "title": "Max reviews per app, language, and country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Newest-first cap. A high-volume app will not cover the full lookback at a few hundred reviews. Incomplete windows do not raise alerts.",
            "default": 200
          },
          "publicationLagDays": {
            "title": "Publication lag overlap (days)",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Extra days re-read on every run so a review that appears late can still be seen. Unchanged reviews are not charged again.",
            "default": 2
          },
          "releaseDate": {
            "title": "Release date",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD) used as the split for every app that does not have its own entry in releases. The result is a time-window association, not causation."
          },
          "appVersion": {
            "title": "App version",
            "type": "string",
            "description": "Optional exact version string. Used only when the store puts that version on the review. Reviews with no version are excluded from the version split."
          },
          "releases": {
            "title": "Per-app releases",
            "type": "array",
            "description": "Optional overrides. Each item is {\"appId\", \"version\", \"releasedAt\"}.",
            "items": {
              "type": "object"
            }
          },
          "customCategories": {
            "title": "Custom keyword categories",
            "type": "array",
            "description": "Optional extra clusters. Each item is {\"name\": \"notifications\", \"keywords\": [\"notification\", \"push\"]}.",
            "items": {
              "type": "object"
            }
          },
          "minSampleSize": {
            "title": "Minimum reviews in each window",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Denominators below this size never raise an alert. The rate row is still written.",
            "default": 40
          },
          "minRateIncreasePercentagePoints": {
            "title": "Minimum rate increase (percentage points)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "5 means the complaint share must rise by at least 5 points, such as 2% to 11%.",
            "default": 5
          },
          "minRelativeIncrease": {
            "title": "Minimum relative increase",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "1 means the later rate must be at least double the earlier rate. A jump from zero uses the percentage-point rule only.",
            "default": 1
          },
          "minComplaintCount": {
            "title": "Minimum complaints in the later window",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stops a tiny cluster, such as 1 complaint, from alerting even when the rate jumps.",
            "default": 5
          },
          "maxComplaintScore": {
            "title": "Highest star rating treated as a complaint",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "At or below this score, a category keyword counts as a complaint. Higher scores count only when the text also describes a failure.",
            "default": 3
          },
          "alertOnlyOnChange": {
            "title": "Alert only when the rate changes",
            "type": "boolean",
            "description": "Skip a repeat alert when the before and after rates stayed within one percentage point of the previous run. A cleared alert is reported when the rule no longer holds.",
            "default": false
          },
          "outputMode": {
            "title": "Dataset contents",
            "enum": [
              "full",
              "alerts-only",
              "changes-only"
            ],
            "type": "string",
            "description": "full writes reviews, rates, and alerts. alerts-only omits review rows. changes-only keeps reviews, alerts, and rate rows that regressed.",
            "default": "full"
          },
          "appleAppIds": {
            "title": "Apple App Store app IDs",
            "type": "array",
            "description": "Optional numeric ids from the App Store URL. The public RSS feed returns at most about 500 recent reviews per country and is not a language feed.",
            "items": {
              "type": "string"
            }
          },
          "enableLlm": {
            "title": "Label unmatched low-star reviews with my own model key",
            "type": "boolean",
            "description": "Off by default. Keywords still run. The model is used only for low-star reviews that matched nothing, and a failure keeps the keyword result.",
            "default": false
          },
          "llmApiKey": {
            "title": "Model API key",
            "type": "string",
            "description": "Your own OpenAI-compatible key. It is not stored in the dataset. Leave empty to stay fully deterministic."
          },
          "llmBaseUrl": {
            "title": "Model base URL",
            "type": "string",
            "description": "Optional HTTPS origin, for example https://api.openai.com/v1. Private, loopback, and link-local hosts are rejected."
          },
          "llmModel": {
            "title": "Model name",
            "type": "string",
            "description": "Passed through to the model endpoint when a key is set.",
            "default": "gpt-4o-mini"
          },
          "llmMaxReviews": {
            "title": "Maximum model labels per scope",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "Caps how many unmatched low-star reviews are sent to your model on one run. Results are cached by text hash.",
            "default": 15
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that remembers review hashes and previous alerts. A failed collection does not replace a good baseline.",
            "default": "app-release-complaint-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}