{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown Crawler - Pages to Markdown for LLM & RAG",
    "description": "Website to Markdown crawler: page or site URLs in, clean LLM-ready Markdown out, one row per page with title, description, headings, word / token counts, dates and a change hash. Follows links or sitemaps, respects robots.txt. HTTP only. $0.30 / 1,000 pages.",
    "version": "1.0",
    "x-build-id": "qrcjv5SSvVexoNfCc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~website-to-markdown-crawler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~website-to-markdown-crawler/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~website-to-markdown-crawler/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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": "Pages or sites to convert, one per line: full URLs (https://example.com/docs/) or bare domains (example.com). Bulk lists of thousands of URLs are fine. Each URL is also the starting point of a crawl when crawl depth is above 0.",
            "items": {
              "type": "string"
            }
          },
          "maxCrawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "0 = fetch only the start URLs (and sitemap URLs). 1 = also every in-scope page linked from them, 2 = links of those pages, and so on (max 20).",
            "default": 1
          },
          "maxResults": {
            "title": "Max pages in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many pages are saved (all start URLs together). 0 = no limit. You are charged only for saved pages.",
            "default": 50
          },
          "maxPagesPerSite": {
            "title": "Max pages per start URL",
            "minimum": 0,
            "type": "integer",
            "description": "Page budget for each start URL, so one big site cannot use the whole run. 0 = no per-site limit.",
            "default": 0
          },
          "crawlScope": {
            "title": "Which links to follow",
            "enum": [
              "same-path",
              "same-hostname",
              "same-domain",
              "any"
            ],
            "type": "string",
            "description": "same-path = only pages under the start URL's folder (https://site.com/docs/... for a /docs/ start). same-hostname = the whole host. same-domain = the host and its subdomains (blog.site.com, docs.site.com). any = every link (use with URL patterns).",
            "default": "same-path"
          },
          "useSitemaps": {
            "title": "Also read sitemap.xml",
            "type": "boolean",
            "description": "Read the sitemaps listed in robots.txt (or /sitemap.xml) and add every in-scope page URL. The fastest way to convert a whole docs site or blog without crawling links.",
            "default": false
          },
          "includeUrlPatterns": {
            "title": "Only URLs containing",
            "type": "array",
            "description": "Optional. Follow / save only URLs that contain one of these texts or match a * wildcard pattern, e.g. \"/blog/\" or \"https://site.com/docs/*/guide*\". Start URLs are always fetched.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs containing",
            "type": "array",
            "description": "Optional. Never follow URLs that contain one of these texts or match a * pattern, e.g. \"/tag/\", \"?page=\", \"*/changelog*\".",
            "items": {
              "type": "string"
            }
          },
          "onlyMainContent": {
            "title": "Main content only",
            "type": "boolean",
            "description": "Drop navigation, headers, footers, sidebars, cookie banners, share / newsletter boxes and keep the article or main block. Turn off to convert the whole <body>.",
            "default": true
          },
          "mainContentSelector": {
            "title": "Main content CSS selector",
            "type": "string",
            "description": "Optional. CSS selector of the block to convert when you know the site, e.g. \"article\", \"#content\", \".post-body\". Falls back to automatic detection when it matches nothing."
          },
          "removeSelectors": {
            "title": "Remove CSS selectors",
            "type": "string",
            "description": "Optional. Comma-separated CSS selectors removed before conversion, e.g. \".ad-slot, #related, .author-box\"."
          },
          "includeLinksInMarkdown": {
            "title": "Keep links in Markdown",
            "type": "boolean",
            "description": "Keep [text](url) links (absolute URLs). Turn off for plain prose with fewer tokens.",
            "default": true
          },
          "includeImagesInMarkdown": {
            "title": "Keep images in Markdown",
            "type": "boolean",
            "description": "Keep ![alt](url) image references (absolute URLs). Turn off to save tokens.",
            "default": true
          },
          "saveText": {
            "title": "Also save plain text",
            "type": "boolean",
            "description": "Add a \"text\" field: the main content as plain text with paragraph breaks.",
            "default": false
          },
          "saveCleanHtml": {
            "title": "Also save cleaned HTML",
            "type": "boolean",
            "description": "Add an \"html\" field: the main-content HTML after cleaning (absolute links, no scripts / styles).",
            "default": false
          },
          "saveLinks": {
            "title": "Also save link and image lists",
            "type": "boolean",
            "description": "Add internalLinks, externalLinks (url + anchor text) and images (url + alt) arrays. Counts are always saved.",
            "default": false
          },
          "saveJsonLd": {
            "title": "Also save JSON-LD",
            "type": "boolean",
            "description": "Add a \"jsonLd\" array with every schema.org JSON-LD object on the page (Article, Product, Organization, FAQ ...).",
            "default": false
          },
          "minWordCount": {
            "title": "Skip pages under N words",
            "minimum": 0,
            "type": "integer",
            "description": "Pages whose main content has fewer words are not saved and not charged (their links are still followed). 0 = keep all.",
            "default": 0
          },
          "maxMarkdownChars": {
            "title": "Cut Markdown after N characters",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate very long pages for LLM context limits; markdownTruncated tells you when it happened. 0 = no limit.",
            "default": 0
          },
          "changeTrackingStore": {
            "title": "Change tracking store name",
            "type": "string",
            "description": "Optional, for scheduled monitoring. Name of a key-value store (letters, digits, -) that remembers each page's content hash between runs. With it, pages whose content did not change since the last run are skipped and not charged; changeStatus says new / changed."
          },
          "saveUnchangedPages": {
            "title": "Save unchanged pages too",
            "type": "boolean",
            "description": "With change tracking on: also save (and charge) pages that did not change, marked changeStatus = unchanged.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs that the site's robots.txt disallows for all crawlers (counted in RUN_SUMMARY, never charged).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many pages are fetched at the same time (1-100). Lower it for small sites.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries for network errors, 5xx and 401 / 403 / 429 answers (with a fresh session each time).",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most sites. Turn on Apify Proxy (datacenter or residential) for sites that rate-limit or block cloud IPs.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}