{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Crawler",
    "description": "Deep-crawl websites to extract clean text, Markdown, or HTML for AI/LLM apps, RAG pipelines, and vector databases. Supports adaptive crawling, HTML cleaning, file downloads, and structured dataset output. Easily integrates with LangChain, LlamaIndex, and other LLM tools.",
    "version": "0.0",
    "x-build-id": "niMVhlqRsmWuNmVJI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mikolabs~website-content-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mikolabs-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/mikolabs~website-content-crawler/runs": {
      "post": {
        "operationId": "runs-sync-mikolabs-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/mikolabs~website-content-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-mikolabs-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more URLs of pages where the crawler will start. The Actor crawls sub-pages of these URLs by default.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlerType": {
            "title": "Crawler type",
            "enum": [
              "playwright:adaptive",
              "playwright:firefox",
              "cheerio",
              "jsdom",
              "playwright:chrome"
            ],
            "type": "string",
            "description": "How pages are fetched. Adaptive auto-switches between raw HTTP and Firefox. Cheerio is fastest. Firefox/Chrome handle JS-rendered sites.",
            "default": "playwright:adaptive"
          },
          "includeUrlGlobs": {
            "title": "Include URLs (globs)",
            "type": "array",
            "description": "Glob patterns for URLs to crawl. If set, overrides the default start-URL-based scoping. Affects links only, not Start URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URLs (globs)",
            "type": "array",
            "description": "Glob patterns for URLs to skip. Affects links only, not Start URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "maxCrawlDepth": {
            "title": "Max crawling depth",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum link-following depth from start URLs. 0 = start URLs only.",
            "default": 20
          },
          "maxCrawlPages": {
            "title": "Max pages",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum total pages to crawl, including start URLs. 0 = unlimited.",
            "default": 20
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of results (items) to save to the dataset. Unlike maxCrawlPages, this only counts pages with saved content.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of parallel page loads.",
            "default": 16
          },
          "initialConcurrency": {
            "title": "Initial concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Initial number of parallel page loads at crawl start. Gradually increases up to maxConcurrency. Useful to warm up without overloading the target.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of retry attempts for failed requests.",
            "default": 3
          },
          "useSitemaps": {
            "title": "Load URLs from Sitemaps",
            "type": "boolean",
            "description": "If enabled, fetches sitemap.xml at each domain's root and enqueues matching URLs.",
            "default": false
          },
          "useLlmsTxt": {
            "title": "Crawl /llms.txt and Markdown files",
            "type": "boolean",
            "description": "If enabled, the crawler looks for /llms.txt at domain roots and crawls those URLs. Also enables crawling .md files.",
            "default": false
          },
          "respectRobotsTxtFile": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Obey robots.txt exclusion rules.",
            "default": false
          },
          "keepUrlFragments": {
            "title": "URL #fragments identify unique pages",
            "type": "boolean",
            "description": "Include URL fragments when checking for already-visited pages. Useful for single-page apps.",
            "default": false
          },
          "ignoreCanonicalUrl": {
            "title": "Ignore canonical URLs",
            "type": "boolean",
            "description": "If enabled, ignores the canonical URL reported by the page and uses the actual URL for deduplication.",
            "default": false
          },
          "dynamicContentWaitSecs": {
            "title": "Dynamic content wait (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Wait this many seconds after page load for dynamic content to appear. Only applies to browser crawlers.",
            "default": 0
          },
          "maxScrollPagePercent": {
            "title": "Max scroll page percent",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How much of the page to scroll before extraction. 100 = scroll through the full page to the last section, 0 disables scrolling. Ignored for raw HTTP crawlers.",
            "default": 100
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Wait for this CSS selector to appear before extracting content. Only for browser crawlers.",
            "default": ""
          },
          "clickElementsCssSelector": {
            "title": "Click elements (CSS selector)",
            "type": "string",
            "description": "Click DOM elements matching this selector to expand collapsed content (e.g. [aria-expanded='false']). Browser only.",
            "default": ""
          },
          "expandIframes": {
            "title": "Expand iframes",
            "type": "boolean",
            "description": "Include text content from iframes in the output. Browser crawler only.",
            "default": true
          },
          "htmlTransformer": {
            "title": "HTML transformer",
            "enum": [
              "readableText",
              "none"
            ],
            "type": "string",
            "description": "Controls how the page HTML is cleaned before text extraction.",
            "default": "readableText"
          },
          "readableTextCharThreshold": {
            "title": "Readable text char threshold",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum character count for readability extraction to be considered successful. Falls back to full-page extraction if below threshold.",
            "default": 100
          },
          "aggressivePrune": {
            "title": "Aggressive prune",
            "type": "boolean",
            "description": "Apply more aggressive HTML pruning to remove low-value content. May remove some relevant content.",
            "default": false
          },
          "removeElementsCssSelector": {
            "title": "Remove HTML elements (CSS selector)",
            "type": "string",
            "description": "CSS selector for elements to remove before extraction. Defaults to nav, header, footer, ads, scripts, etc.",
            "default": ""
          },
          "keepElementsCssSelector": {
            "title": "Keep elements (CSS selector)",
            "type": "string",
            "description": "If set, only content matching this CSS selector is kept; everything else is removed.",
            "default": ""
          },
          "removeCookieWarnings": {
            "title": "Remove cookie warnings",
            "type": "boolean",
            "description": "Attempt to remove cookie consent banners.",
            "default": true
          },
          "saveMarkdown": {
            "title": "Save Markdown",
            "type": "boolean",
            "description": "Convert page content to Markdown and include in output.",
            "default": true
          },
          "saveHtml": {
            "title": "Save HTML snippet",
            "type": "boolean",
            "description": "Include the cleaned HTML snippet in the output record.",
            "default": false
          },
          "saveHtmlAsFile": {
            "title": "Save raw HTML as file",
            "type": "boolean",
            "description": "Save full raw page HTML to the Key-Value Store and add a link in the output record.",
            "default": false
          },
          "saveScreenshots": {
            "title": "Save screenshots",
            "type": "boolean",
            "description": "Capture a screenshot of each page (Playwright crawlers only) and store in the Key-Value Store.",
            "default": false
          },
          "saveFiles": {
            "title": "Download linked files",
            "type": "boolean",
            "description": "Download PDF, DOC, DOCX, XLS, XLSX, CSV files linked from crawled pages.",
            "default": false
          },
          "minFileDownloadSpeedKBps": {
            "title": "Min file download speed (KB/s)",
            "minimum": 0,
            "type": "number",
            "description": "Abort file downloads that stay below this speed for more than 10 seconds.",
            "default": 64
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Configure proxy for crawling. Set useApifyProxy: true to use Apify Proxy.",
            "default": {
              "useApifyProxy": true
            }
          },
          "initialCookies": {
            "title": "Initial cookies",
            "type": "array",
            "description": "Cookies injected on every request (for pages behind login). JSON array of {name, value, domain?, path?}.",
            "default": []
          },
          "customHttpHeaders": {
            "title": "Custom HTTP headers",
            "type": "object",
            "description": "Extra HTTP headers added to all requests, e.g. {\"Authorization\": \"Bearer token\"}.",
            "default": {}
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Include extra debug fields in output (raw HTML, response headers).",
            "default": false
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Enable verbose DEBUG-level logging.",
            "default": false
          },
          "signHttpRequests": {
            "title": "Sign HTTP requests (experimental)",
            "type": "boolean",
            "description": "If enabled, HTTP requests will be cryptographically signed using the actor credentials. This is a platform-side feature.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}