{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to RAG Chunks: Vector-DB Ready Markdown",
    "description": "Crawl a website, docs portal or blog and get LLM-ready chunks for RAG: clean Markdown split by headings to your token budget, with overlap, heading path, chunk IDs, content hashes and page metadata. Drop straight into Pinecone, Qdrant, Weaviate, pgvector or LangChain. Pay per page.",
    "version": "1.0",
    "x-build-id": "EX5KP0BKnd2taGoDh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/torix33~website-to-rag-chunks/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-torix33-website-to-rag-chunks",
        "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/torix33~website-to-rag-chunks/runs": {
      "post": {
        "operationId": "runs-sync-torix33-website-to-rag-chunks",
        "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/torix33~website-to-rag-chunks/run-sync": {
      "post": {
        "operationId": "run-sync-torix33-website-to-rag-chunks",
        "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": "URLs",
            "type": "array",
            "description": "Start pages of the websites / docs to turn into chunks. One per line.",
            "items": {
              "type": "string"
            }
          },
          "crawl": {
            "title": "Crawl the website",
            "type": "boolean",
            "description": "Follow links on the same site from each start URL (breadth-first).",
            "default": true
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 = start pages only, 1 = pages linked from them, etc.",
            "default": 2
          },
          "maxPagesPerSite": {
            "title": "Max pages per site",
            "minimum": 1,
            "type": "integer",
            "description": "Cap per website when crawling.",
            "default": 100
          },
          "useSitemap": {
            "title": "Also use sitemap.xml",
            "type": "boolean",
            "description": "Add the site's sitemap URLs to the crawl (fast way to cover a whole blog or docs site).",
            "default": false
          },
          "includeUrlPattern": {
            "title": "Include URLs matching (regex)",
            "type": "string",
            "description": "Only crawl URLs matching this regular expression, e.g. <code>/blog/</code>."
          },
          "excludeUrlPattern": {
            "title": "Exclude URLs matching (regex)",
            "type": "string",
            "description": "Skip URLs matching this regular expression, e.g. <code>/tag/|/page/\\d+</code>."
          },
          "extractionMode": {
            "title": "Content extraction",
            "enum": [
              "article",
              "full"
            ],
            "type": "string",
            "description": "<b>Article</b>: main content only via Mozilla Readability (best for blogs, news, docs). <b>Full page</b>: whole body minus navigation, header, footer and sidebars.",
            "default": "article"
          },
          "maxTokens": {
            "title": "Max tokens per chunk",
            "minimum": 50,
            "maximum": 8000,
            "type": "integer",
            "description": "Chunk size budget (≈4 characters per token). 300–800 suits most embedding models.",
            "default": 500
          },
          "overlapTokens": {
            "title": "Overlap tokens",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Repeat the tail of the previous chunk (same section) at the start of the next one.",
            "default": 50
          },
          "splitOnHeadings": {
            "title": "Start a new chunk at every heading",
            "type": "boolean",
            "description": "Keeps each chunk inside one section (better retrieval). Off = pack sections together up to the token budget.",
            "default": true
          },
          "prependContext": {
            "title": "Prepend page title & heading path",
            "type": "boolean",
            "description": "Start each chunk's text with \"Page title > Section > Subsection\" so the embedding knows the context.",
            "default": true
          },
          "minWordCount": {
            "title": "Min word count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip (and don't charge for) pages with fewer words, e.g. tag or listing pages.",
            "default": 50
          },
          "maxResults": {
            "title": "Max results (cost cap)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many pages in total. <code>0</code> = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pages fetched in parallel.",
            "default": 20
          },
          "requestTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a page after this long.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed for most sites. Enable Apify Proxy for sites that block cloud servers.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}