Turso REST API
Edge-hosted distributed SQLite database API
Turso is a distributed database built on libSQL, a fork of SQLite, designed for edge deployment with low latency worldwide. It provides developers with a managed SQLite database that replicates to multiple regions, offering both HTTP and WebSocket APIs for database operations. Turso enables applications to access data with single-digit millisecond latency from anywhere in the world while maintaining strong consistency guarantees.
https://[database-name]-[org-name].turso.io
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/execute | Execute a single SQL statement and return results |
| POST | /v2/pipeline | Execute multiple SQL statements in a pipeline with conditional execution |
| POST | /v1/batch | Execute multiple SQL statements in a batch transaction |
| GET | /v1/databases | List all databases in your organization |
| POST | /v1/databases | Create a new database instance |
| DELETE | /v1/databases/{database_name} | Delete a database instance |
| GET | /v1/databases/{database_name} | Get details about a specific database |
| POST | /v1/databases/{database_name}/tokens | Create an authentication token for database access |
| GET | /v1/databases/{database_name}/locations | List all replica locations for a database |
| POST | /v1/databases/{database_name}/locations | Add a replica to a new location |
| GET | /v1/databases/{database_name}/stats | Get usage statistics for a database |
| GET | /v1/organizations | List organizations accessible to the authenticated user |
| POST | /v1/databases/{database_name}/seed | Seed a database from a dump file or another database |
| GET | /v1/databases/{database_name}/schema | Get the current database schema |
| POST | /v1/databases/{database_name}/backup | Create a manual backup of the database |
Sponsor this page
AvailableReach developers actively building with Turso. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X POST https://my-db-myorg.turso.io/v1/execute \
-H 'Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...' \
-H 'Content-Type: application/json' \
-d '{
"statements": [
{
"q": "SELECT * FROM users WHERE id = ?",
"params": [123]
}
]
}'
Use Turso from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Turso. Paste your Turso API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Turso directly with your credentials — no local install, works on mobile.
turso_query
Execute SQL queries against a Turso database and return structured results for AI processing
turso_batch_execute
Execute multiple SQL statements in a transaction for complex database operations
turso_schema_inspector
Retrieve and analyze database schema to help AI understand table structures and relationships
turso_database_manager
Create, list, and manage Turso database instances across multiple regions
turso_analytics
Query database usage statistics and performance metrics for optimization insights
Connect in 60 seconds
Paste your Turso key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Turso to your AI →