{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Content Monitoring Bot",
    "description": "Monitor competitor websites for new and changed content. Track blog posts, guides, landing pages, themes, keywords, and ready-to-use content ideas with optional AI analysis.",
    "version": "1.0",
    "x-build-id": "jlB66hf5xWtklclQW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coolinbex~competitor-content-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coolinbex-competitor-content-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/coolinbex~competitor-content-monitor/runs": {
      "post": {
        "operationId": "runs-sync-coolinbex-competitor-content-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/coolinbex~competitor-content-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-coolinbex-competitor-content-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": {
          "competitorUrls": {
            "title": "Competitor URLs",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Website, blog, news, resources, changelog, or content hub URLs to monitor. Add one URL per competitor or content section.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": [
              "https://webflow.com/blog",
              "https://zapier.com/blog"
            ]
          },
          "contentScope": {
            "title": "Content to monitor",
            "enum": [
              "editorial",
              "marketing",
              "all"
            ],
            "type": "string",
            "description": "Editorial focuses on blogs, news, guides, resources, case studies, and updates. Marketing also includes product, feature, pricing, and solution pages. All keeps any substantial public page.",
            "default": "editorial"
          },
          "maxPagesPerCompetitor": {
            "title": "Maximum pages per competitor",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of normal website pages fetched for each competitor in one run. Feed and sitemap files do not count toward this limit.",
            "default": 30
          },
          "maxDepth": {
            "title": "Maximum crawl depth",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Maximum number of link levels followed from each competitor URL. A value of 0 scans only the supplied URLs plus optional feed and sitemap discovery.",
            "default": 2
          },
          "includeSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "Allow discovered pages on subdomains of each competitor domain.",
            "default": false
          },
          "discoverFeeds": {
            "title": "Discover RSS and Atom feeds",
            "type": "boolean",
            "description": "Discover RSS or Atom feeds linked from competitor pages and use them to find recent content efficiently.",
            "default": true
          },
          "discoverSitemaps": {
            "title": "Discover XML sitemaps",
            "type": "boolean",
            "description": "Check robots.txt and common sitemap locations for additional relevant content URLs.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs disallowed for the CompetitorContentMonitor user agent by each site's robots.txt rules.",
            "default": true
          },
          "stripQueryParameters": {
            "title": "Ignore query parameters",
            "type": "boolean",
            "description": "Remove query strings from discovered page URLs to reduce duplicates, tracking parameters, and crawl traps.",
            "default": true
          },
          "includePatterns": {
            "title": "Include URL patterns",
            "maxItems": 100,
            "type": "array",
            "description": "Optional wildcard patterns that discovered page URLs must match, for example */blog/* or */resources/*. Leave empty to use automatic content detection.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludePatterns": {
            "title": "Exclude URL patterns",
            "maxItems": 100,
            "type": "array",
            "description": "Wildcard URL patterns to skip. Useful for login, account, legal, search, cart, and other irrelevant sections.",
            "items": {
              "type": "string"
            },
            "default": [
              "*/login*",
              "*/signup*",
              "*/account*",
              "*/privacy*",
              "*/terms*",
              "*/search*",
              "*/cart*",
              "*/checkout*"
            ]
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "smart",
              "all",
              "changesOnly"
            ],
            "type": "string",
            "description": "Smart returns the complete baseline on the first run and only new or changed content later. All always returns every monitored content page. Changes only emits only new or changed pages after a baseline exists.",
            "default": "smart"
          },
          "monitorId": {
            "title": "Monitor ID",
            "maxLength": 100,
            "type": "string",
            "description": "Optional stable identifier for this monitoring setup. Leave blank to automatically derive state from the competitor URLs and crawl configuration.",
            "default": ""
          },
          "resetState": {
            "title": "Reset monitoring baseline",
            "type": "boolean",
            "description": "Discard the saved baseline for this monitor and treat the current run as a fresh first scan.",
            "default": false
          },
          "generateIdeas": {
            "title": "Generate content ideas",
            "type": "boolean",
            "description": "Generate practical content angles from discovered competitor themes without requiring an external AI API key.",
            "default": true
          },
          "ideasPerPage": {
            "title": "Ideas per content item",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of content ideas attached to each emitted page.",
            "default": 3
          },
          "overallIdeas": {
            "title": "Overall content ideas",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of cross-competitor content opportunities included in the run summary.",
            "default": 10
          },
          "useAiEnhancement": {
            "title": "Use AI enhancement",
            "type": "boolean",
            "description": "Optionally enhance the run summary with an OpenAI-compatible chat completion API. The Actor still works fully without AI.",
            "default": false
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "API key for the configured OpenAI-compatible endpoint. Required only when AI enhancement is enabled."
          },
          "aiBaseUrl": {
            "title": "AI API base URL",
            "type": "string",
            "description": "Base URL of an OpenAI-compatible API. The Actor calls the /chat/completions endpoint.",
            "default": "https://openrouter.ai/api/v1"
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Model identifier accepted by your AI provider.",
            "default": "openai/gpt-4.1-mini"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional HTTPS endpoint that receives the completed monitoring summary. Useful for Slack bridges, Make, Zapier, n8n, or custom automations."
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum number of pages fetched at the same time. Lower this value for sensitive or rate-limited sites.",
            "default": 6
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for each HTTP request.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of retry attempts for temporary network, rate-limit, or server errors.",
            "default": 2
          },
          "maxResponseBytes": {
            "title": "Maximum response size",
            "minimum": 100000,
            "maximum": 20000000,
            "type": "integer",
            "description": "Maximum HTML, XML, or text response size accepted per page to protect memory usage.",
            "default": 5000000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Direct requests are used by default and are sufficient for most public competitor sites.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}