{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to RAG Chunks: Markdown, Tokens & Incremental Crawl",
    "description": "Turn any website, docs site, PDF or DOCX into clean, heading-aware RAG chunks with exact token counts. Incremental mode only returns new or changed pages. Pay per page, not per chunk.",
    "version": "1.0",
    "x-build-id": "aHCl3LOeRL3PDaaHc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nacenempresas~rag-website-chunks/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nacenempresas-rag-website-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/nacenempresas~rag-website-chunks/runs": {
      "post": {
        "operationId": "runs-sync-nacenempresas-rag-website-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/nacenempresas~rag-website-chunks/run-sync": {
      "post": {
        "operationId": "run-sync-nacenempresas-rag-website-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": "Start URLs",
            "type": "array",
            "description": "Websites, docs sites, sitemaps or direct links to PDF/DOCX/TXT/MD/llms.txt files. Pages under the same path are discovered automatically via links and the sitemap.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of pages/documents returned (and charged) in this run. The crawl also stops at your run's spending limit.",
            "default": 100
          },
          "chunkSize": {
            "title": "Chunk size (tokens)",
            "minimum": 32,
            "maximum": 8192,
            "type": "integer",
            "description": "Maximum tokens per chunk. No chunk ever exceeds this limit: text is split by section, then paragraph, then sentence.",
            "default": 512
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2048,
            "type": "integer",
            "description": "Tokens repeated between consecutive chunks of the same section (max half of chunk size).",
            "default": 64
          },
          "tokenizer": {
            "title": "Tokenizer",
            "enum": [
              "cl100k_base",
              "o200k_base",
              "approximate"
            ],
            "type": "string",
            "description": "cl100k_base (GPT-4, GPT-3.5, text-embedding-3), o200k_base (GPT-4o and newer) or a fast approximation.",
            "default": "cl100k_base"
          },
          "output": {
            "title": "Output",
            "enum": [
              "chunks",
              "pages",
              "both"
            ],
            "type": "string",
            "description": "chunks: one row per chunk (ready for a vector database). pages: one row per page with full Markdown. both: both row types with a `type` field.",
            "default": "chunks"
          },
          "incremental": {
            "title": "Incremental mode (only new or changed pages)",
            "type": "boolean",
            "description": "Remembers a fingerprint of every page between runs. Unchanged pages are skipped and not charged. Ideal for scheduled runs that keep a vector index fresh.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Optional name of the key-value store that keeps incremental state. Leave empty to derive it from the start URLs."
          },
          "useSitemap": {
            "title": "Use sitemap",
            "type": "boolean",
            "description": "Discover pages from robots.txt sitemaps and /sitemap.xml, including pages that are not linked.",
            "default": true
          },
          "stayWithinPath": {
            "title": "Stay within start URL path",
            "type": "boolean",
            "description": "Only crawl URLs under the start URL's folder (e.g. /docs/). Disable to crawl the whole domain.",
            "default": true
          },
          "includeGlobs": {
            "title": "Include URLs (globs)",
            "type": "array",
            "description": "Only crawl URLs matching these patterns, e.g. https://example.com/docs/**",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "excludeGlobs": {
            "title": "Exclude URLs (globs)",
            "type": "array",
            "description": "Never crawl URLs matching these patterns, e.g. **/changelog/**",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "type": "integer",
            "description": "How many link hops from the start URL to follow.",
            "default": 20
          },
          "includeFiles": {
            "title": "Linked documents to convert",
            "type": "array",
            "description": "Linked files that are downloaded and chunked too.",
            "items": {
              "type": "string",
              "enum": [
                "PDF",
                "DOCX",
                "TXT",
                "MD"
              ]
            },
            "default": [
              "PDF",
              "DOCX",
              "TXT",
              "MD"
            ]
          },
          "jsFallback": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "auto: fast HTTP first, headless browser only for pages that come back (almost) empty. always: render every page. never: HTTP only.",
            "default": "auto"
          },
          "removeBoilerplate": {
            "title": "Remove repeated boilerplate",
            "type": "boolean",
            "description": "Drop menus, footers and cookie notices that repeat across pages, plus duplicate chunks and near-duplicate pages.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs disallowed by the site's robots.txt.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel HTTP requests.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use a proxy for sites that block datacenter 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}