{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown Crawler for LLM, AI & RAG",
    "description": "Crawl a website or URL list and return each page's main content as clean Markdown for LLMs and RAG. Use to build a knowledge base from docs or blogs. Input: startUrls, maxPages, optional followLinks, stayUnderStartPath, renderJs. Output per page: url, title, markdown, text, words. Obeys robots.txt.",
    "version": "0.1",
    "x-build-id": "s0unx5HKrDeiW7Fa6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phaux~website-to-markdown-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phaux-website-to-markdown-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/phaux~website-to-markdown-crawler/runs": {
      "post": {
        "operationId": "runs-sync-phaux-website-to-markdown-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/phaux~website-to-markdown-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-phaux-website-to-markdown-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": "Website start pages or a list of page URLs. Empty = a small example on crawlee.dev.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages are saved (= pages you pay for). Default: 50.",
            "default": 50
          },
          "followLinks": {
            "title": "Follow links",
            "type": "boolean",
            "description": "Crawl links found on the pages. Off = convert only the start URLs (a URL list). Default: true.",
            "default": true
          },
          "sameDomainOnly": {
            "title": "Stay on the same website",
            "type": "boolean",
            "description": "Only follow links on the start URLs' websites (www. ignored). Default: true.",
            "default": true
          },
          "stayUnderStartPath": {
            "title": "Stay under the start path",
            "type": "boolean",
            "description": "Only follow links under the start URL's folder, e.g. https://example.com/docs/ stays in /docs/. Default: false.",
            "default": false
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Link depth from the start pages (0 = start pages only). Default: 5.",
            "default": 5
          },
          "includeUrlPatterns": {
            "title": "Only URLs matching",
            "type": "array",
            "description": "Regular expressions; when set, only matching URLs are crawled. Example: /blog/",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs matching",
            "type": "array",
            "description": "Regular expressions; matching URLs are skipped. Example: /tag/|/login",
            "items": {
              "type": "string"
            }
          },
          "renderJs": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "auto = render in a browser only when the HTML has almost no text (charged at the JS price); never = plain HTML only (cheapest); always = render every page. Default: \"auto\".",
            "default": "auto"
          },
          "minWordsBeforeJs": {
            "title": "Min words before JS (auto mode)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "In auto mode, a page with fewer words than this whose HTML looks like a JavaScript app is rendered in a browser. Default: 50.",
            "default": 50
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "markdown = main content as markdown; text = plain text; html = raw HTML (large). Example: [\"markdown\", \"text\"]. Default: [\"markdown\", \"text\"].",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "text",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "Plain text",
                "Raw HTML"
              ]
            },
            "default": [
              "markdown",
              "text"
            ]
          },
          "includeLinksInMarkdown": {
            "title": "Keep links in markdown",
            "type": "boolean",
            "description": "Keep [text](url) links in the markdown output. Default: true.",
            "default": true
          },
          "requestIntervalSecs": {
            "title": "Seconds between requests to one host",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Politeness delay per host (0.5–30 s). A longer robots.txt Crawl-delay always wins. Default: 1.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages in progress at once across hosts (1–20). One host is always fetched one request at a time. Default: 4.",
            "default": 4
          },
          "timeBudgetSecs": {
            "title": "Time budget (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop after this many seconds and keep the pages saved (0 = only the run timeout guard). Default: 0.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}