{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Store Intelligence — Catalog, Price & Stock Tracker",
    "description": "Track product launches, price changes, and stock signals across hundreds of Shopify stores. KV-checkpointed delta detection plus AI-powered store audits. Replaces Storeleads and Particl at PPE pricing.",
    "version": "1.0",
    "x-build-id": "7RyoMppBOXCeqvYWM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~shopify-store-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-shopify-store-intel",
        "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/constructive_calm~shopify-store-intel/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-shopify-store-intel",
        "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/constructive_calm~shopify-store-intel/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-shopify-store-intel",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "catalog_snapshot",
              "new_launches",
              "price_changes",
              "stock_signals",
              "store_audit"
            ],
            "type": "string",
            "description": "What to do. catalog_snapshot = full one-time product dump per store. new_launches = products published in the last N days (or new since last KV checkpoint). price_changes = variant-level price deltas vs the previous run on the same input (the Particl-killer). stock_signals = variants going in/out of stock + true inventory_quantity when exposed. store_audit = one-shot per-store report with aggregate stats and AI niche classification (BD/M&A use case).",
            "default": "catalog_snapshot"
          },
          "storeDomains": {
            "title": "Shopify store domains",
            "type": "array",
            "description": "List of Shopify store domains to scan. Accepts: allbirds.com, https://kith.com, kith.com/collections/all (path is stripped). Bare domains auto-prefix with https://. ~70-80% of Shopify stores expose /products.json publicly (their default). Stores behind WAF (Gymshark-tier) auto-fall-back to sitemap parsing — enable proxy below for best coverage.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "lookbackDays": {
            "title": "Lookback window (days) — new_launches mode",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used only by new_launches mode. Returns products with published_at within the last N days. Ignored by other modes (which use KV checkpointing instead). Default 30 days.",
            "default": 30
          },
          "deepInventoryProbe": {
            "title": "Deep inventory probe (stock_signals + store_audit)",
            "type": "boolean",
            "description": "If enabled, the actor fetches each product's individual JSON (/products/<handle>.json) to extract true inventory_quantity per variant. Adds 1 request per product (slower + more expensive) but unlocks accurate low-stock detection. When disabled, only the boolean 'available' flag is captured. Many stores don't expose inventory_quantity even with this on — depends on store config.",
            "default": false
          },
          "lowStockThreshold": {
            "title": "Low-stock threshold (stock_signals mode)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "When deepInventoryProbe is on, variants with inventory_quantity <= this threshold are flagged as low_stock. Set to 0 to only flag fully-out-of-stock items. Ignored when deep probe is disabled.",
            "default": 5
          },
          "enableAiNiche": {
            "title": "Enable Gemini AI niche classification (store_audit mode)",
            "type": "boolean",
            "description": "When enabled (default), each store_audit report runs through Gemini 2.5 Flash to extract: primary niche, secondary niches, target buyer persona, brand positioning, price tier (budget/mid/premium/luxury). Adds $0.05 per store. Auto-disabled in non-audit modes.",
            "default": true
          },
          "maxProductsPerStore": {
            "title": "Max products per store",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on products fetched per store. Big catalogs (Shein/Allbirds/large brands) can have 5,000+ products. Set this to control PPE budget per store. 0 = no cap.",
            "default": 500
          },
          "maxItems": {
            "title": "Max items (global cap)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on total dataset rows across all stores. Pagination + per-store collection stops once reached. Safety net for runaway runs.",
            "default": 5000
          },
          "concurrency": {
            "title": "Concurrent stores fetched",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Parallel HTTP fetches across stores. Shopify storefronts are bot-friendly. Default 8 is safe; increase for large prospect lists.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (recommended for big-brand stores)",
            "type": "object",
            "description": "Most Shopify stores work without proxy. Big brands (Gymshark-tier) WAF-block direct fetches — enable RESIDENTIAL proxy here for best coverage. Each proxied request fires the proxy-fetch event ($0.003). Sitemap fallback runs automatically when JSON is blocked, but residential proxy unlocks the full /products.json on these stores.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}