{
  "openapi": "3.0.1",
  "info": {
    "title": "Rag Architect",
    "description": "Transform any website into vector-store-ready knowledge chunks for Pinecone, Weaviate, LangChain, LlamaIndex, Supabase, n8n & more. AI-generated Q&A pairs, smart chunking, PII scrubbing. Build hallucination-free RAG chatbots in minutes.",
    "version": "1.0",
    "x-build-id": "7JhfdCZczATgsGueE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ai_solutionist~rag-architect/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ai_solutionist-rag-architect",
        "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/ai_solutionist~rag-architect/runs": {
      "post": {
        "operationId": "runs-sync-ai_solutionist-rag-architect",
        "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/ai_solutionist~rag-architect/run-sync": {
      "post": {
        "operationId": "run-sync-ai_solutionist-rag-architect",
        "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": {
          "urls": {
            "title": "URLs to Process",
            "type": "array",
            "description": "List of web page URLs to extract and chunk (one per line).",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Process all URLs from a sitemap (takes precedence over individual URLs)."
          },
          "openaiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "Required for Q&A generation. Get one at platform.openai.com"
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "raw",
              "langchain",
              "llamaindex",
              "n8n",
              "pinecone",
              "weaviate",
              "supabase",
              "chroma",
              "qdrant",
              "milvus",
              "csv",
              "markdown"
            ],
            "type": "string",
            "description": "Choose the format that matches your tech stack.",
            "default": "raw"
          },
          "generateQA": {
            "title": "Generate Q&A Pairs",
            "type": "boolean",
            "description": "Create 3-5 battle-tested questions per chunk using GPT-4o-mini.",
            "default": true
          },
          "questionsPerChunk": {
            "title": "Questions per Chunk",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of Q&A pairs to generate for each chunk.",
            "default": 5
          },
          "chunkingConfig": {
            "title": "Chunking Configuration",
            "type": "object",
            "description": "Configure how content is split into chunks.",
            "properties": {
              "splitOn": {
                "title": "Split on Headers",
                "description": "Markdown header levels to split on (e.g., ##, ###)",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "minChunkSize": {
                "title": "Minimum Chunk Size",
                "description": "Minimum characters per chunk",
                "type": "integer"
              },
              "maxChunkSize": {
                "title": "Maximum Chunk Size",
                "description": "Maximum characters per chunk",
                "type": "integer"
              },
              "overlapSize": {
                "title": "Overlap Size",
                "description": "Characters to overlap between chunks",
                "type": "integer"
              },
              "preserveTables": {
                "title": "Preserve Tables",
                "description": "Keep tables as atomic units",
                "type": "boolean"
              },
              "preserveCodeBlocks": {
                "title": "Preserve Code Blocks",
                "description": "Keep code blocks as atomic units",
                "type": "boolean"
              }
            },
            "default": {
              "splitOn": [
                "##",
                "###"
              ],
              "minChunkSize": 100,
              "maxChunkSize": 2000,
              "overlapSize": 50,
              "preserveTables": true,
              "preserveCodeBlocks": true
            }
          },
          "piiConfig": {
            "title": "PII Scrubbing",
            "type": "object",
            "description": "Configure automatic detection and redaction of personal information.",
            "properties": {
              "enabled": {
                "title": "Enable PII Scrubbing",
                "description": "Enable automatic detection and redaction of personal information",
                "type": "boolean"
              },
              "redactEmails": {
                "title": "Redact Emails",
                "description": "Automatically redact email addresses",
                "type": "boolean"
              },
              "redactPhones": {
                "title": "Redact Phone Numbers",
                "description": "Automatically redact phone numbers",
                "type": "boolean"
              },
              "redactSSN": {
                "title": "Redact SSN",
                "description": "Automatically redact Social Security Numbers",
                "type": "boolean"
              },
              "redactCreditCards": {
                "title": "Redact Credit Cards",
                "description": "Automatically redact credit card numbers",
                "type": "boolean"
              },
              "whitelist": {
                "title": "Whitelist",
                "description": "Patterns to preserve (e.g., *@company.com)",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "default": {
              "enabled": true,
              "redactEmails": true,
              "redactPhones": true,
              "redactSSN": true,
              "redactCreditCards": true,
              "whitelist": []
            }
          },
          "stealthLevel": {
            "title": "Stealth Level",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Anti-bot protection level. 1=Basic, 2=Standard (residential proxies), 3=Elite.",
            "default": 2
          },
          "waitForSelector": {
            "title": "Wait for Selector",
            "type": "string",
            "description": "CSS selector to wait for before extracting (for JS-heavy pages)."
          },
          "waitForTimeout": {
            "title": "Wait Timeout (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum time to wait for page load.",
            "default": 30000
          },
          "excludeSelectors": {
            "title": "Exclude Selectors",
            "type": "string",
            "description": "CSS selectors to remove before extraction (comma-separated)."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Configure proxy for requests. Leave empty to use Apify's automatic proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}