{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown for LLM & RAG: Crawl, Clean, Chunk",
    "description": "Crawl any website or docs and convert every page to clean, LLM-ready Markdown: boilerplate removed, links absolute, tables kept, token counts, heading-aware RAG chunks with overlap, plus llms.txt and llms-full.txt for the whole site. No browser, fast. $1 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "RSrhxFdjnJrY3hqwr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/larkmoor~website-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-larkmoor-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/larkmoor~website-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-larkmoor-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/larkmoor~website-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-larkmoor-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Pages or sites to convert. The crawler starts here and follows links on the same site (see Max crawl depth).",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Most pages converted (and charged) in this run.",
            "default": 50
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many links away from a start URL to go. 0 = only the start URLs (and sitemap URLs if on).",
            "default": 2
          },
          "stayUnderStartPath": {
            "title": "Stay under the start path",
            "type": "boolean",
            "description": "Only follow links that start with the start URL's folder (e.g. /docs/ stays in the docs). Turn off to crawl the whole domain.",
            "default": true
          },
          "useSitemap": {
            "title": "Also use the sitemap",
            "type": "boolean",
            "description": "Read the site's sitemap (from robots.txt or /sitemap.xml) and queue its pages too: the fastest way to cover a whole site.",
            "default": false
          },
          "includeUrlPatterns": {
            "title": "Only URLs matching",
            "type": "array",
            "description": "Optional globs like https://example.com/blog/** or regular expressions prefixed with re: (e.g. re:/docs/v2/). A URL must match one of them to be crawled.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs matching",
            "type": "array",
            "description": "Globs or re: regular expressions for URLs to skip (e.g. **/tag/**, re:\\?page=).",
            "items": {
              "type": "string"
            }
          },
          "contentMode": {
            "title": "Content",
            "enum": [
              "main",
              "full"
            ],
            "type": "string",
            "description": "Main content keeps the article/docs text and drops navigation, ads, cookie banners and related links. Full page keeps everything inside the page body except menus, header, footer and scripts.",
            "default": "main"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "pages",
              "pagesWithChunks",
              "chunks"
            ],
            "type": "string",
            "description": "Chunks are heading-aware pieces of the Markdown, sized for embeddings, each with its heading path. Either way you pay per page.",
            "default": "pages"
          },
          "chunkSizeTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 100,
            "maximum": 8000,
            "type": "integer",
            "description": "Target chunk size in tokens (about 4 characters per token).",
            "default": 500
          },
          "chunkOverlapTokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Text repeated from the end of the previous chunk, so a sentence cut at a boundary keeps its context.",
            "default": 50
          },
          "keepLinks": {
            "title": "Keep links",
            "type": "boolean",
            "description": "Keep hyperlinks as Markdown links (absolute URLs).",
            "default": true
          },
          "keepImages": {
            "title": "Keep images",
            "type": "boolean",
            "description": "Keep images as Markdown image links.",
            "default": false
          },
          "keepTables": {
            "title": "Keep tables",
            "type": "boolean",
            "description": "Keep HTML tables as Markdown tables.",
            "default": true
          },
          "saveLlmsTxt": {
            "title": "Save llms.txt and llms-full.txt",
            "type": "boolean",
            "description": "Also save an llms.txt index (title, link, description per page) and llms-full.txt (all pages in one Markdown file) in the run's key-value store.",
            "default": true
          },
          "minTextChars": {
            "title": "Minimum text length",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pages with less text than this are reported as empty (free), e.g. pages that need JavaScript.",
            "default": 100
          },
          "skipFailed": {
            "title": "Skip failed pages",
            "type": "boolean",
            "description": "Leave blocked, empty and non-HTML pages out of the dataset (they are never charged either way).",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the site's robots.txt disallows (recommended).",
            "default": true
          },
          "concurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages fetched at the same time (1-10).",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}