{
  "openapi": "3.0.1",
  "info": {
    "title": "Markdown Crawler API — Crawl a Whole Website to Markdown",
    "description": "Crawls a site (links or sitemap, depth and page limits, robots.txt respected) into one Markdown document per page with title, URL, headings and links, for RAG. Unofficial Website to Markdown API.",
    "version": "0.1",
    "x-build-id": "DuFsuNYcyz6iRckpt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/highbrow_fame~markdown-site-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-highbrow_fame-markdown-site-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/highbrow_fame~markdown-site-crawler/runs": {
      "post": {
        "operationId": "runs-sync-highbrow_fame-markdown-site-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/highbrow_fame~markdown-site-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-highbrow_fame-markdown-site-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Where the crawl begins, one address per line. Links on each page that stay on the same website are followed, breadth first, until the page or depth limit is reached.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many pages per start URL (fetched pages; failed pages count too). The run's \"Maximum charge\" caps the cost as well.",
            "default": 50
          },
          "maxDepth": {
            "title": "Max depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many links away from the start URL to go. 0: only the start pages; 1: the start pages and the pages they link to; and so on.",
            "default": 3
          },
          "includeGlobs": {
            "title": "Include only",
            "type": "array",
            "description": "Follow only addresses matching one of these patterns, e.g. https://docs.example.com/guide/** or /blog/**. ** matches anything, * anything but a slash. Empty: every page on the same website.",
            "items": {
              "type": "string"
            }
          },
          "excludeGlobs": {
            "title": "Exclude",
            "type": "array",
            "description": "Never follow addresses matching one of these patterns, e.g. **/tag/** or https://docs.example.com/archive/**.",
            "items": {
              "type": "string"
            }
          },
          "useSitemap": {
            "title": "Seed from sitemap",
            "type": "boolean",
            "description": "Also read the site's sitemap (from robots.txt or /sitemap.xml, one index level deep) and queue its pages at depth 1 — the fastest way to cover a whole site.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the site's robots.txt disallows and honour its Crawl-delay (up to 10 s). Turn off only for sites you have permission to crawl.",
            "default": true
          },
          "sameDomainOnly": {
            "title": "Same website only",
            "type": "boolean",
            "description": "Follow only links on the start URL's host (www. and non-www. count as one). Turn off to follow links anywhere — then use Include only to keep the crawl bounded.",
            "default": true
          },
          "stripQuery": {
            "title": "Ignore query strings",
            "type": "boolean",
            "description": "Treat /page?utm=x and /page as the same address and drop the query. Turn off for sites where the query selects the content (?id=123).",
            "default": true
          },
          "ignoreExtensions": {
            "title": "Skip file types",
            "type": "array",
            "description": "Links ending in one of these extensions are not fetched.",
            "default": [
              "pdf",
              "jpg",
              "jpeg",
              "png",
              "gif",
              "webp",
              "svg",
              "ico",
              "bmp",
              "tif",
              "tiff",
              "zip",
              "gz",
              "tgz",
              "tar",
              "rar",
              "7z",
              "mp3",
              "mp4",
              "m4a",
              "m4v",
              "mov",
              "avi",
              "webm",
              "ogg",
              "wav",
              "css",
              "js",
              "mjs",
              "json",
              "xml",
              "rss",
              "atom",
              "woff",
              "woff2",
              "ttf",
              "eot",
              "otf",
              "doc",
              "docx",
              "xls",
              "xlsx",
              "ppt",
              "pptx",
              "exe",
              "dmg",
              "apk",
              "iso",
              "bin"
            ],
            "items": {
              "type": "string"
            }
          },
          "mainContentOnly": {
            "title": "Main content only",
            "type": "boolean",
            "description": "Keep the main content of each page (Readability) and drop navigation, headers, footers and sidebars. Turn off to convert the whole page.",
            "default": true
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "Also deliver every link on each page (up to 500) as links[] with href and anchor text.",
            "default": false
          },
          "maxTextLength": {
            "title": "Max text length",
            "minimum": 0,
            "type": "integer",
            "description": "Cut text and Markdown after this many characters (textTruncated: true). 0: no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to fetch at the same time. A site's Crawl-delay still applies between its pages.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used only to try again after a network error: the first try goes out directly.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}