Getting started

The official documentation for SurrealDB a multi-model database for modern applications.

SurrealDB is a multi-model database designed to simplify building modern applications. It combines the capabilities of traditional relational databases, document stores, graph databases, and more into a single, unified platform. Whether you are building real-time applications, working with complex data relationships, or deploying AI-powered workflows, SurrealDB provides the tools you need without requiring multiple database systems.

This documentation covers the full SurrealDB ecosystem, from core database concepts and query language reference to SDK guides, deployment options, and third-party integrations. Use the sections below to navigate to the area most relevant to your needs.

Guides

The SurrealDB ecosystem consists of several guides, each designed to address different aspects of database management and application development. Together, they provide a complete platform for storing, querying, managing, and visualising your data.

Query Language

The powerful query language for SurrealDB, combining the familiarity of SQL with modern data capabilities.

SurrealDB Cloud

A fully managed cloud service for running SurrealDB without managing infrastructure.

Surrealist

A graphical interface for exploring, querying, and managing your SurrealDB databases.

Extensions

Machine learning integration for training and running ML models directly within the database.

Features

SurrealDB is built around a rich feature set that supports a wide variety of application requirements. Rather than requiring you to stitch together separate systems for different data models or capabilities, SurrealDB provides them all within a single engine. The following features each have dedicated documentation covering concepts, configuration, and practical usage.

Multi-model data

Work with document, graph, and relational data in a single database.

Real-time queries

Subscribe to live queries and changefeeds for real-time data updates.

Authentication

Built-in authentication and access control with scoped permissions.

Graph relationships

Model and traverse complex relationships using native graph edges.

Full-text search

Search and rank text content with analyzers, tokenizers, and scoring.

Vector search

Store embeddings and perform similarity searches for AI and RAG workflows.

Geospatial queries

Query location data with geometry types, distance calculations, and spatial functions.

Time-series data

Ingest and query time-stamped data with windowing and aggregation patterns.

Schema management

Define and enforce schemas, tables, fields, indexes, and computed data.

SDKs

SurrealDB provides official SDKs for a range of programming languages, allowing you to integrate the database into your applications regardless of your technology stack. Each SDK offers methods for connecting to SurrealDB, executing queries, managing authentication, and subscribing to real-time updates. Some SDKs also support embedding SurrealDB directly within your application process, either in-memory or persisted to disk.

Rust

JavaScript

Python

Go

Java

.NET

PHP

Deployment

SurrealDB offers flexible deployment options to suit your infrastructure requirements. You can run the database as a fully managed cloud service, self-host it on your own servers, deploy it within containers, or embed it directly into your application. Each deployment model is documented with step-by-step guides for installation, configuration, and operations.

SurrealDB Cloud

Provision and manage cloud-hosted SurrealDB instances with automatic scaling and backups.

Self-hosted

Install and run SurrealDB on your own infrastructure with full control over configuration.

Docker

Run SurrealDB in a Docker container for rapid setup and consistent environments.

Embedding

Embed SurrealDB directly into your application as an in-process database engine.

Integrations

SurrealDB integrates with a variety of third-party tools and platforms, enabling you to connect the database to your existing workflows and infrastructure. The integrations documentation covers data management tools, AI frameworks, embeddings providers, and more. SurrealDB also provides dedicated support for AI agent architectures, with guides on connecting agents to the database for knowledge retrieval and stateful workflows.

Integrations

Connect SurrealDB to third-party tools, AI frameworks, embeddings providers, and data management platforms.

AI agents

Build AI agent workflows that use SurrealDB for knowledge storage, retrieval, and state management.

Reference

The reference documentation provides comprehensive, detailed specifications for all SurrealDB interfaces. This includes the full SurrealQL query language with syntax definitions for every statement, clause, function, and data type, as well as the command-line interface for managing SurrealDB instances and the HTTP-based REST API for programmatic access.

SurrealQL

Complete query language reference covering statements, functions, data types, and operators.

CLI tools

Command-line interface reference for starting, managing, and interacting with SurrealDB.

REST API

HTTP API reference for querying and managing SurrealDB over REST endpoints.

Tutorials and resources

If you prefer learning through practical examples, the tutorials and demos section provides hands-on guides that walk you through common use cases and application patterns. The labs section offers experimental projects and community-contributed content for exploring SurrealDB in different contexts.

Tutorials and demos

Step-by-step guides and example projects covering common SurrealDB use cases.

Labs

Experimental projects and community content for exploring SurrealDB capabilities.