Skip to content

Protocols and APIs

Protocols and APIs

Any language or tool capable of making HTTP requests can interact with SurrealDB, and standard Postgres and MySQL clients can connect to it as well. This is useful when an official SDK is not available for your stack, or when you need to integrate SurrealDB with infrastructure tooling, scripts, or third-party platforms.

ProtocolWhat it gives you
HTTPQuery execution over plain endpoints with JSON results, sign in and sign up endpoints, create, read, update and delete operations using RESTful conventions, and health and status checks.
RPC over WebSocketPersistent connections with real-time capabilities, including live queries and streaming query results that arrive while the query runs.
gRPCThe same RPC protocol over HTTP/2, served on the same port with grpc:// and grpcs:// addresses, from 3.3.0.
Postgres wire protocolConnections from psql, JDBC and other Postgres clients, running SurrealQL, PostgreSQL SQL or ISO GQL with tabular typed results.
MySQL wire protocolFrom SurrealDB 4.0, connections from the mysql client and MySQL drivers, running MySQL SQL, SurrealQL or another dialect.
  • CBOR protocol - the CBOR encoding SurrealDB uses, and its custom tags.

  • Errors - the kind, wire code, structured details and cause that every error carries, in the same shape across every protocol and SDK.

  • Compatibility matrix - what the PostgreSQL and MySQL dialects run, feature by feature, and what they refuse.

If you prefer a richer client experience, the official SDKs are language-specific clients for JavaScript, Python, Rust, Go, Java, .NET and PHP.

Was this page helpful?

Last updated