{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown — Content Crawler for LLM & RAG",
    "description": "Convert web pages into clean Markdown for LLMs, RAG and vector databases. Pay per delivered result: $1/1,000 on Free; from $0.60/1,000 on Diamond. $0.00005 per run start.",
    "version": "65.57",
    "x-build-id": "0LpWjhYSNlxy4ksLE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webdatatools~website-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webdatatools-website-to-markdown",
        "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/webdatatools~website-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-webdatatools-website-to-markdown",
        "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/webdatatools~website-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-webdatatools-website-to-markdown",
        "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": {
          "url": {
            "title": "Single URL (fast mode for AI agents)",
            "type": "string",
            "description": "Optional, for AI agents and API calls. Send only {\"url\": \"https://…\"} to get that one page as Markdown in seconds: no sitemap, no link following, 1 result (MCP call-actor waits at most 45 s). When set, Start URLs and Max pages are ignored; leave it empty to crawl a site from Start URLs."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Enter the page(s) to start crawling from, e.g. https://docs.apify.com/platform. The crawler follows links from here in breadth-first order. Each page is saved to the dataset as soon as it is converted.",
            "default": [
              {
                "url": "https://docs.apify.com/platform"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Enter the maximum number of pages to crawl and convert, e.g. 50. This is the billed unit ($1 per 1,000 pages) — the crawl stops exactly at this count. A typical site crawls at 2–10 pages per second; if the run timeout comes first, the crawl stops early and the run still ends SUCCEEDED with every page done so far.",
            "default": 50
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Enter how many links deep to follow from a start URL, e.g. 3. Set 0 to crawl only the start URL(s).",
            "default": 3
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Turn this on to follow links only on any supplied start domain (www. counts as the same). With multiple start domains, each is allowed; other domains are excluded. Turn it off to allow other domains.",
            "default": true
          },
          "includePathPrefixes": {
            "title": "Include path prefixes",
            "type": "array",
            "description": "Optional. Only crawl URLs whose path starts with one of these prefixes, e.g. /docs. Leave empty to crawl every path allowed by the other settings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePathPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Optional. Regular expressions tested against the full URL; a match is skipped, e.g. \\.(png|jpe?g)$ to skip images. Defaults cover binary files and login/signup pages.",
            "default": [
              "\\.(png|jpe?g|gif|svg|webp|pdf|zip|mp4|css|js)$",
              "/login",
              "/signup",
              "\\?replytocom="
            ],
            "items": {
              "type": "string"
            }
          },
          "useSitemap": {
            "title": "Seed from sitemap.xml",
            "type": "boolean",
            "description": "Turn this on to also read /sitemap.xml on each start URL's domain and add its URLs (filtered by the settings above) to the crawl queue, up to Max pages.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "text",
              "both"
            ],
            "type": "string",
            "description": "Choose what content to put in each row: Markdown only, plain text only, or both. Markdown preserves headings, lists, code blocks and tables.",
            "default": "markdown"
          },
          "removeSelectors": {
            "title": "Extra CSS selectors to remove",
            "type": "array",
            "description": "Optional. Extra CSS selectors to strip before extracting content, e.g. .cookie-banner or #newsletter-signup, on top of the built-in nav/header/footer/aside removal.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Enter the maximum number of pages fetched in parallel, e.g. 10. Lower it if the target site rate-limits you.",
            "default": 10
          },
          "maxPagesPerDomain": {
            "title": "Max pages per domain",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional. Cap how many pages are crawled from any one domain (www. ignored), e.g. 20 when you crawl many sites or follow links off-site. Leave empty for no per-domain cap; Max pages still caps the run."
          },
          "maxConsecutiveFailures": {
            "title": "Stop after N failed pages in a row",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop the crawl when this many pages fail in a row (blocked site, dead host) instead of working through the whole queue. Failed pages are never charged. Default 20; set 0 to never stop for failures.",
            "default": 20
          },
          "respectRobots": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Turn this on to skip URLs disallowed by the site's robots.txt file (recommended and on by default).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Select a proxy configuration, e.g. Apify Proxy with the datacenter group, if the target site blocks requests from shared IPs.",
            "default": {
              "useApifyProxy": false
            }
          },
          "chunkForRag": {
            "title": "Add RAG chunks",
            "type": "boolean",
            "description": "Turn this on to add a `chunks` array to every page: heading-aware pieces of the Markdown with the heading path and an exact GPT (o200k) token count, ready to embed. Same price — chunks are part of the page result.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 50,
            "maximum": 8000,
            "type": "integer",
            "description": "Target tokens per chunk, including heading context and overlap, e.g. 500. Fenced code and GFM tables stay whole: an indivisible block above this target is returned with oversized=true and its exact token count. Check this flag before embedding into a model with a strict limit.",
            "default": 500
          },
          "changeDetection": {
            "title": "Detect changes since last run",
            "type": "boolean",
            "description": "Turn this on to compare every page with the previous run that used the same start URLs and add `changeStatus`: new, changed or unchanged. Ideal for a scheduled run that keeps a vector DB fresh.",
            "default": false
          },
          "skipUnchangedContent": {
            "title": "Leave content empty for unchanged pages",
            "type": "boolean",
            "description": "With change detection on, unchanged pages keep their row (url, title, changeStatus) but get empty markdown/text/chunks so you only re-embed what changed. Each page is still one result.",
            "default": true
          },
          "inputDatasetId": {
            "title": "Input dataset ID (optional)",
            "type": "string",
            "description": "Take the URLs from another Actor run's dataset, e.g. \"aBcD1234\". Combined with the list above."
          },
          "inputField": {
            "title": "Field to read from that dataset",
            "type": "string",
            "description": "Column holding the value, e.g. \"url\" (the default) or \"website\". Array columns are flattened."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}