{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify App Opportunity Finder",
    "description": "Find Shopify app opportunities from up to 20 apps and 120 public reviews by default, with scores, suggested products, and evidence URLs.",
    "version": "0.1",
    "x-build-id": "4a7ZSNjlAuQgA57Yh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalflow_studio~shopify-app-opportunity-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalflow_studio-shopify-app-opportunity-finder",
        "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/signalflow_studio~shopify-app-opportunity-finder/runs": {
      "post": {
        "operationId": "runs-sync-signalflow_studio-shopify-app-opportunity-finder",
        "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/signalflow_studio~shopify-app-opportunity-finder/run-sync": {
      "post": {
        "operationId": "run-sync-signalflow_studio-shopify-app-opportunity-finder",
        "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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Shopify App Store search queries. These control what data is collected. If empty and no direct app URLs are provided, the Actor derives queries from Analysis goal and Market.",
            "items": {
              "type": "string"
            }
          },
          "appUrls": {
            "title": "Direct app URLs",
            "type": "array",
            "description": "Optional Shopify App Store app URLs to analyze directly. Direct URLs take priority over generated search queries.",
            "items": {
              "type": "string"
            }
          },
          "maxApps": {
            "title": "Max apps",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum Shopify apps to analyze. Default is 20; hard-capped at 50.",
            "default": 20
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Fetch public merchant reviews as evidence. Reviews improve opportunity quality but can increase runtime.",
            "default": true
          },
          "reviewRatings": {
            "title": "Review ratings",
            "type": "array",
            "description": "Review ratings to fetch. Low ratings usually contain the strongest product-gap signals.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            },
            "default": [
              "1",
              "2",
              "3"
            ]
          },
          "analysisGoal": {
            "title": "Analysis goal",
            "type": "string",
            "description": "Goal for the report and optional BYOK AI analysis. It can help generate search queries when Search queries are empty, but explicit search queries and app URLs always control data collection."
          },
          "market": {
            "title": "Market or niche",
            "type": "string",
            "description": "Market context used for query planning and opportunity framing."
          },
          "maxOpportunities": {
            "title": "Max opportunities",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum ranked opportunities to output.",
            "default": 10
          },
          "minScore": {
            "title": "Minimum opportunity score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only output opportunities at or above this score.",
            "default": 35
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "none",
              "deepseek",
              "openai",
              "openrouter",
              "anthropic",
              "gemini",
              "custom_openai_compatible"
            ],
            "type": "string",
            "description": "Optional BYOK AI provider. Rules-based analysis always runs first and does not require an AI key.",
            "default": "none"
          },
          "aiMode": {
            "title": "AI mode",
            "enum": [
              "off",
              "polish",
              "cluster",
              "full"
            ],
            "type": "string",
            "description": "polish improves report wording, cluster improves opportunity framing, full does both. AI never creates opportunities without existing evidence.",
            "default": "off"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "User-provided BYOK key. Model API costs are billed by the selected AI provider to the key owner."
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Model name for the selected provider, for example deepseek-chat, gpt-4.1-mini, openai/gpt-4.1-mini, claude-3-5-haiku-latest, or gemini-2.0-flash."
          },
          "aiBaseUrl": {
            "title": "AI base URL",
            "type": "string",
            "description": "Optional API base URL. Leave empty to use the selected provider default."
          },
          "maxAiInputChars": {
            "title": "Max AI input characters",
            "minimum": 1000,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum characters sent to the AI provider. This limits call size but is not an exact billing cap.",
            "default": 30000
          },
          "maxAiOutputTokens": {
            "title": "Max AI output tokens",
            "minimum": 500,
            "maximum": 4000,
            "type": "integer",
            "description": "Maximum AI output tokens. This limits call size but is not an exact billing cap.",
            "default": 1600
          },
          "maxReviewsPerApp": {
            "title": "Max reviews per app",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum public reviews to fetch per app. Default is 8; hard-capped at 30.",
            "default": 8
          },
          "maxTotalReviews": {
            "title": "Max total reviews",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum reviews to analyze across all apps. Default is 120; hard-capped at 500.",
            "default": 120
          },
          "includeRawReviews": {
            "title": "Include raw reviews",
            "type": "boolean",
            "description": "Include raw extracted review rows in the Dataset item.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "json"
            ],
            "type": "string",
            "description": "Primary human-readable report format.",
            "default": "markdown"
          },
          "proxyType": {
            "title": "Proxy type",
            "enum": [
              "none",
              "auto",
              "residential"
            ],
            "type": "string",
            "description": "Use none for direct public HTTP requests, or auto to allow Apify proxy in cloud when needed.",
            "default": "none"
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Include fetch errors and debug counters in output.",
            "default": false
          },
          "businessQuestion": {
            "title": "Legacy business question",
            "type": "string",
            "description": "Deprecated compatibility field. Use Analysis goal instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}