Skip to main content

References - Client Libraries

LICENSEย Weaviate on Stackoverflow badgeย Weaviate issues on GitHub badgeย Weaviate version badgeย Weaviate total Docker pulls badgeย Go Report Card

Overviewโ€‹

You can interact with Weaviate by using the GraphQL or RESTful API directly, or with one of the available client libraries.

Currently, Weaviate supports:

JS โ†’ TS

Please note that the JavaScript client library is no longer maintained. Please migrate to the TypeScript library.

Don't see your preferred language?

If you want to contribute one or request for us to work on a particular client, please let us know on the forum

With these clients you can perform all RESTful and GraphQL requests. This means you can use any endpoint, and perform all GraphQL queries directly from your Python, TypeScript/JavaScript, Java or Go scripts.

The Weaviate documentation, including the RESTful API and GraphQL reference pages, include code snippets using each client. The methods of the clients are designed to reflect the API functions 1:1, but are designed (structured and named) in the way native to the language.

Native vs GraphQL queriesโ€‹

When querying Weaviate you can choose to write your queries in GraphQL and send the raw GraphQL query to Weaviate, or you can write the query natively to the client language you are using.

For example, if you were using the Weaviate Python client:

import weaviate

client = weaviate.Client("http://localhost:8080")

result = client.query.get("Article", ["title", "url", "wordCount"]).do()

print(result)

Yields the same result as:

import weaviate

client = weaviate.Client("http://localhost:8080")

query = """
{
Get {
Article {
title
url
wordCount
}
}
}
"""

result = client.query.raw(query)

print(result)

Client-specific functionsโ€‹

Additional to complete reflection of the RESTful and GraphQL API, the clients have some client-specific functions. These functions are documented on the client pages. An overview of features of the clients:

FeaturePython clientTypeScript clientJava clientGo client
RESTful API endpointsVVVV
GraphQL GetVVVV
GraphQL AggregateVVVV
GraphQL ExploreVVVV
Uploading a full JSON schemaVXXX
Deleting a full JSON schemaVXXX
Check schemaVXXX

Command Line Interface (CLI)โ€‹

You can interact with Weaviate via a command line interface. Information about how to install and use can be found here.

More Resourcesโ€‹

If you can't find the answer to your question here, please look at the:

  1. Frequently Asked Questions. Or,
  2. Knowledge base of old issues. Or,
  3. For questions: Stackoverflow. Or,
  4. For more involved discussion: Weaviate Community Forum. Or,
  5. We also have a Slack channel.