{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown Crawler for LLM and RAG",
    "description": "Crawl websites into clean Markdown per page for LLM and RAG pipelines: sitemaps, links, URL globs, main-content extraction, optional chunking and opt-in browser rendering. USD 1 per 1,000 pages, USD 4 more per rendered page.",
    "version": "1.0",
    "x-build-id": "o4D3gkmgvST6jrdJZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/registrydata~website-markdown-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-registrydata-website-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/registrydata~website-markdown-crawler/runs": {
      "post": {
        "operationId": "runs-sync-registrydata-website-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/registrydata~website-markdown-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-registrydata-website-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": "Pages to start from. A bare domain such as example.com is accepted.",
            "default": [
              {
                "url": "https://docs.python.org/3/tutorial/introduction.html"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Optional sitemap.xml addresses (indexes and .gz files work). Sitemaps listed in robots.txt and /sitemap.xml are used automatically when \"Use sitemaps\" is on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useSitemaps": {
            "title": "Use sitemaps",
            "type": "boolean",
            "description": "Also crawl pages listed in the site sitemaps (they follow the pages linked from the start URLs).",
            "default": true
          },
          "followLinks": {
            "title": "Follow links",
            "type": "boolean",
            "description": "Follow links found on each page, within the scope below. Turn off to read only the start URLs and sitemap pages.",
            "default": true
          },
          "scope": {
            "title": "Scope",
            "enum": [
              "domain",
              "subdomains",
              "path"
            ],
            "type": "string",
            "description": "Which links may be followed.",
            "default": "domain"
          },
          "includeUrlGlobs": {
            "title": "Include URL globs",
            "type": "array",
            "description": "Only crawl URLs matching one of these patterns. * matches within one path segment, ** across segments, for example https://example.com/docs/**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URL globs",
            "type": "array",
            "description": "Skip URLs matching one of these patterns, for example **/changelog/**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many pages. Every page saved is billed, so this caps your cost. Failed, blocked and empty pages are never billed.",
            "default": 10
          },
          "maxDepth": {
            "title": "Maximum link depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many links away from a start URL to go. 0 reads only the start URLs (and sitemap pages).",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages fetched at once across all hosts. A single host is still requested politely (see the delay).",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Delay per host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum time between requests to one host. A robots.txt Crawl-delay raises it. robots.txt is always honored.",
            "default": 250
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "page",
              "chunk"
            ],
            "type": "string",
            "description": "Chunk mode splits every page and returns one item per chunk. Billing is per page either way.",
            "default": "page"
          },
          "chunkMarkdown": {
            "title": "Add chunks to page items",
            "type": "boolean",
            "description": "In page mode, also include a chunks list in every item.",
            "default": false
          },
          "chunkMaxChars": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Largest chunk. Chunks break at headings first, then between paragraphs, never inside a code block or table.",
            "default": 1500
          },
          "chunkMinChars": {
            "title": "Smallest chunk (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Sections shorter than this are joined to the previous chunk when they fit.",
            "default": 150
          },
          "chunkHeadingLevel": {
            "title": "Split at headings up to level",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "A new chunk starts at every heading of this level or higher (3 means #, ## and ###).",
            "default": 3
          },
          "chunkOverlapChars": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Text repeated from the end of the previous piece when a section is split.",
            "default": 0
          },
          "includeText": {
            "title": "Include plain text",
            "type": "boolean",
            "description": "Add a plain-text version of each page.",
            "default": false
          },
          "includeLinksInMarkdown": {
            "title": "Keep links in Markdown",
            "type": "boolean",
            "description": "Write links as [text](url). Turn off for text only.",
            "default": true
          },
          "includeImages": {
            "title": "Keep images in Markdown",
            "type": "boolean",
            "description": "Write images as ![alt](url).",
            "default": false
          },
          "includeLinkList": {
            "title": "Include link list",
            "type": "boolean",
            "description": "Add the absolute links found on each page.",
            "default": false
          },
          "minWords": {
            "title": "Minimum words",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Pages with fewer words of main content are treated as empty and not billed.",
            "default": 5
          },
          "renderJavaScript": {
            "title": "JavaScript rendering",
            "enum": [
              "never",
              "fallback",
              "always"
            ],
            "type": "string",
            "description": "Pages that build their content with JavaScript need the browser. Every page it renders is billed with an extra \"rendered page\" event.",
            "default": "never"
          },
          "renderWaitMs": {
            "title": "Wait after load (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra time for scripts to finish before the page is read.",
            "default": 1500
          },
          "maxRenderConcurrency": {
            "title": "Parallel browser pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages rendered at once.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}