SurrealDB Docs Logo

Enter a search query

JavaScript SDK

The SurrealDB SDK for JavaScript and TypeScript is the primary SDK for interacting with SurrealDB from frontend and server-side applications, systems, and APIs. It is designed to be used in a number of environments, including browser-based applications, server-side applications, and serverless functions. You can use the JavaScript SDK to interact with your SurrealDB database instances, or to run SurrealDB as an embedded database within your JavaScript based application, with functionality for executing queries, managing data, running database functions, authenticating to the database, building user signup and authentication functionality, and subscribing to data changes with live queries.

Important

The SDK is available as a NPM and a JSR package, with full support for TypeScript types.

Note

The SDK works seamlessly with SurrealDB versions v2.0.0 to v2.1.3, ensuring compatibility with the latest version.

To contribute to the SDK code, submit an Issue or Pull Request in the surrealdb.js repository. To contribute to this documentation, submit an Issue or Pull Request in the docs.surrealdb.com repository.

Language and Engines

Frameworks

Example projects

You can find example repositories that demonstrate how to integrate SurrealDB in a number of different environments:

Sources

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install