{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to FAQ & Knowledge Pack for Support Bots",
    "description": "Turn a Website Content Crawler run into a support-bot knowledge pack: embedded chunks, a sourced FAQ per topic, a topic map and a grounded system prompt.",
    "version": "0.2",
    "x-build-id": "OVRdCk7GBd9FPb5Fb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seasons-ai~site-to-knowledge-pack/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seasons-ai-site-to-knowledge-pack",
        "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/seasons-ai~site-to-knowledge-pack/runs": {
      "post": {
        "operationId": "runs-sync-seasons-ai-site-to-knowledge-pack",
        "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/seasons-ai~site-to-knowledge-pack/run-sync": {
      "post": {
        "operationId": "run-sync-seasons-ai-site-to-knowledge-pack",
        "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": {
          "datasetId": {
            "title": "Crawled website dataset",
            "type": "string",
            "description": "The dataset of your Website Content Crawler run (apify/website-content-crawler) on your own site. Pick it from the list or paste its ID. The Actor only reads it."
          },
          "items": {
            "title": "Pages (instead of a dataset)",
            "type": "array",
            "description": "Optional. A JSON array of pages, each with \"url\", \"title\" and \"markdown\" (or \"text\"). Used only when no dataset is chosen."
          },
          "itemsUrl": {
            "title": "Pages file URL (instead of a dataset)",
            "type": "string",
            "description": "Optional. Link to a JSON array or JSON-lines file with the same fields (for example a dataset export link). Used only when neither a dataset nor pages are given."
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on unique pages processed (and charged). Duplicate and empty pages are skipped for free and do not count.",
            "default": 100
          },
          "maxCharsPerPage": {
            "title": "Max characters per page",
            "minimum": 1000,
            "maximum": 50000,
            "type": "integer",
            "description": "Longer pages are cut at a paragraph boundary after this many characters (after cleaning).",
            "default": 30000
          },
          "chunkTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 150,
            "maximum": 1000,
            "type": "integer",
            "description": "Target size of each chunk. Chunks follow the page headings and never mix two top-level sections.",
            "default": 500
          },
          "chunkOverlapTokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Text repeated between consecutive chunks of the same section, so answers that span a boundary are still retrieved. At most a third of the chunk size.",
            "default": 50
          },
          "maxTopics": {
            "title": "Max topics",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper limit on topic clusters. The Actor makes at most one topic per 4 pages.",
            "default": 20
          },
          "faqPerTopic": {
            "title": "FAQ items per topic",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Up to this many question-answer pairs per topic. Fewer are written when the pages do not support more; you pay only for items delivered.",
            "default": 5
          },
          "language": {
            "title": "Output language",
            "type": "string",
            "description": "Language of the FAQ and the system prompt, e.g. \"German\". Leave empty to use the site's language."
          },
          "companyName": {
            "title": "Company or product name",
            "type": "string",
            "description": "Optional. Used in the system prompt. Detected from the site when empty."
          },
          "botName": {
            "title": "Bot name",
            "type": "string",
            "description": "Optional. How the support bot introduces itself."
          },
          "supportContact": {
            "title": "Human support contact",
            "type": "string",
            "description": "Optional. Where the bot sends users it cannot help (e.g. a help-desk URL or support address). Contact details found on pages are removed from the pack."
          },
          "embeddingDimensions": {
            "title": "Embedding dimensions",
            "enum": [
              "1536",
              "1024",
              "512",
              "256"
            ],
            "type": "string",
            "description": "Size of each chunk vector. Use 1536, 1024, 512 or 256. 1536 is the most accurate; 512 or 256 make files 3-6× smaller for large sites. Same price.",
            "default": "1536"
          },
          "includeEmbeddings": {
            "title": "Include embeddings in chunks.jsonl",
            "type": "boolean",
            "description": "Turn off if you embed the chunks with your own model; the text, URL and heading path stay. Same price.",
            "default": true
          },
          "redactContacts": {
            "title": "Remove email addresses and phone numbers",
            "type": "boolean",
            "description": "Replace emails and phone numbers found on pages with [email] / [phone] in every output.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}