{
  "openapi": "3.0.1",
  "info": {
    "title": "Cloudflare / DataDome Bypass — Protected Page Change Monitor",
    "description": "Cloudflare bypass and fetcher for pages behind Cloudflare, Akamai, DataDome or PerimeterX: automatic escalation (plain → datacenter → residential → Web Unblocker → headless Chromium), CSS-selector or regex extraction, and change alerts by webhook or Telegram. Pay per page fetched, no login.",
    "version": "0.1",
    "x-build-id": "nEenRj0P1ZBrfW7ke"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~protected-page-fetch-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-protected-page-fetch-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/datahamster~protected-page-fetch-monitor/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-protected-page-fetch-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/datahamster~protected-page-fetch-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-protected-page-fetch-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": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to fetch, as full URLs, e.g. [\"https://www.apify.com/\"]. Each URL becomes one row and uses the default selector/regex below.",
            "default": [
              "https://www.apify.com/"
            ],
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "title": "Targets (advanced)",
            "type": "array",
            "description": "Per-URL extraction rules as JSON, e.g. [{\"url\": \"https://shop.example.com/p/1\", \"selector\": \".price\", \"regex\": \"\\\\$([\\\\d.]+)\", \"label\": \"pricing\", \"waitFor\": \".loaded\"}]. Use instead of urls when each page needs its own selector; label is echoed back in the row."
          },
          "tier": {
            "title": "Proxy tier",
            "enum": [
              "auto",
              "none",
              "datacenter",
              "residential",
              "unblocker"
            ],
            "type": "string",
            "description": "Proxy tier: \"auto\" tries plain → datacenter → residential → Web Unblocker and stops at the first tier that is not blocked (recommended, and you pay Apify proxy traffic only for the tiers actually used). Fix it with \"none\", \"datacenter\", \"residential\" or \"unblocker\". Example: \"auto\".",
            "default": "auto"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter ISO country code for the residential or Web Unblocker exit, e.g. \"US\" or \"DE\". Leave empty to let Apify choose; set it when the page is geo-dependent."
          },
          "fetchMode": {
            "title": "Fetch mode",
            "enum": [
              "http",
              "auto",
              "browser"
            ],
            "type": "string",
            "description": "\"http\" sends plain requests with a Chrome TLS fingerprint (fast, cheap); \"auto\" falls back to headless Chromium only when every HTTP tier is blocked; \"browser\" always renders in headless Chromium (needed for JavaScript-built pages, slower). Example: \"http\".",
            "default": "http"
          },
          "selector": {
            "title": "CSS selector",
            "type": "string",
            "description": "CSS selector applied to every URL in urls; only matching elements' text is kept, e.g. \".price\", \"#stock\" or \"table.rates\". Leave empty to keep the page's visible text."
          },
          "regex": {
            "title": "Regex",
            "type": "string",
            "description": "Python regular expression applied to the (selected) text; capture group 1 is returned when present, otherwise the whole match, e.g. \"\\\\$([0-9.]+)\". Leave empty to skip regex extraction."
          },
          "headers": {
            "title": "Extra headers",
            "type": "object",
            "description": "Extra HTTP headers sent with every request, as a JSON object, e.g. {\"Accept-Language\": \"de-DE\"}."
          },
          "timeout": {
            "title": "Timeout (s)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout in seconds, e.g. 60. The Web Unblocker tier always gets at least 120 s regardless of this value.",
            "default": 60
          },
          "textLimit": {
            "title": "Text limit",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "How many characters of extracted text to keep per page, e.g. 5000. Longer text is truncated.",
            "default": 5000
          },
          "includeHtml": {
            "title": "Store full HTML",
            "type": "boolean",
            "description": "If true, store the complete HTML of each page in the run's key-value store and put its key in the row's htmlKey field. Example: false.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many pushed rows, e.g. 50. You are charged only for rows actually pushed; a page blocked on every tier still counts as one row.",
            "default": 50
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "\"scrape\" returns a row for every page; \"monitor\" returns only pages whose extracted content changed since the previous run of the same saved Task, with changeType, changedFields and previous attached. Example: \"scrape\".",
            "default": "scrape"
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "State key for monitor mode when the actor is not run as a saved Task, e.g. \"competitor-pricing-page\". Runs sharing a key share the comparison state."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL that receives a POST with the monitor-mode change summary (JSON), e.g. \"https://hooks.zapier.com/hooks/catch/123/abc\". Leave empty to skip."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional Telegram bot token used to send monitor-mode change summaries, e.g. \"123456789:AAF...\". Leave empty to skip Telegram."
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional Telegram chat id that receives monitor-mode summaries, e.g. \"-1001234567890\". Required only when telegramBotToken is set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}