{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Complaint Miner: App Store & Google Play Reviews",
    "description": "Turn competitor reviews from the App Store, Google Play, Chrome Web Store and Hacker News into ranked complaint themes, feature requests and short quotes with links. Reviewer names removed. Offline analysis or your own LLM key.",
    "version": "0.1",
    "x-build-id": "E9pDlv1wjrnScpz79"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/damodaran_dhanuauraman~competitor-complaint-miner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-damodaran_dhanuauraman-competitor-complaint-miner",
        "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/damodaran_dhanuauraman~competitor-complaint-miner/runs": {
      "post": {
        "operationId": "runs-sync-damodaran_dhanuauraman-competitor-complaint-miner",
        "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/damodaran_dhanuauraman~competitor-complaint-miner/run-sync": {
      "post": {
        "operationId": "run-sync-damodaran_dhanuauraman-competitor-complaint-miner",
        "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",
        "required": [
          "competitors"
        ],
        "properties": {
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One competitor per line: a name, a pipe, then one or more sources separated by commas. Sources can be store URLs or short prefixes: App Store URL or appstore:<app id>; Google Play URL or play:<package>; Chrome Web Store URL or cws:<extension id>; Trustpilot URL or trustpilot:<domain>; Hacker News search with hn:<term>. Example: \"Todoist | https://apps.apple.com/us/app/todoist-to-do-list-planner/id572688855, play:com.todoist, hn:Todoist\". A single URL without a name also works. G2 and Capterra are not supported.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerCompetitor": {
            "title": "Max reviews per competitor",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Reviews to collect per competitor, split across its sources. One insight report covers up to 500 reviews.",
            "default": 200
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Lowest star rating to include (1-5). Hacker News has no stars and is not filtered by rating.",
            "default": 1
          },
          "maxRating": {
            "title": "Maximum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Highest star rating to include. The default 3 focuses on complaints (1-3 stars). Use 5 to include all reviews.",
            "default": 3
          },
          "dateFrom": {
            "title": "Reviews from (optional)",
            "type": "string",
            "description": "Only reviews on or after this date. Use YYYY-MM-DD or a relative value like \"90 days\", \"6 months\", \"1 year\"."
          },
          "dateTo": {
            "title": "Reviews until (optional)",
            "type": "string",
            "description": "Only reviews on or before this date (YYYY-MM-DD)."
          },
          "language": {
            "title": "Language (optional)",
            "type": "string",
            "description": "Two-letter language code, e.g. en, de, fr. Used by Google Play and the Chrome Web Store, and as a Trustpilot filter. Leave empty for English on Google Play/Chrome and all languages on Trustpilot."
          },
          "country": {
            "title": "Store country",
            "type": "string",
            "description": "Two-letter country code for the App Store and Google Play, e.g. us, gb, in, de. An App Store URL with a country overrides this.",
            "default": "us"
          },
          "analysisMode": {
            "title": "Analysis mode",
            "enum": [
              "offline",
              "llm"
            ],
            "type": "string",
            "description": "offline (default, free of any AI cost): keyword lexicon, phrase clustering and rating-based sentiment. llm: your own LLM API key groups the complaints; counts and quotes still come from the real reviews. Falls back to offline if the LLM call fails.",
            "default": "offline"
          },
          "llmProvider": {
            "title": "LLM provider (LLM mode only)",
            "enum": [
              "openai",
              "anthropic",
              "gemini",
              "xai",
              "openrouter"
            ],
            "type": "string",
            "description": "Which API your key is for.",
            "default": "openai"
          },
          "llmApiKey": {
            "title": "Your LLM API key (LLM mode only)",
            "type": "string",
            "description": "Your own key. Used only for this run to send up to 150 review snippets per competitor to your provider. Never logged or written to the output. Your provider bills you for this usage."
          },
          "llmModel": {
            "title": "LLM model (optional)",
            "type": "string",
            "description": "Defaults: openai gpt-4.1-mini, anthropic claude-haiku-4-5, gemini gemini-2.5-flash, xai grok-4.7, openrouter openai/gpt-4.1-mini."
          },
          "includeReviewRows": {
            "title": "Include review rows in the dataset",
            "type": "boolean",
            "description": "When off, only the insight reports are saved, and you pay only for the reports (no per-review charge).",
            "default": true
          },
          "hnComplaintsOnly": {
            "title": "Hacker News: complaints only",
            "type": "boolean",
            "description": "Keep only Hacker News comments where complaint or feature-request words appear next to the term. Turn off to keep every mention.",
            "default": true
          },
          "maxQuotesPerTheme": {
            "title": "Quotes per theme",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Short quotes (max 200 characters, with links) shown for each complaint theme.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}