{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown for RAG & LLMs: Fast Crawler",
    "description": "Crawl any website and turn every page into clean Markdown for LLMs, RAG and AI agents. Fast HTTP crawler, main-content extraction, GFM tables, RAG chunks, llms.txt per domain, robots.txt respected. Flat price per page.",
    "version": "0.1",
    "x-build-id": "cbls0mPLpmHJ5EPZ9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rod_analytics~website-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rod_analytics-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/rod_analytics~website-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-rod_analytics-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/rod_analytics~website-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-rod_analytics-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 where the crawl starts. By default only pages under the same path are crawled: https://example.com/docs crawls /docs and everything below it.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many pages are saved. You pay per saved page, so this is also your cost cap.",
            "default": 100
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many links away from a start URL the crawler may go. 0 crawls only the start URLs (plus sitemap URLs, if enabled).",
            "default": 20
          },
          "includeGlobs": {
            "title": "Include URLs (globs)",
            "type": "array",
            "description": "Only crawl URLs matching at least one pattern. Use ** for any path, for example https://example.com/blog/**. When set, this replaces the \"Stay within start path\" rule.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeGlobs": {
            "title": "Exclude URLs (globs)",
            "type": "array",
            "description": "Never crawl URLs matching any of these patterns, for example **/tag/** or https://example.com/login**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Follow links only on the start URL hosts. www.example.com and example.com count as the same host.",
            "default": true
          },
          "stayWithinStartPath": {
            "title": "Stay within start path",
            "type": "boolean",
            "description": "Only follow links under the start URL path. Turn off to crawl the whole site.",
            "default": true
          },
          "useSitemaps": {
            "title": "Also use sitemap.xml",
            "type": "boolean",
            "description": "Find sitemaps via robots.txt and /sitemap.xml and queue the URLs they list (still filtered by the rules above). Finds pages that are not linked from anywhere.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "WARNING: keep this on. Pages disallowed by the site robots.txt are skipped and never charged. Turning it off logs a warning, and you alone are responsible for having permission to crawl the site.",
            "default": true
          },
          "extractionMode": {
            "title": "Content extraction",
            "enum": [
              "readability",
              "main",
              "full"
            ],
            "type": "string",
            "description": "Readability: finds the main article like Firefox Reader View and drops menus, sidebars, footers and cookie banners (best for RAG). Main element: only removes known boilerplate and keeps the main or article element. Full page: keeps everything except scripts and cookie banners.",
            "default": "readability"
          },
          "removeSelectors": {
            "title": "Remove CSS selectors",
            "type": "string",
            "description": "Extra elements to drop before conversion, as one CSS selector list. Example: .newsletter, #comments, .related-posts"
          },
          "dedupeContent": {
            "title": "Skip duplicate pages",
            "type": "boolean",
            "description": "Skip pages whose canonical URL was already saved or whose Markdown is identical to a saved page. Duplicates are not charged.",
            "default": true
          },
          "saveLlmsTxt": {
            "title": "Save llms.txt per domain",
            "type": "boolean",
            "description": "Write llms-<domain>.txt (index of pages) and llms-full-<domain>.txt (all Markdown in one file) to the key-value store at the end of the run.",
            "default": true
          },
          "includeChunks": {
            "title": "Split into RAG chunks",
            "type": "boolean",
            "description": "Add a chunks array to each page, split at headings, paragraphs and code blocks, ready for embeddings and a vector database.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 50,
            "maximum": 8000,
            "type": "integer",
            "description": "Target size of one chunk in estimated tokens (about 4 characters per token).",
            "default": 500
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "How many tokens of the previous chunk are repeated at the start of the next one. Capped at half the chunk size.",
            "default": 50
          },
          "jsRenderingFallback": {
            "title": "JavaScript rendering fallback",
            "type": "boolean",
            "description": "Off by default. When a page has almost no text over HTTP (a JavaScript app shell), open it once in headless Chrome and extract the rendered content. Rendered pages are billed as a separate, more expensive event. Use at least 2048 MB memory.",
            "default": false
          },
          "minWordsForHttp": {
            "title": "Render when fewer words than",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "With the fallback on, pages with fewer words than this over HTTP are rendered in the browser.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel requests in total.",
            "default": 10
          },
          "maxConcurrencyPerDomain": {
            "title": "Max concurrency per domain",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel requests to one host. Lower it for small sites.",
            "default": 5
          },
          "delayBetweenRequestsMs": {
            "title": "Delay between requests per domain (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum time between two request starts to the same host. 0 means no delay.",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Give up on a page after this many seconds.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for network errors and blocked responses. Failed pages are not charged.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Most sites work without a proxy. Use Apify datacenter proxy or your own proxy URLs if a site blocks you. Residential and SERP proxies are not supported.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}