{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Price Monitor & Repricing for Shops",
    "description": "Track competitor prices on any shop URL (Shopify, WooCommerce, JSON-LD) vs your price and cost. Get safe repricing suggestions; optional Shopify/Woo push.",
    "version": "0.2",
    "x-build-id": "U63qAGZ35qd1YuIey"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prevailing_glow~competitor-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prevailing_glow-competitor-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/prevailing_glow~competitor-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-prevailing_glow-competitor-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/prevailing_glow~competitor-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-prevailing_glow-competitor-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",
        "properties": {
          "products": {
            "title": "Products to watch",
            "type": "array",
            "description": "One object per product of yours: <code>sku</code>, <code>name</code>, <code>yourPrice</code>, <code>currency</code>, optional <code>costPrice</code> / <code>floorPrice</code> / <code>ean</code>, and <code>competitors</code> (URLs, or <code>{\"name\", \"url\"}</code> objects pointing at competitor product pages). For shop push add <code>variantId</code> (Shopify) or <code>shopProductId</code> / <code>shopVariationId</code> (WooCommerce). Leave yourPrice empty and set <code>yourUrl</code> to read your price from your own product page."
          },
          "catalogUrl": {
            "title": "Catalog feed URL (JSON or CSV)",
            "type": "string",
            "description": "Optional public URL of a JSON array of products, or a CSV (comma or semicolon) with columns <code>sku, name, yourPrice, currency, costPrice, floorPrice, yourUrl, ean, competitorName, competitorUrl</code> (one row per competitor), or wide columns <code>competitorUrl1, competitorUrl2, ...</code>. A Google Sheet published as CSV works. Combined with the products above."
          },
          "defaultCurrency": {
            "title": "Default currency",
            "type": "string",
            "description": "ISO code used for products without a currency, e.g. EUR, USD, GBP.",
            "default": "EUR"
          },
          "maxProducts": {
            "title": "Max products per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap. Products beyond this number are ignored (with a warning).",
            "default": 100
          },
          "maxCompetitorsPerProduct": {
            "title": "Max competitor pages per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Extra competitor URLs beyond this number are ignored.",
            "default": 10
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "suggest",
              "auto"
            ],
            "type": "string",
            "description": "<b>Monitor</b> reports competitor prices, gaps and changes. <b>Suggest</b> adds a guarded suggested price per product for you to approve. <b>Automatic</b> marks rule prices as ready to push; nothing is written to your shop unless you also turn on <i>Write new prices to my shop</i>.",
            "default": "suggest"
          },
          "strategy": {
            "title": "Pricing strategy",
            "enum": [
              "undercut_percent",
              "undercut_amount",
              "match_lowest",
              "premium_percent"
            ],
            "type": "string",
            "description": "Applied to the lowest comparable competitor price (same currency, in stock).",
            "default": "undercut_percent"
          },
          "undercutPercent": {
            "title": "Undercut percent",
            "minimum": 0,
            "maximum": 90,
            "type": "number",
            "description": "Used by \"Undercut by a percentage\".",
            "default": 2
          },
          "undercutAmount": {
            "title": "Undercut amount",
            "minimum": 0,
            "type": "number",
            "description": "Used by \"Undercut by an amount\", in the product's currency.",
            "default": 1
          },
          "premiumPercent": {
            "title": "Premium percent",
            "minimum": 0,
            "maximum": 500,
            "type": "number",
            "description": "Used by \"Stay above the lowest competitor\".",
            "default": 5
          },
          "minMarginPercent": {
            "title": "Minimum margin on cost",
            "minimum": 0,
            "maximum": 95,
            "type": "number",
            "description": "For products with a <code>costPrice</code>: never suggest below cost / (1 - margin). 0 = never below cost. Example: 30 keeps at least a 30% margin.",
            "default": 0
          },
          "floorPrice": {
            "title": "Floor price (all products)",
            "minimum": 0,
            "type": "number",
            "description": "Never suggest below this price. A product's own <code>floorPrice</code> wins over this value."
          },
          "maxChangePercent": {
            "title": "Max change per run",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A suggestion never moves more than this from your current price in one run (protects against a competitor's pricing error).",
            "default": 15
          },
          "allowPriceIncrease": {
            "title": "Allow price increases",
            "type": "boolean",
            "description": "When competitors are more expensive, suggest raising your price towards them (still capped by max change). Turn off to only ever lower prices.",
            "default": true
          },
          "ignoreOutOfStock": {
            "title": "Ignore out-of-stock competitors",
            "type": "boolean",
            "description": "Out-of-stock or discontinued offers are reported but not used for suggestions.",
            "default": true
          },
          "pushToShop": {
            "title": "Write new prices to my shop",
            "type": "boolean",
            "description": "Only in Automatic mode, and only when a rule changes a price. Each successful update is a <code>price-pushed</code> event. Leave off to get the price suggestions only (recommended until you trust your rules).",
            "default": false
          },
          "shopPlatform": {
            "title": "Shop platform",
            "enum": [
              "none",
              "shopify",
              "woocommerce",
              "webhook"
            ],
            "type": "string",
            "description": "Where new prices are written.",
            "default": "none"
          },
          "shopifyDomain": {
            "title": "Shopify store domain",
            "type": "string",
            "description": "Your <code>your-store.myshopify.com</code> domain (not the custom domain)."
          },
          "shopifyAccessToken": {
            "title": "Shopify Admin API access token",
            "type": "string",
            "description": "Custom app token (shpat_...) with the <code>write_products</code> scope. Stored encrypted; never written to the dataset, logs or key-value store."
          },
          "wooBaseUrl": {
            "title": "WooCommerce store URL",
            "type": "string",
            "description": "e.g. <code>https://myshop.com</code> (https required)."
          },
          "wooConsumerKey": {
            "title": "WooCommerce consumer key",
            "type": "string",
            "description": "REST API key (ck_...) with Read/Write permission. Stored encrypted."
          },
          "wooConsumerSecret": {
            "title": "WooCommerce consumer secret",
            "type": "string",
            "description": "REST API secret (cs_...). Stored encrypted."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "https URL that receives a JSON POST per price change (<code>sku, variantId, shopProductId, oldPrice, newPrice, currency, reason</code>). Secret because webhook URLs often contain a token."
          },
          "webhookSecret": {
            "title": "Webhook signing secret",
            "type": "string",
            "description": "Optional. Adds an <code>X-CPM-Signature: sha256=&lt;HMAC of the body&gt;</code> header so your endpoint can verify the request."
          },
          "markets": {
            "title": "Shops to search",
            "type": "array",
            "description": "Optional list of competitor shop home pages (<code>{\"name\": \"Shop\", \"url\": \"https://shop.example\"}</code>). For each product the Actor searches the shop by EAN or name and keeps only result pages that match the product (EAN or title). Shops whose robots.txt disallows search (e.g. Shopify) are skipped. Accurate competitor URLs in your catalog are faster and more reliable."
          },
          "maxDiscoveredPerProduct": {
            "title": "Max pages found per shop",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Per product and shop.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages a shop's robots.txt disallows (reported as robots_disallowed, not charged).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Products checked in parallel. Requests to the same shop always run one at a time with a short pause (and honour Crawl-delay).",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per page.",
            "default": 20
          },
          "historyStoreName": {
            "title": "Price history store",
            "type": "string",
            "description": "Named key-value store in your account that keeps the price history between runs (used for \"change since last run\"). Use a different name per catalog or schedule.",
            "default": "competitor-price-monitor-history"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional Apify proxy, e.g. to see prices of a specific country. Not a way around bot protection: blocked pages stay blocked.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}