{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinecone & Qdrant Vector Database Sync for RAG",
    "description": "Load any Apify dataset, like Website Content Crawler pages, into a Pinecone or Qdrant vector database for RAG. Chunks text, embeds with your own OpenAI or Cohere key, and re-embeds only new or changed chunks on later runs, deleting stale ones. $0.18 per 1,000 chunks upserted; unchanged chunks free.",
    "version": "0.0",
    "x-build-id": "wndtfo6FTl3wFDui5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/charlesmarkette~vector-db-sync-pinecone-qdrant-rag-loader-delta-updates/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-charlesmarkette-vector-db-sync-pinecone-qdrant-rag-loader-delta-updates",
        "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/charlesmarkette~vector-db-sync-pinecone-qdrant-rag-loader-delta-updates/runs": {
      "post": {
        "operationId": "runs-sync-charlesmarkette-vector-db-sync-pinecone-qdrant-rag-loader-delta-updates",
        "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/charlesmarkette~vector-db-sync-pinecone-qdrant-rag-loader-delta-updates/run-sync": {
      "post": {
        "operationId": "run-sync-charlesmarkette-vector-db-sync-pinecone-qdrant-rag-loader-delta-updates",
        "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": "Dataset",
            "type": "string",
            "description": "The dataset to sync, e.g. the output of Website Content Crawler. In an integration (Integrations → Connect Actor or task), use {{resource.defaultDatasetId}}."
          },
          "textFields": {
            "title": "Text fields",
            "type": "array",
            "description": "Fields to embed, joined with a blank line in this order. Dots for nested fields ('metadata.description'). Website Content Crawler puts the page text in 'text' (or 'markdown').",
            "default": [
              "text"
            ],
            "items": {
              "type": "string"
            }
          },
          "metadataFields": {
            "title": "Metadata fields",
            "type": "array",
            "description": "Fields stored with every chunk for filtering and citations. Dots for nested fields; each is stored under its last part ('metadata.title' → 'title'). The item's 'url' is always stored when it has one. Don't pick fields that change on every crawl (like timestamps): a changed field re-embeds the item.",
            "items": {
              "type": "string"
            }
          },
          "idField": {
            "title": "ID field",
            "type": "string",
            "description": "The field that identifies an item across runs (default 'url'). It's hashed into stable vector IDs, so the same page always overwrites its own vectors. Enter #text to identify items by their text instead (then a changed text counts as a new item, and the old one is only removed with 'Delete items no longer in the dataset').",
            "default": "url"
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 100,
            "maximum": 8000,
            "type": "integer",
            "description": "Maximum characters per chunk. 2,000 is about 500 tokens of English.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "Characters repeated from the end of one chunk at the start of the next (whole sentences or words where possible). At most half the chunk size.",
            "default": 200
          },
          "embeddingProvider": {
            "title": "Embedding provider",
            "enum": [
              "openai",
              "cohere"
            ],
            "type": "string",
            "description": "Who turns your chunks into vectors.",
            "default": "openai"
          },
          "embeddingModel": {
            "title": "Embedding model",
            "type": "string",
            "description": "Empty = text-embedding-3-small (OpenAI) or embed-english-v3.0 (Cohere). OpenAI: text-embedding-3-small (1536 dimensions), text-embedding-3-large (3072). Cohere: embed-english-v3.0 or embed-multilingual-v3.0 (1024), the -light-v3.0 versions (384), embed-v4.0 (1536)."
          },
          "embeddingApiKey": {
            "title": "Embedding API key",
            "type": "string",
            "description": "Your OpenAI (sk-…) or Cohere API key. Stored encrypted, never logged."
          },
          "dimensions": {
            "title": "Dimensions",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Optional smaller vector size: OpenAI text-embedding-3 models (any size up to the model's), Cohere embed-v4.0 (256, 512, 1024 or 1536). Must match your index. Empty = the model's own size."
          },
          "vectorDb": {
            "title": "Vector database",
            "enum": [
              "pinecone",
              "qdrant"
            ],
            "type": "string",
            "description": "Where the vectors go. Fill in the fields for that database below.",
            "default": "pinecone"
          },
          "pineconeApiKey": {
            "title": "Pinecone API key",
            "type": "string",
            "description": "Pinecone console → API keys. Stored encrypted, never logged."
          },
          "pineconeIndexHost": {
            "title": "Pinecone index host",
            "type": "string",
            "description": "The HOST shown on your index's page in the Pinecone console, like my-index-abc1234.svc.aped-4627-b74a.pinecone.io. The index must be dense, with your model's dimension."
          },
          "pineconeNamespace": {
            "title": "Pinecone namespace",
            "type": "string",
            "description": "Optional. Empty = the default namespace."
          },
          "qdrantUrl": {
            "title": "Qdrant URL",
            "type": "string",
            "description": "Your cluster URL, like https://xyz-example.eu-central.aws.cloud.qdrant.io:6333 (Qdrant Cloud) or https://qdrant.example.com:6333."
          },
          "qdrantApiKey": {
            "title": "Qdrant API key",
            "type": "string",
            "description": "Your Qdrant API key (empty for a server without authentication). Stored encrypted, never logged."
          },
          "qdrantCollection": {
            "title": "Qdrant collection",
            "type": "string",
            "description": "The collection to fill."
          },
          "createCollectionIfMissing": {
            "title": "Create the collection if missing",
            "type": "boolean",
            "description": "Creates the Qdrant collection with your model's dimension and Cosine distance when it doesn't exist.",
            "default": false
          },
          "qdrantVectorName": {
            "title": "Qdrant vector name",
            "type": "string",
            "description": "Only for collections with named vectors: the vector to fill. Empty = the collection's single unnamed vector."
          },
          "deltaMode": {
            "title": "Delta updates (only changed chunks)",
            "type": "boolean",
            "description": "Remembers a fingerprint of every chunk in your database, and embeds and upserts only new or changed chunks. Unchanged chunks are skipped for free. Turn off to re-embed everything once.",
            "default": true
          },
          "deleteRemoved": {
            "title": "Delete items no longer in the dataset",
            "type": "boolean",
            "description": "Deletes the vectors of items that earlier runs with the same 'Memory name' synced and that are missing from this dataset, e.g. pages removed from the site. Needs a 'Memory name' (unless the Actor runs as a saved task). For safety it deletes nothing when the run didn't read the whole dataset (Max items smaller than the dataset, or a cost stop), when the dataset is empty, when any item had no ID (an item with an ID but no text keeps its vectors and does not block this), or when more than half of the remembered items would go (see the next option).",
            "default": false
          },
          "allowLargeRemoval": {
            "title": "Allow removing more than half",
            "type": "boolean",
            "description": "Lets 'Delete items no longer in the dataset' remove more than 50% of the remembered items in one run. Leave off unless the site really shrank: a half-empty dataset (a failed crawl) would otherwise wipe your index.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run (count only, write nothing)",
            "type": "boolean",
            "description": "Reads and chunks the dataset and reports what would be upserted and deleted, without calling the embedding API or writing to the database (free). Checks the database connection and dimension when it's filled in.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Optional: sync only the first N dataset items (handy for a first test)."
          },
          "storeText": {
            "title": "Store the chunk text",
            "type": "boolean",
            "description": "Stores each chunk's text in the metadata under 'text' (what LangChain and most RAG code expect). Turn off to store only the vectors and your metadata fields. Changing this re-upserts every chunk.",
            "default": true
          },
          "stateName": {
            "title": "Memory name",
            "type": "string",
            "description": "Optional, but required for 'Delete items no longer in the dataset' (unless the Actor runs as a saved task). Runs with the same name and the same database target share one memory of synced chunks; use one name per source (e.g. 'docs-site') when several sources fill one index. Empty = the memory belongs to the saved task, or else to the database target alone."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}