{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset to Pinecone & Qdrant Vector Export",
    "description": "Send any Apify dataset to Pinecone or Qdrant for RAG and semantic search. Chunks text, embeds with your own OpenAI, Gemini or Cohere key, upserts with stable IDs, skips unchanged records (no re-embedding cost) and can delete stale ones. Runs after any scraper as an integration.",
    "version": "0.1",
    "x-build-id": "LmmLAPDLwTryReFZF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oldjard~dataset-to-pinecone-qdrant/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oldjard-dataset-to-pinecone-qdrant",
        "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/oldjard~dataset-to-pinecone-qdrant/runs": {
      "post": {
        "operationId": "runs-sync-oldjard-dataset-to-pinecone-qdrant",
        "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/oldjard~dataset-to-pinecone-qdrant/run-sync": {
      "post": {
        "operationId": "run-sync-oldjard-dataset-to-pinecone-qdrant",
        "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 export. Pick it from the list or paste its ID. When this runs as an integration after another Actor, this holds {{resource.defaultDatasetId}}, which Apify replaces with the finished run's dataset. Keep it. Leave everything empty for a free preview on a small sample."
          },
          "target": {
            "title": "Vector database",
            "enum": [
              "pinecone",
              "qdrant"
            ],
            "type": "string",
            "description": "Where the records go.",
            "default": "pinecone"
          },
          "pineconeHost": {
            "title": "Pinecone index host",
            "type": "string",
            "description": "Open your index in the Pinecone console and copy its HOST, e.g. https://my-index-abc1234.svc.aped-4627-b74a.pinecone.io. The index must already exist, with the same dimension as your embedding model (text-embedding-3-small: 1536; the actor asks OpenAI, Gemini and Cohere v4 for the index's size automatically)."
          },
          "pineconeApiKey": {
            "title": "Pinecone API key",
            "type": "string",
            "description": "From the Pinecone console, API Keys, in the project that owns the index. Stored encrypted, never logged."
          },
          "pineconeNamespace": {
            "title": "Pinecone namespace",
            "type": "string",
            "description": "Optional. Empty uses the index's default namespace."
          },
          "qdrantUrl": {
            "title": "Qdrant URL",
            "type": "string",
            "description": "Your cluster's REST address, e.g. https://xyz-example.eu-central.aws.cloud.qdrant.io:6333 (Qdrant Cloud: cluster details). Self-hosted works too if it's reachable from the internet over https."
          },
          "qdrantApiKey": {
            "title": "Qdrant API key",
            "type": "string",
            "description": "A key with write access (Qdrant Cloud: cluster, API Keys). Empty for a self-hosted Qdrant without auth. Stored encrypted, never logged."
          },
          "qdrantCollection": {
            "title": "Qdrant collection",
            "type": "string",
            "description": "The collection to write to."
          },
          "createCollection": {
            "title": "Create the collection if missing",
            "type": "boolean",
            "description": "Create it with the embedding model's size and the distance below.",
            "default": true
          },
          "qdrantDistance": {
            "title": "Distance (new collections)",
            "enum": [
              "Cosine",
              "Dot",
              "Euclid",
              "Manhattan"
            ],
            "type": "string",
            "description": "Used only when the actor creates the collection.",
            "default": "Cosine"
          },
          "qdrantVectorName": {
            "title": "Qdrant vector name",
            "type": "string",
            "description": "Only for collections with named vectors: which one to fill. Empty works for unnamed vectors, or when there is exactly one name."
          },
          "embeddingProvider": {
            "title": "Embedding provider",
            "enum": [
              "openai",
              "gemini",
              "cohere",
              "openai-compatible"
            ],
            "type": "string",
            "description": "Whose model turns text into vectors. You use your own key and pay the provider directly; the actor never stores or reuses it.",
            "default": "openai"
          },
          "embeddingApiKey": {
            "title": "Embedding API key",
            "type": "string",
            "description": "Your API key for the provider above. Stored encrypted, never logged."
          },
          "embeddingModel": {
            "title": "Embedding model",
            "type": "string",
            "description": "Empty uses text-embedding-3-small (OpenAI), gemini-embedding-001 (Gemini) or embed-v4.0 (Cohere). Required for an OpenAI-compatible API."
          },
          "embeddingDimensions": {
            "title": "Embedding dimensions",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Optional. Normally leave empty: with an existing index the actor asks the model for the index's size when the model allows it (OpenAI text-embedding-3, Gemini, Cohere v4)."
          },
          "embeddingBaseUrl": {
            "title": "Embedding API base URL",
            "type": "string",
            "description": "Only for an OpenAI-compatible API: its base URL ending in /v1, e.g. https://api.together.xyz/v1."
          },
          "textFields": {
            "title": "Text fields",
            "type": "array",
            "description": "The field(s) whose text is embedded, joined with a blank line. Nested fields use a dot: page.body. Empty picks the first of text, markdown, content, pageContent, body, description (fits Website Content Crawler and most scrapers).",
            "items": {
              "type": "string"
            }
          },
          "idFields": {
            "title": "ID fields",
            "type": "array",
            "description": "The field(s) that identify an item, so a re-run updates its records instead of duplicating them. Empty uses url, else id, else the text itself.",
            "items": {
              "type": "string"
            }
          },
          "metadataFields": {
            "title": "Metadata fields",
            "type": "array",
            "description": "Fields to store with each record for filtering (nested: author.name becomes author_name). Empty stores the item's short top-level values (strings up to 500 characters, numbers, booleans, short lists).",
            "items": {
              "type": "string"
            }
          },
          "storeText": {
            "title": "Store the chunk text in metadata",
            "type": "boolean",
            "description": "Most RAG setups need the text back with each match. On Pinecone it is cut to fit the 40 KB metadata limit if needed (the embedding always uses the whole chunk).",
            "default": true
          },
          "textMetadataKey": {
            "title": "Metadata key for the text",
            "type": "string",
            "description": "Name of the metadata field that holds the chunk text. LangChain and LlamaIndex default to text.",
            "default": "text"
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Longer texts are split at paragraph, line or sentence breaks into chunks of at most this many characters (2,000 is about 500 tokens).",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "How much each chunk repeats from the end of the previous one, so sentences at a cut aren't lost. At most half the chunk size.",
            "default": 200
          },
          "skipUnchanged": {
            "title": "Skip unchanged records",
            "type": "boolean",
            "description": "Before embedding, check which records the database already has with the same text, metadata and model, and skip them. Saves your embedding bill on daily runs; skipped records are free.",
            "default": true
          },
          "deleteStale": {
            "title": "Delete stale records",
            "type": "boolean",
            "description": "After a complete run, delete records with this sync key that this dataset no longer produces (removed pages, texts that got shorter). Skipped if the run stops early, covers only part of the dataset, or produced nothing, so an empty upstream run never wipes your index. Pinecone: serverless indexes.",
            "default": false
          },
          "syncKey": {
            "title": "Sync key",
            "type": "string",
            "description": "Labels the records this export owns (every record ID starts with it). Use a different key per source, e.g. docs-site and blog, so deleting stale records of one never touches the other.",
            "default": "apify"
          },
          "dryRun": {
            "title": "Preview only",
            "type": "boolean",
            "description": "Show the first records as they would be stored, and a token estimate, without embedding or writing anything. Free.",
            "default": false
          },
          "offset": {
            "title": "Skip first items",
            "minimum": 0,
            "type": "integer",
            "description": "Start from this item of the dataset.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Export at most this many items. Empty means all."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}