{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinecone All-in-One Integration",
    "description": "Crawl websites, store datasets, run semantic searches, delete vectors, and check index stats — all in one actor. Uses Pinecone Integrated Inference by default — no OpenAI key needed. Bring your own Pinecone API key and start in minutes.",
    "version": "1.0",
    "x-build-id": "bopn1XRJA3jNtnta9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~pinecone-integration/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-pinecone-integration",
        "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/brilliant_gum~pinecone-integration/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-pinecone-integration",
        "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/brilliant_gum~pinecone-integration/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-pinecone-integration",
        "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",
        "required": [
          "mode",
          "pineconeApiKey",
          "pineconeIndexName"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "crawl-and-store",
              "store-dataset",
              "query",
              "delete",
              "index-stats"
            ],
            "type": "string",
            "description": "Operation mode: crawl-and-store (crawl URLs and store in Pinecone), store-dataset (store Apify dataset), query (semantic search), delete (remove vectors), index-stats (index info).",
            "default": "crawl-and-store"
          },
          "pineconeApiKey": {
            "title": "Pinecone API Key",
            "type": "string",
            "description": "Your Pinecone API key. Get it from https://app.pinecone.io/"
          },
          "pineconeIndexName": {
            "title": "Pinecone Index Name",
            "type": "string",
            "description": "Name of the Pinecone index to use. Will be auto-created if it doesn't exist (when autoCreateIndex is enabled)."
          },
          "pineconeNamespace": {
            "title": "Namespace",
            "type": "string",
            "description": "Pinecone namespace to target. Leave empty for the default namespace.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "URLs to start crawling from. Supports direct URLs or request list sources.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "URL to an XML sitemap. All URLs from the sitemap will be crawled."
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of pages to crawl.",
            "default": 100
          },
          "maxDepth": {
            "title": "Max Crawl Depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum link depth to follow from start URLs. 0 = only start URLs.",
            "default": 3
          },
          "contentSelector": {
            "title": "Content CSS Selector",
            "type": "string",
            "description": "CSS selectors for the main content area. Multiple selectors separated by commas. The first match is used.",
            "default": "main, article, .content, .post, #content"
          },
          "excludeSelectors": {
            "title": "Exclude CSS Selectors",
            "type": "array",
            "description": "CSS selectors for elements to remove before extracting content.",
            "default": [
              "nav",
              "footer",
              "header",
              "aside",
              ".sidebar",
              ".menu",
              ".cookie",
              "script",
              "style",
              "noscript"
            ],
            "items": {
              "type": "string"
            }
          },
          "renderJavaScript": {
            "title": "Render JavaScript",
            "type": "boolean",
            "description": "Use a headless browser to render JavaScript. Needed for SPAs and dynamic content.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for crawling.",
            "default": {
              "useApifyProxy": true
            }
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "Apify dataset ID or name to load data from."
          },
          "datasetFields": {
            "title": "Text Fields",
            "type": "array",
            "description": "Dataset fields to extract text from. Content from all specified fields is concatenated.",
            "default": [
              "text"
            ],
            "items": {
              "type": "string"
            }
          },
          "metadataFields": {
            "title": "Metadata Field Mapping",
            "type": "object",
            "description": "Map of dataset field names to Pinecone metadata keys. Example: {\"pageUrl\": \"url\", \"pageTitle\": \"title\"}",
            "default": {}
          },
          "embeddingProvider": {
            "title": "Embedding Provider",
            "enum": [
              "pinecone",
              "openai",
              "cohere"
            ],
            "type": "string",
            "description": "Which embedding provider to use. 'pinecone' uses Pinecone Integrated Inference (no extra API key needed!). 'openai' and 'cohere' require their respective API keys.",
            "default": "pinecone"
          },
          "embeddingModel": {
            "title": "Embedding Model",
            "type": "string",
            "description": "Embedding model name. Leave empty for auto-selection: Pinecone → multilingual-e5-large, OpenAI → text-embedding-3-small, Cohere → embed-english-v3.0",
            "default": ""
          },
          "embeddingsApiKey": {
            "title": "Embeddings API Key",
            "type": "string",
            "description": "API key for OpenAI or Cohere. Not needed when using Pinecone Integrated Inference."
          },
          "pineconeCloud": {
            "title": "Cloud Provider",
            "enum": [
              "aws",
              "gcp",
              "azure"
            ],
            "type": "string",
            "description": "Cloud provider for index creation (only used when auto-creating a new index).",
            "default": "aws"
          },
          "pineconeRegion": {
            "title": "Cloud Region",
            "type": "string",
            "description": "Cloud region for index creation (only used when auto-creating a new index).",
            "default": "us-east-1"
          },
          "autoCreateIndex": {
            "title": "Auto-Create Index",
            "type": "boolean",
            "description": "Automatically create the Pinecone index if it doesn't exist.",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk Size (chars)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of characters per text chunk.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk Overlap (chars)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Number of overlapping characters between consecutive chunks.",
            "default": 200
          },
          "prependContext": {
            "title": "Prepend Source Context",
            "type": "boolean",
            "description": "Prepend the page title and URL to each chunk for better search relevance.",
            "default": true
          },
          "queryText": {
            "title": "Search Query",
            "type": "string",
            "description": "The text to search for in your Pinecone index."
          },
          "topK": {
            "title": "Number of Results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many results to return.",
            "default": 10
          },
          "metadataFilter": {
            "title": "Metadata Filter",
            "type": "object",
            "description": "Pinecone metadata filter in JSON format. Example: {\"url\": {\"$eq\": \"https://example.com\"}}"
          },
          "includeMetadata": {
            "title": "Include Metadata",
            "type": "boolean",
            "description": "Include metadata in query results.",
            "default": true
          },
          "rerankModel": {
            "title": "Rerank Model",
            "enum": [
              "none",
              "bge-reranker-v2-m3",
              "pinecone-rerank-v0"
            ],
            "type": "string",
            "description": "Optional reranking model to improve result relevance.",
            "default": "none"
          },
          "rerankTopN": {
            "title": "Results After Reranking",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of results to return after reranking.",
            "default": 5
          },
          "deleteMode": {
            "title": "Delete Mode",
            "enum": [
              "by-ids",
              "by-filter",
              "all-namespace"
            ],
            "type": "string",
            "description": "How to select vectors for deletion."
          },
          "deleteIds": {
            "title": "Vector IDs to Delete",
            "type": "array",
            "description": "List of vector IDs to delete.",
            "items": {
              "type": "string"
            }
          },
          "deleteFilter": {
            "title": "Delete Filter",
            "type": "object",
            "description": "Metadata filter for deletion in JSON format. Example: {\"url\": {\"$eq\": \"https://example.com\"}}"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}