Skip to main content
Go to documentation:
⌘U
Weaviate Database

Develop AI applications using Weaviate's APIs and tools

Deploy

Deploy, configure, and maintain Weaviate Database

Query Agent

Run agentic search over your Weaviate Cloud collections

Weaviate Cloud

Manage and scale Weaviate in the cloud

Engram

Persistent memory for LLM agents and applications

Additional resources

Integrations
Weaviate Academy

Need help?

Weaviate LogoAsk AI Assistant⌘K
Support
Community Forum
Contributor guide

APIs

Weaviate provides multiple Application Programming Interfaces (APIs) to interact with the database, manage instances, and perform searches. Weaviate exposes three main APIs:

  • RESTful API: Enables almost complete management of a Weaviate instance.

    • Includes operations for managing collections (creating, reading, updating, deleting collections and their definitions), performing basic CRUD (Create, Read, Update, Delete) operations on individual data objects, checking node status, backups, and managing cluster health.
    • The machine-readable specification behind this reference is published at https://docs.weaviate.io/openapi.json. See Machine-readable API specification below.
    • The reference also lists an experimental REST Search API (the /v1/search/{collection}/... and /v1/aggregate/{collection} endpoints), which is disabled by default and rejects requests with a 422 status until EXPERIMENTAL_REST_SEARCH_ENABLED is set to true.
  • Search API - GraphQL: Designed specifically for data querying and exploration.

    • Enables complex search operations, including semantic (vector) search (nearText, nearVector, etc.), keyword search (bm25), hybrid search, filtering, retrieving specific data properties, aggregations, and exploring connections between data objects (cross-references).
  • Search API - gRPC: A high-performance alternative for GraphQL when it comes to demanding data operations.

    • gRPC is progressively being implemented for various Weaviate operations, particularly focusing on search/query functionalities and batch data imports. It leverages Protocol Buffers for faster serialization, lower latency, and efficient data streaming compared to traditional REST/JSON communication.

Machine-readable API specification

The RESTful API reference is rendered from the same specification file that Weaviate builds its REST server from: the request handlers, models, and generated Go client are all produced from it. The specification therefore defines the API rather than describing it after the fact.

For tools, code generators, and agents, that specification is published at the conventional discovery URL https://docs.weaviate.io/openapi.json, which is where most tooling looks for it. The document is written in Swagger 2.0 (OpenAPI 2.0) format, not OpenAPI 3.x, so a consumer that only accepts 3.x needs to convert it first.

Alternative URL, versioning, and scope

/openapi.json serves a rewrite of https://docs.weaviate.io/specs/weaviate-openapi.json. Both URLs return the same document, so request whichever suits your tooling.

The published document is a copy of the specification taken from a Weaviate release branch, and it is updated periodically rather than on every release. Read its info.version field to see which Weaviate version it describes, and compare that with the version you are running.

The specification describes the REST API only. The GraphQL and gRPC search APIs are documented separately, and Weaviate's gRPC service is defined by its protocol buffer files rather than by this document.

Client libraries and API usage

Weaviate offers official client libraries for these programming languages:

TIP: Using the official client libraries for interacting with Weaviate

The client libraries abstract away the complexities of making direct REST, GraphQL, or gRPC calls. You interact with Weaviate using idiomatic methods and objects in your preferred language.

Modern versions of the client libraries are designed to automatically utilize the more performant gRPC interface for search and query operations whenever possible and supported by the Weaviate instance you are connected to. They handle the negotiation and use the optimal protocol under the hood, typically requiring only the standard connection details (like the REST endpoint URL and authentication keys) for setup.

Questions and feedback