{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Sales Tracker: Competitor Stock & Units Sold",
    "description": "Track competitor sales from exact stock counts: units sold and revenue per product, sell-outs, restocks and price changes, plus an Excel report for the last 7 and 30 days. Shopify, WooCommerce, T-Soft, ikas, IdeaSoft, OpenCart, GoldenPlanet.",
    "version": "0.5",
    "x-build-id": "3e4Zr0GtZMj5lU7KV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rivalstock~competitor-stock-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rivalstock-competitor-stock-tracker",
        "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/rivalstock~competitor-stock-tracker/runs": {
      "post": {
        "operationId": "runs-sync-rivalstock-competitor-stock-tracker",
        "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/rivalstock~competitor-stock-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-rivalstock-competitor-stock-tracker",
        "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": {
          "startUrls": {
            "title": "Competitor stores",
            "type": "array",
            "description": "Home page links of the stores to track: the whole catalog is read. A link to a category or collection page (for example /collections/best-sellers or /product-category/dresses/) reads only that category. Supported platforms: Shopify, WooCommerce, T-Soft, IdeaSoft, ikas, OpenCart, GoldenPlanet (detected automatically).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Only these categories (optional)",
            "type": "array",
            "description": "Category or collection page links: only the products of these categories are read and charged, not the whole store. Several categories of the same store can be given; a product that is in two of them is read and charged once. Get the links from your browser, or run once with \"List categories only\". Available for Shopify, WooCommerce, T-Soft, IdeaSoft and GoldenPlanet. If the store's home page is also in Competitor stores, the whole store is read.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Only these products (optional)",
            "type": "array",
            "description": "Track a fixed list of product pages instead of whole stores. Cheaper when you only care about products that compete with yours. Can be combined with categories of the same store. If a store's home page is also listed in Competitor stores, the whole store is read.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trackingId": {
            "title": "Tracker name",
            "type": "string",
            "description": "Runs with the same tracker name are compared with each other to estimate units sold. Use a different name for each independent watch list. A new or renamed tracker is compared with the latest reading of the same store, so no history is lost. The previous readings are kept in key-value stores in your own account.",
            "default": "default"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "All variants, or only variants that changed since the previous run (sold, restocked, sold out, back in stock, price change, new).",
            "default": "all"
          },
          "createReport": {
            "title": "Excel competitor report",
            "type": "boolean",
            "description": "Save a ready-to-read Excel report (REPORT in the key-value store of the run): per store units sold and revenue for the last 7 and 30 days, top sellers, best-selling categories, price changes, sell-outs, restocks and new products. Built from the history the tracker keeps between runs.",
            "default": true
          },
          "maxProductsPerStore": {
            "title": "Max products per store",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many products per store (all selected categories together). 0 = everything selected. A limited run also tells you the approximate cost of a full reading.",
            "default": 0
          },
          "countOnly": {
            "title": "Count products only",
            "type": "boolean",
            "description": "Only report how many products each store (or each selected category set) has - the number a full run reads and charges - with the approximate cost of a full reading and the platform. No product is read or charged and the tracker history is not touched; the counts are in RUN_SUMMARY of the run's key-value store.",
            "default": false
          },
          "listCategories": {
            "title": "List categories only",
            "type": "boolean",
            "description": "Only list the categories of each store (name, link and, when the store publishes it, the product count with an approximate cost of reading it). No product is read or charged and the tracker history is not touched. The list is in the run's dataset and in CATEGORIES of its key-value store; paste the links you want into \"Only these categories\".",
            "default": false
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "auto",
              "shopify",
              "woocommerce",
              "tsoft",
              "ideasoft",
              "ikas",
              "opencart",
              "goldenplanet",
              "woolwarehouse",
              "rito"
            ],
            "type": "string",
            "description": "Leave on automatic unless detection fails for a store.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many product pages are fetched at the same time. Keep it low to stay polite to the store.",
            "default": 3
          },
          "minDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum pause of each parallel worker between two requests.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Datacenter proxy is enough for most stores. Switch to residential only if pages get blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}