{
  "openapi": "3.0.1",
  "info": {
    "title": "RAG Index Sync Reconciler",
    "description": "Compare a public docs site with a vector-index inventory. Separate added, changed, unchanged, confirmed-removed, and not-seen pages, then flag missing, stale, orphaned, and needlessly re-embedded documents. Never deletes from the index.",
    "version": "0.1",
    "x-build-id": "KrZw1RNXABIgTMZc6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~rag-index-sync-reconciler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-rag-index-sync-reconciler",
        "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/plusonets~rag-index-sync-reconciler/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-rag-index-sync-reconciler",
        "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/plusonets~rag-index-sync-reconciler/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-rag-index-sync-reconciler",
        "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": "Start URLs",
            "type": "array",
            "description": "Public documentation pages to crawl. The default is the Python tutorial index. Leave the sample inventory on for a first look, then replace it with your export.",
            "default": [
              {
                "url": "https://docs.python.org/3/tutorial/index.html"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Optional sitemap.xml. When this returns pages, those URLs are the scope and in-page links are not followed. Sitemap lastmod is stored as evidence and is not treated as proof that the text changed.",
            "default": ""
          },
          "includePatterns": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Optional. A URL is kept when it contains any pattern, or matches a glob that uses * or ?. Empty means no extra include filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "URLs matching any of these patterns are skipped. Binary assets are always skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop after this many successfully hashed documents. A run that stops here is partial: unseen pages are not confirmed removals.",
            "default": 30
          },
          "maxDepth": {
            "title": "Max link depth",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many link hops to follow from a start URL when no sitemap is used. Start URLs are depth 0.",
            "default": 2
          },
          "sameHostOnly": {
            "title": "Stay on the same host",
            "type": "boolean",
            "description": "Do not follow links to other hosts.",
            "default": true
          },
          "restrictToStartPath": {
            "title": "Stay under the start URL directory",
            "type": "boolean",
            "description": "When on, discovered URLs must stay under the directory of a start URL. The default keeps the Python tutorial demo inside /3/tutorial/. Turn this off to follow any same-host URL allowed by your patterns.",
            "default": true
          },
          "manifestStoreName": {
            "title": "Manifest store name",
            "type": "string",
            "description": "Named key-value store that keeps the versioned source manifest across runs. A failed or empty run does not replace the last good baseline. Use a separate name or scope per client.",
            "default": "rag-index-manifest"
          },
          "scopeId": {
            "title": "Scope ID",
            "type": "string",
            "description": "Isolates manifests when one store holds several sites. The default scope is only for the Python tutorial demo.",
            "default": "python-docs-tutorial"
          },
          "indexInventory": {
            "title": "Index inventory JSON or CSV",
            "type": "string",
            "description": "Paste a JSON array or CSV of doc_id and/or url, plus content_hash and optional chunk_hashes, updated_at, and embedding_generation. Hashes should be the content_hash values this Actor emitted when you embedded. Leave empty to use the sample inventory when that option is on.",
            "default": ""
          },
          "indexInventoryUrl": {
            "title": "Index inventory URL",
            "type": "string",
            "description": "Public https URL of a JSON or CSV inventory export. Private hosts are rejected.",
            "default": ""
          },
          "useBuiltInSampleInventory": {
            "title": "Use built-in sample inventory",
            "type": "boolean",
            "description": "Used only when you do not supply inventory text, an inventory URL, or an adapter. The sample is built from the pages just fetched and is deliberately missing, stale, re-embedded, and orphaned. Turn this off before a scheduled production run.",
            "default": true
          },
          "indexAdapter": {
            "title": "Index adapter",
            "enum": [
              "none",
              "pinecone",
              "qdrant"
            ],
            "type": "string",
            "description": "Optional read-only metadata list. Bring your own key. This Actor never upserts or deletes. Unofficial, not affiliated with Pinecone or Qdrant.",
            "default": "none"
          },
          "indexApiKey": {
            "title": "Index API key",
            "type": "string",
            "description": "Pinecone or Qdrant API key. Optional. Stored as a secret input and not written to the dataset."
          },
          "indexEndpoint": {
            "title": "Index endpoint",
            "type": "string",
            "description": "Pinecone index host (my-index-xxxx.svc.pinecone.io) or Qdrant base URL (https://example.cloud.qdrant.io).",
            "default": ""
          },
          "indexNamespace": {
            "title": "Namespace or collection",
            "type": "string",
            "description": "Pinecone namespace, or the Qdrant collection name. Required for Qdrant.",
            "default": ""
          },
          "indexIdField": {
            "title": "Document ID metadata field",
            "type": "string",
            "description": "Metadata field that stores the stable document id. Chunk vectors are grouped by it. Vector ids of the form doc_abc#c0000 are grouped when the field is absent.",
            "default": "doc_id"
          },
          "indexHashField": {
            "title": "Content hash metadata field",
            "type": "string",
            "description": "Metadata field that stores the document content hash emitted by this Actor. A separate chunk_hash field is read when present.",
            "default": "content_hash"
          },
          "includeMarkdown": {
            "title": "Include markdown for changed docs",
            "type": "boolean",
            "description": "Attach cleaned markdown only for added, changed, or rehashed documents. Unchanged pages stay hash-only. Store the text only if you have the right to keep it.",
            "default": false
          },
          "alertOnlyOnChange": {
            "title": "Alert only on change",
            "type": "boolean",
            "description": "Write dataset rows only when alert is true (source change, repair, hold, or needless re-embed). The LEDGER record and the run summary still contain the full result. Reconciliation events are charged for every delivered ledger row.",
            "default": false
          },
          "maxChargeUsd": {
            "title": "Max charge (USD)",
            "minimum": 0,
            "maximum": 1000,
            "type": "number",
            "description": "Optional extra cap using the suggested event prices ($0.004 per source check, $0.006 per reconciliation). The run also stops when the platform charge limit is reached. Leave empty to use only the platform limit."
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 8000,
            "type": "integer",
            "description": "Character window used after splitting on headings. Store the emitted chunk hashes if you want chunk-level stale detection.",
            "default": 1200
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Overlap between windows. Must be smaller than the chunk size.",
            "default": 150
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many page fetches may be in flight. Requests to one host are still spaced by the minimum delay.",
            "default": 4
          },
          "minDelayMillis": {
            "title": "Minimum delay (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum spacing between requests to the same host. A robots.txt crawl-delay up to 5 seconds overrides this when it is higher.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for each HTTP request.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}