{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Product & Price Monitor",
    "description": "Track prices, sales and stock across any Shopify store. Detects price changes, new and removed products between runs. Variant-level data with SKU, sale detection and discount %.",
    "version": "0.1",
    "x-build-id": "VUjiSTafSjuh9EaAf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codeclouds~shopify-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codeclouds-shopify-price-monitor",
        "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/codeclouds~shopify-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-codeclouds-shopify-price-monitor",
        "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/codeclouds~shopify-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-codeclouds-shopify-price-monitor",
        "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": [
          "stores"
        ],
        "properties": {
          "stores": {
            "title": "Store URLs",
            "type": "array",
            "description": "One or more Shopify store URLs, e.g. [\"https://www.allbirds.com\"].",
            "items": {
              "type": "string"
            }
          },
          "collections": {
            "title": "Collections",
            "type": "array",
            "description": "Limit to specific collection handles (the part after /collections/ in the URL), e.g. [\"mens-shoes\"]. Empty = full catalog.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vendor": {
            "title": "Vendor",
            "type": "string",
            "description": "Only products of this brand/vendor, e.g. \"Allbirds\"."
          },
          "productType": {
            "title": "Product Type",
            "type": "string",
            "description": "Only products of this type, e.g. \"Shoes\"."
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Product must have at least one of these tags, e.g. [\"sale\", \"new-arrival\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOnSale": {
            "title": "Only On Sale",
            "type": "boolean",
            "description": "Only products with a discount (compare-at price above current price).",
            "default": false
          },
          "onlyAvailable": {
            "title": "Only In Stock",
            "type": "boolean",
            "description": "Only variants that are currently available.",
            "default": false
          },
          "minPrice": {
            "title": "Min Price",
            "type": "integer",
            "description": "Skip variants below this price, e.g. 20."
          },
          "maxPrice": {
            "title": "Max Price",
            "type": "integer",
            "description": "Skip variants above this price, e.g. 200."
          },
          "maxProductsPerStore": {
            "title": "Max Products per Store",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap on products fetched per store (1–50000).",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor Mode",
            "type": "boolean",
            "description": "Compare against the previous run: marks records as new / price_change / removed / unchanged and fills previousPrice + priceChangePercent.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only Output Changes",
            "type": "boolean",
            "description": "In monitor mode: only output new, changed and removed items. Ideal for scheduled price alerts.",
            "default": false
          },
          "minPriceChangePercent": {
            "title": "Minimum Price Change % (noise filter)",
            "minimum": 0,
            "type": "integer",
            "description": "In monitor mode: only treat a price move as a price_change (and charge the price-alert event) if the absolute percentage change is at least this. Smaller moves are reported as unchanged instead. 0 = every price difference counts.",
            "default": 0
          },
          "notificationWebhookUrl": {
            "title": "Notification webhook URL",
            "type": "string",
            "description": "Optional: POST a compact run summary (counts + biggest price drop) to this URL at the end of the run. Convenience feature for users without their own Apify integration — same data already in RUN_SUMMARY/the dataset, no extra charge."
          },
          "trackPriceHistory": {
            "title": "Track Price History",
            "type": "boolean",
            "description": "Keeps a short price time series per variant across scheduled runs, exposed as `trend` (lowest/highest price ever seen, % change vs. the oldest retained point). New charged event trend-insight ($0.0125), only when a real multi-point comparison was possible (not on the first run for a variant).",
            "default": false
          },
          "maxHistoryPoints": {
            "title": "Max History Points per Variant",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many past price measurements to keep per variant when Track Price History is enabled. Oldest points are dropped once this cap is reached.",
            "default": 30
          },
          "crossStoreComparison": {
            "title": "Cross-Store Price Comparison",
            "type": "boolean",
            "description": "When monitoring 2+ stores, emits an extra record per SKU that appears in more than one store, naming the lowest price and which store offers it. Exact SKU match only. New charged event cross-store-comparison ($0.01), once per matched SKU.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}