{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler: Site Change Monitor, RAG Chunks",
    "description": "Website content crawler with a site change monitor: every scheduled run reports the new, changed and removed pages of a whole site as clean Markdown. Crawls links and sitemaps, returns Markdown or text per page with token counts and token-limited RAG chunks with stable ids. Failed pages are free.",
    "version": "0.1",
    "x-build-id": "AZTAz8RpOfhpDSlof"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-website-content-crawler",
        "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~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-website-content-crawler",
        "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~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-website-content-crawler",
        "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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Where the crawl starts, e.g. \"https://docs.python.org/3/library/\". With the default scope only pages under the start URL's folder are crawled (here /3/library/). Several sites per run are fine.",
            "default": [
              {
                "url": "https://docs.python.org/3/library/"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "subpath",
              "domain"
            ],
            "type": "string",
            "description": "subpath: only links under the start URL's folder (start https://x.com/docs/ crawls /docs/...). domain: every page on the same host (www. ignored).",
            "default": "subpath"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most pages fetched in one run, failed pages included, e.g. 10. In monitor mode it also caps how many known pages the crawl did not reach are re-checked.",
            "default": 50
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many clicks away from a start URL to follow links, e.g. 5. 0 = only the start URLs (plus sitemap pages). Pages from sitemaps count as depth 1.",
            "default": 5
          },
          "useSitemaps": {
            "title": "Use sitemaps",
            "type": "boolean",
            "description": "Also read the site's sitemaps (Sitemap: lines in robots.txt, else /sitemap.xml; sitemap indexes and .gz files work) to find pages no link points to. Sitemap pages obey the same scope and globs.",
            "default": true
          },
          "includeUrlGlobs": {
            "title": "Include URL globs",
            "type": "array",
            "description": "Only follow links matching one of these globs, e.g. \"https://docs.example.com/guide/**\". {a,b} works. Start URLs are always fetched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URL globs",
            "type": "array",
            "description": "Never follow links matching these globs, e.g. \"https://example.com/**/changelog/**\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "formats": {
            "title": "Output formats",
            "type": "array",
            "description": "markdown (headings, lists, tables, code kept), text (no markup) or both.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text"
              ]
            },
            "default": [
              "markdown"
            ]
          },
          "chunkMaxTokens": {
            "title": "RAG chunk size (tokens)",
            "minimum": 64,
            "maximum": 8192,
            "type": "integer",
            "description": "Also cut each page into chunks of at most this many tokens (GPT-4o tokenizer), e.g. 512. Sections (#, ##, ###) start a new chunk; each chunk gets a stable chunkId (same text = same id across runs), its heading path and its token count. Empty = no chunks."
          },
          "maxTokensPerPage": {
            "title": "Max tokens per page",
            "minimum": 50,
            "maximum": 2000000,
            "type": "integer",
            "description": "Cut each page's Markdown/text to this many tokens, e.g. 8000. Empty = no limit."
          },
          "renderJs": {
            "title": "Render JavaScript",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "auto opens a headless browser only for pages whose HTML is an empty JavaScript shell.",
            "default": "auto"
          },
          "waitFor": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "With the browser: wait until this selector appears, e.g. \"main article\"."
          },
          "documents": {
            "title": "Read PDF and DOCX",
            "type": "boolean",
            "description": "Turn linked PDF and Word DOCX files in scope into text (no OCR).",
            "default": true
          },
          "includeLinks": {
            "title": "Keep links",
            "type": "boolean",
            "description": "Keep link URLs in the Markdown and list every link of the page in `links`.",
            "default": false
          },
          "includeImages": {
            "title": "Keep images",
            "type": "boolean",
            "description": "Keep images in the Markdown and list them in `images`.",
            "default": false
          },
          "proxyTier": {
            "title": "Proxy",
            "enum": [
              "auto",
              "none",
              "datacenter",
              "residential",
              "unblocker"
            ],
            "type": "string",
            "description": "auto starts without a proxy and steps up to datacenter, residential and Web Unblocker only on a site that blocks; the working tier is remembered per site.",
            "default": "auto"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country for proxy exits, e.g. \"US\". Empty = any."
          },
          "concurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages fetched at the same time.",
            "default": 5
          },
          "domainDelaySecs": {
            "title": "Pause per site (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Minimum gap between two requests to the same site.",
            "default": 0.25
          },
          "timeout": {
            "title": "Timeout per page (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Give up on a page after this long.",
            "default": 45
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many successful pages (failed pages are free and do not count), e.g. 10. maxPages is the crawl budget; leave this at the default to return every page the crawl reads.",
            "default": 100000
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}