{
  "openapi": "3.0.1",
  "info": {
    "title": "Docs to Answers Pack — Citable AI-Ready Chunks",
    "description": "Turn a documentation site into a corpus an AI can answer FROM and CITE. Splits on headings rather than character counts, attaches a heading path and deep link to every chunk, drops boilerplate that repeats across pages, and hashes each chunk so you re-embed only what changed.",
    "version": "0.1",
    "x-build-id": "uYdAyIXuQ0krerRPB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alaudinburki~docs-to-answers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alaudinburki-docs-to-answers",
        "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/alaudinburki~docs-to-answers/runs": {
      "post": {
        "operationId": "runs-sync-alaudinburki-docs-to-answers",
        "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/alaudinburki~docs-to-answers/run-sync": {
      "post": {
        "operationId": "run-sync-alaudinburki-docs-to-answers",
        "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": "Documentation URLs",
            "type": "array",
            "description": "Where to start crawling. Point it at a docs homepage or section index.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pathPrefix": {
            "title": "Restrict to path prefix",
            "type": "string",
            "description": "Only crawl URLs whose path starts with this, e.g. /docs. The single most effective way to keep a blog or marketing site out of your corpus."
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper bound on pages fetched.",
            "default": 100
          },
          "followLinks": {
            "title": "Follow links",
            "type": "boolean",
            "description": "Crawl onward from the pages given. Turn off to process only the exact URLs supplied.",
            "default": true
          },
          "sameOriginOnly": {
            "title": "Stay on the same domain",
            "type": "boolean",
            "description": "Only follow links on the same domain as the start URL. Turn off only if your docs span subdomains.",
            "default": true
          },
          "maxChunkChars": {
            "title": "Max chunk size (characters)",
            "minimum": 200,
            "maximum": 8000,
            "type": "integer",
            "description": "Chunks split on headings first and size second, so this is a ceiling rather than a target. ~1500 chars suits most embedding models.",
            "default": 1500
          },
          "minChunkChars": {
            "title": "Min chunk size (characters)",
            "minimum": 0,
            "type": "integer",
            "description": "Anything smaller is folded into the previous chunk instead of being emitted as an unanswerable fragment.",
            "default": 120
          },
          "overlapChars": {
            "title": "Overlap between chunks",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Repeat this many characters from the previous chunk so a sentence spanning a boundary stays retrievable from both sides.",
            "default": 100
          },
          "dropRepeatedBoilerplate": {
            "title": "Drop repeated boilerplate",
            "type": "boolean",
            "description": "Remove chunks that repeat across pages — \"Was this page helpful?\", licence footers, the same admonition on 90 pages. These match every query and answer none.",
            "default": true
          },
          "nearDuplicateDetection": {
            "title": "Also catch near-duplicates",
            "type": "boolean",
            "description": "Catch boilerplate that differs by a word or two, not just exact repeats.",
            "default": true
          },
          "incrementalMode": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Store a hash per chunk and label each one added / changed / unchanged / removed on the next run. Embedding is the expensive step in a RAG pipeline — this lets you re-embed only what actually changed.",
            "default": false
          },
          "changedOnly": {
            "title": "Return only what changed",
            "type": "boolean",
            "description": "With incremental mode on, return just the added and changed chunks. Turns this into a scheduled corpus-refresh job.",
            "default": false
          },
          "snapshotKey": {
            "title": "Snapshot key",
            "type": "string",
            "description": "Key-value store key holding the previous run's hashes. Use different keys to track several corpora independently.",
            "default": "CORPUS_SNAPSHOT"
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to fetch at once. Lower it if the docs site is rate-limiting you.",
            "default": 8
          },
          "maxItems": {
            "title": "Max chunks",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on results. You are never charged beyond this.",
            "default": 20000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Most documentation sites need no proxy."
          },
          "targetChunkChars": {
            "title": "Target chunk size (characters)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Consecutive short sections on the same page are merged until they reach roughly this size. A 30-token chunk cannot answer a question — it only adds noise to retrieval. Set to 0 to keep every heading as its own chunk.",
            "default": 400
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}