{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown - Content Extractor for LLM & RAG",
    "description": "Convert web pages or whole sites to clean Markdown and text for LLMs, RAG and AI agents. Main content without menus or ads, plus title, headings, language, date and optional RAG chunks. Fast HTTP, no browser, respects robots.txt. Export JSON/CSV or call via API/MCP.",
    "version": "1.0",
    "x-build-id": "DihZxMfahxLgYEeca"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teddythebuilder~website-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teddythebuilder-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/teddythebuilder~website-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-teddythebuilder-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/teddythebuilder~website-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-teddythebuilder-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": "Web pages to convert, e.g. https://docs.python.org/3/tutorial/. With crawl depth 0 only these pages are returned; with depth >= 1 links found on them are followed.",
            "default": [
              {
                "url": "https://docs.python.org/3/tutorial/index.html"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many link levels to follow from each start URL. 0 = only the start URLs (bulk URL list mode), 1 = also the pages they link to.",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages have been extracted (you pay only for extracted pages).",
            "default": 10
          },
          "contentMode": {
            "title": "Content mode",
            "enum": [
              "main",
              "precise",
              "fullPage"
            ],
            "type": "string",
            "description": "main = article/main content without menus, footers and cookie banners (best for LLMs); precise = stricter, less boilerplate; fullPage = keep more of the page (lists, sidebars).",
            "default": "main"
          },
          "chunkSize": {
            "title": "RAG chunk size (characters)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "If > 0, each page also gets a 'chunks' array split on paragraph boundaries, e.g. 1500 for embeddings. 0 = no chunks.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Characters carried over from the previous chunk, e.g. 150. At most half the chunk size.",
            "default": 0
          },
          "useSitemap": {
            "title": "Add URLs from sitemap.xml",
            "type": "boolean",
            "description": "Also queue the site's sitemap URLs (within the start URL's path), useful to convert a whole docs site.",
            "default": false
          },
          "stayWithinPath": {
            "title": "Stay within the start URL's folder",
            "type": "boolean",
            "description": "Follow only links under the start URL's folder, e.g. /docs/... for https://example.com/docs/intro. Links to other domains are never followed.",
            "default": true
          },
          "includeUrlPatterns": {
            "title": "Only URLs containing",
            "type": "array",
            "description": "Follow/return only URLs that contain one of these strings or match a glob, e.g. /blog/ or https://example.com/docs/*.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs containing",
            "type": "array",
            "description": "Skip URLs that contain one of these strings or match a glob, e.g. /tag/ or ?page=.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel page downloads (robots.txt crawl-delay is always honoured).",
            "default": 5
          },
          "includePlainText": {
            "title": "Also return plain text",
            "type": "boolean",
            "description": "Add a 'text' field without Markdown formatting.",
            "default": false
          },
          "keepLinksInMarkdown": {
            "title": "Keep hyperlinks in Markdown",
            "type": "boolean",
            "description": "Write links as [text](url) in the Markdown instead of plain text.",
            "default": false
          },
          "keepImages": {
            "title": "Keep images in Markdown",
            "type": "boolean",
            "description": "Keep images as ![alt](src) in the Markdown.",
            "default": false
          },
          "includeLinks": {
            "title": "Return all page links",
            "type": "boolean",
            "description": "Add a 'links' array with every absolute link found on the page (max 1,000).",
            "default": false
          },
          "minWordCount": {
            "title": "Minimum words",
            "minimum": 0,
            "type": "integer",
            "description": "Pages with fewer extracted words are returned as free 'no_main_content' rows instead of charged results, e.g. 50.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}