{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify App Store Analyzer",
    "description": "Crawl Shopify App Store categories and get per-app listings plus niche-opportunity metrics (reviews per app, top-3 concentration, share of apps under 100 reviews).",
    "version": "1.0",
    "x-build-id": "BRqa4mUSWUuriqzKs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gaplens~shopify-app-store-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gaplens-shopify-app-store-analyzer",
        "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/gaplens~shopify-app-store-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-gaplens-shopify-app-store-analyzer",
        "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/gaplens~shopify-app-store-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-gaplens-shopify-app-store-analyzer",
        "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": {
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Shopify App Store categories to analyze. Accepts a slug (`store-management-security-legal`), a path (`/categories/store-management`) or a full URL (`https://apps.shopify.com/categories/store-design`). Leave empty to auto-discover every top-level category from https://apps.shopify.com/categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerCategory": {
            "title": "Max pages per category",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many result pages (24 apps each) to sample per category. 3 pages ≈ 72 apps, which is enough for stable concentration metrics. Higher values cost more and take longer.",
            "default": 3
          },
          "followSubcategories": {
            "title": "Follow subcategories",
            "type": "boolean",
            "description": "When a category page lists subcategories instead of apps (non-leaf page), crawl into those subcategories. Turn this off to analyze only the exact categories you supplied.",
            "default": true
          },
          "maxSubcategoryDepth": {
            "title": "Max subcategory depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "How many levels of subcategories to descend from each starting category. 0 = never descend, 2 = reach the leaf level of the Shopify taxonomy (e.g. Marketing and conversion → Social trust → Product reviews).",
            "default": 2
          },
          "includeAppDetails": {
            "title": "Include app detail pages",
            "type": "boolean",
            "description": "Also visit each app's own page to collect launch date, developer, pricing plans and category tags. This roughly multiplies the number of requests by 25, so expect a much longer run.",
            "default": false
          },
          "keywordClusters": {
            "title": "Keyword clusters",
            "type": "array",
            "description": "Optional named regular expressions used to bucket apps by theme. Each entry is `{ \"name\": \"gdpr_cookie\", \"regex\": \"gdpr|cookie|consent\" }` and is matched case-insensitively against the app name + description. Leave empty to use the built-in regulatory/compliance clusters.",
            "default": []
          },
          "useBrowser": {
            "title": "Use a real browser (Playwright)",
            "type": "boolean",
            "description": "Category pages are server-rendered HTML, so the fast HTTP crawler is the default and is what you want in almost every case. Enable this only if pages start arriving empty or blocked — it requires a build from Dockerfile.playwright (apify/actor-node-playwright-chrome).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxy servers. Datacenter proxies are usually sufficient; switch to residential if you see blocks.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel requests. Kept low on purpose to stay polite to apps.shopify.com.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many times to retry a failing page before giving up (each retry rotates the session/proxy).",
            "default": 5
          },
          "summaryDatasetName": {
            "title": "Summary dataset name",
            "type": "string",
            "description": "Name of the named dataset that receives one row of metrics per category. The same data is always written to the OUTPUT record of the default key-value store as well.",
            "default": "category-summaries"
          },
          "saveDebugHtml": {
            "title": "Save HTML when a page yields zero apps",
            "type": "boolean",
            "description": "If a listing page produces no app cards (usually a Shopify DOM change), store the raw HTML in the default key-value store under DEBUG_<category>_<page>.html so selectors can be fixed quickly.",
            "default": true
          },
          "enablePpeCharging": {
            "title": "Enable custom pay-per-event charging (advanced, off)",
            "type": "boolean",
            "description": "Leave this off. Monetization uses Apify's platform-managed events (`apify-actor-start` and `apify-default-dataset-item`), which the platform meters on its own. This switch only enables the optional custom `analyzer-run-start` / `app-record` charge calls, which would double-bill the same work while the platform-managed dataset-item price is active. Prices are always configured in the Apify Console, never in the Actor code.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}