{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Monitor — Website Change & Price Detection",
    "description": "Monitor competitor websites for changes: track prices, detect stock availability, and monitor content modifications. Supports multi-page monitoring with scheduled runs for continuous competitor analysis. ⚠️ REQUIRES RESIDENTIAL PROXY to bypass anti-bot protection.",
    "version": "0.1",
    "x-build-id": "w98dAXALbif4NX64T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apikiy~competitor-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apikiy-competitor-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/apikiy~competitor-monitor/runs": {
      "post": {
        "operationId": "runs-sync-apikiy-competitor-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/apikiy~competitor-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-apikiy-competitor-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to Monitor",
            "type": "array",
            "description": "List of website URLs to monitor for changes. Enter one URL per line.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Monitor Mode",
            "enum": [
              "full-page",
              "selector",
              "price",
              "stock"
            ],
            "type": "string",
            "description": "What to monitor on each page",
            "default": "selector"
          },
          "selectors": {
            "title": "CSS Selectors",
            "type": "array",
            "description": "CSS selectors to extract content from (for 'selector' mode). Supports multiple selectors.",
            "items": {
              "type": "string"
            },
            "default": [
              "body"
            ]
          },
          "priceSelector": {
            "title": "Price Selector",
            "type": "string",
            "description": "CSS selector for price element (for 'price' mode). Must point to element containing the price.",
            "default": ".price"
          },
          "stockSelector": {
            "title": "Stock Selector",
            "type": "string",
            "description": "CSS selector for stock status element (for 'stock' mode).",
            "default": ".stock-status"
          },
          "outOfStockKeywords": {
            "title": "Out of Stock Keywords",
            "type": "array",
            "description": "Keywords that indicate an item is out of stock (case-insensitive).",
            "items": {
              "type": "string"
            },
            "default": [
              "out of stock",
              "unavailable",
              "rupture de stock",
              "sold out",
              "currently unavailable"
            ]
          },
          "inStockKeywords": {
            "title": "In Stock Keywords",
            "type": "array",
            "description": "Keywords that indicate an item is in stock (case-insensitive).",
            "items": {
              "type": "string"
            },
            "default": [
              "in stock",
              "available",
              "disponible",
              "add to cart",
              "buy now"
            ]
          },
          "notifyOnChange": {
            "title": "Notify on Change",
            "type": "boolean",
            "description": "Trigger a notification when any change is detected.",
            "default": true
          },
          "notifyPriceDrop": {
            "title": "Notify on Price Drop",
            "type": "boolean",
            "description": "Trigger a notification when a price decreases.",
            "default": true
          },
          "priceDropThreshold": {
            "title": "Price Drop Threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Only notify if price drops by at least this percentage.",
            "default": 0
          },
          "notifyOutOfStock": {
            "title": "Notify on Out of Stock",
            "type": "boolean",
            "description": "Trigger a notification when an item goes out of stock.",
            "default": true
          },
          "notifyBackInStock": {
            "title": "Notify on Back in Stock",
            "type": "boolean",
            "description": "Trigger a notification when a previously out-of-stock item becomes available.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max Concurrent Browsers",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of concurrent browser pages.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy configuration. REQUIRES RESIDENTIAL proxy group for this site. Go to https://console.apify.com/proxy to activate proxy.",
            "default": {
              "useApifyProxy": true
            }
          },
          "proxyInfo": {
            "title": "ℹ️ Proxy Information",
            "type": "string",
            "description": "This actor requires a RESIDENTIAL proxy to work. Reason: Many sites block datacenter IPs. Without proxy, requests will be blocked (403). Enable proxy in your Apify account: https://console.apify.com/proxy"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}