
SurrealDB Has a Free API — Heres How to Use One Database for Everything
SurrealDB is a multi-model database — relational, document, graph, and time-series in one. Replace your PostgreSQL + MongoDB + Neo4j stack with a single database. Why SurrealDB? Multi-model : SQL tables, JSON documents, graph relations Real-time : Live queries with WebSocket Permissions : Row-level security with SurrealQL Embeddable : Run in-process or as a server Single binary : Rust-powered, no dependencies SurrealQL : SQL-like with graph traversal Install curl -sSf https://install.surrealdb.com | sh surreal start --user root --pass root memory REST API # Create a record curl -X POST http://localhost:8000/sql \ -H 'Authorization: Basic cm9vdDpyb290' \ -H 'NS: test' -H 'DB: test' \ -d 'CREATE user SET name = "Alice", email = "alice@example.com", age = 30;' # Query curl -X POST http://localhost:8000/sql \ -H 'Authorization: Basic cm9vdDpyb290' \ -H 'NS: test' -H 'DB: test' \ -d 'SELECT * FROM user WHERE age > 25;' SurrealQL (SQL + Graph + Document) -- Relational CREATE user : alice SET
Continue reading on Dev.to Webdev
Opens in a new tab
