Cloudflare Vectorize icon

Cloudflare Vectorize

Execute operations against Cloudflare Vectorize vector databases. Supports vector operations (insert, upsert, query), index management, metadata filtering, and can be used as a tool by AI Agents for semantic search and RAG applications.

Vector → Get by IDs

AI-generated

Overview

The "Get by IDs" operation of the Cloudflare Vectorize node retrieves specific vectors from a named vector index by their unique vector IDs. This operation is useful when you have stored vectors in a vector database and want to fetch exact vectors for further processing, analysis, or validation.

Common scenarios include:

  • Retrieving embeddings or feature vectors previously inserted into a vector index for inspection or downstream tasks.
  • Fetching multiple vectors by their IDs to compare or aggregate results.
  • Using retrieved vectors as inputs for other operations like similarity queries or machine learning workflows.

For example, if you have an index storing document embeddings, you can use this operation to get the vectors corresponding to certain document IDs to analyze their content or metadata.

Properties

Name Meaning
Index Name The name of the Vectorize index to query. Must be lowercase and contain only letters, numbers, and hyphens.
Vector IDs An array of vector IDs (strings) to retrieve from the specified index. Example: ["vector-1", "vector-2"]

Output

The output JSON contains the following fields:

  • vectors: An array of vector objects retrieved by the given IDs. Each vector object typically includes its ID, vector values, and optionally metadata depending on the index configuration.
  • count: The number of vectors returned in the response.

This output allows you to access the exact vectors requested by their IDs. The node does not output binary data for this operation; all data is returned as JSON.

Example output structure:

{
  "vectors": [
    {
      "id": "vector-1",
      "values": [0.1, 0.2, 0.3],
      "metadata": { "category": "example" }
    },
    {
      "id": "vector-2",
      "values": [0.4, 0.5, 0.6],
      "metadata": { "category": "example2" }
    }
  ],
  "count": 2
}

Dependencies

  • Requires an API key credential for authenticating with the Cloudflare Vectorize service.
  • The node depends on the external Cloudflare Vectorize API to perform vector retrieval.
  • Proper configuration of the vector index in Cloudflare Vectorize is necessary before retrieving vectors.

Troubleshooting

  • Error: Unknown resource or operation — Ensure that the Resource is set to "Vector" and Operation to "Get by IDs".
  • Invalid index name — The index name must be lowercase and only contain letters, numbers, and hyphens.
  • Vector IDs not found — If some vector IDs do not exist in the index, they will not appear in the output. Verify the IDs are correct.
  • Authentication errors — Check that the API key credential is valid and has permissions to access the specified index.
  • Malformed JSON input for vector IDs — The vector IDs property expects a JSON array of strings. Make sure it is properly formatted.

Links and References

Discussion