{
  "openapi": "3.0.1",
  "info": {
    "title": "App Review Pain Miner - AI Product Intelligence from Reviews",
    "description": "Mine app store reviews to uncover user pain points, feature requests, and sentiment. AI-powered product intelligence from real customer feedback.",
    "version": "0.1",
    "x-build-id": "9aAkaTg4dpjUcLo5E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/george.the.developer~app-review-pain-miner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-george.the.developer-app-review-pain-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/george.the.developer~app-review-pain-miner/runs": {
      "post": {
        "operationId": "runs-sync-george.the.developer-app-review-pain-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/george.the.developer~app-review-pain-miner/run-sync": {
      "post": {
        "operationId": "run-sync-george.the.developer-app-review-pain-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",
        "properties": {
          "analysisMode": {
            "title": "Analysis Mode",
            "enum": [
              "fast",
              "balanced",
              "deep"
            ],
            "type": "string",
            "description": "Controls review cap and clustering thresholds.",
            "default": "balanced"
          },
          "provider": {
            "title": "Narrative Provider",
            "enum": [
              "none",
              "openai",
              "openrouter",
              "gemini",
              "groq"
            ],
            "type": "string",
            "description": "Optional BYOK provider used only for narrative polishing.",
            "default": "none"
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Optional model override for the selected provider."
          },
          "providerApiKey": {
            "title": "Provider API Key",
            "type": "string",
            "description": "Optional BYOK key. Prefer env vars for production."
          },
          "providerApiKeyEnvVar": {
            "title": "API Key Env Var",
            "type": "string",
            "description": "Environment variable name containing the API key.",
            "default": ""
          },
          "providerBaseUrl": {
            "title": "Provider Base URL Override",
            "type": "string",
            "description": "Optional endpoint override (advanced)."
          },
          "fallbackToHeuristics": {
            "title": "Fallback To Heuristics",
            "type": "boolean",
            "description": "If provider setup or API calls fail, still return heuristic outputs.",
            "default": true
          },
          "analysisDate": {
            "title": "Analysis Date",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to today (UTC). Set for deterministic backfills/tests."
          },
          "maxReviews": {
            "title": "Max Reviews",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap after ingestion and dedupe.",
            "default": 300
          },
          "minClusterSize": {
            "title": "Min Cluster Size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Clusters smaller than this go to long tail.",
            "default": 2
          },
          "similarityThreshold": {
            "title": "Cluster Similarity Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Greedy clustering threshold.",
            "default": 0.34
          },
          "outputDir": {
            "title": "Output Directory",
            "type": "string",
            "description": "Local output directory for JSON artifacts.",
            "default": "output"
          },
          "includeRawReviews": {
            "title": "Include Raw Reviews",
            "type": "boolean",
            "description": "Include normalized reviews in result.json (larger output).",
            "default": false
          },
          "reviewsFile": {
            "title": "Reviews File",
            "type": "string",
            "description": "Local path to JSON / JSONL / CSV reviews file."
          },
          "reviews": {
            "title": "Inline Reviews",
            "type": "array",
            "description": "Inline review records. If not provided, the actor will return an error explaining that review data is required.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Id",
                  "description": "Id value."
                },
                "text": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Text",
                  "description": "Text value."
                },
                "title": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Title",
                  "description": "Title value."
                },
                "rating": {
                  "type": "number",
                  "title": "Rating",
                  "description": "Rating value.",
                  "editor": "number"
                },
                "date": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Date",
                  "description": "Date value."
                },
                "source": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Source",
                  "description": "Source value."
                },
                "author": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Author",
                  "description": "Author value."
                },
                "developerReply": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Developer reply",
                  "description": "Developer reply value."
                },
                "url": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Url",
                  "description": "Url value."
                }
              },
              "required": [
                "text"
              ]
            },
            "default": [
              {
                "id": "demo-001",
                "text": "The app keeps crashing when I try to sync my data. Very frustrating!",
                "rating": 1,
                "title": "Sync crashes",
                "source": "demo"
              },
              {
                "id": "demo-002",
                "text": "Login doesn't work after the latest update. Can't access my account.",
                "rating": 2,
                "title": "Login broken",
                "source": "demo"
              }
            ]
          },
          "reviewUrls": {
            "title": "Review Page Sources",
            "type": "array",
            "description": "Scrapling-backed source configs for scraping reviews from HTML pages.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Url",
                  "description": "Url value."
                },
                "sourceName": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Source name",
                  "description": "Source name value."
                },
                "limit": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5000,
                  "default": 100,
                  "title": "Limit",
                  "description": "Limit value.",
                  "editor": "number"
                },
                "containerSelector": {
                  "type": "string",
                  "description": "CSS selector for review containers.",
                  "editor": "textfield",
                  "title": "Container selector"
                },
                "textSelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Text selector",
                  "description": "Text selector value."
                },
                "titleSelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Title selector",
                  "description": "Title selector value."
                },
                "ratingSelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Rating selector",
                  "description": "Rating selector value."
                },
                "ratingAttr": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Rating attr",
                  "description": "Rating attr value."
                },
                "dateSelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Date selector",
                  "description": "Date selector value."
                },
                "authorSelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Author selector",
                  "description": "Author selector value."
                },
                "developerReplySelector": {
                  "type": "string",
                  "editor": "textfield",
                  "title": "Developer reply selector",
                  "description": "Developer reply selector value."
                }
              },
              "required": [
                "url",
                "containerSelector",
                "textSelector"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}