POST /projects/{project}/query
Query and indexes
POST /projects/{project}/query
Runs one read-only SQL statement.
POST
POST /projects/{project}/query
Runs one read-only SQL statement.
Full request:
Error or alternate response:
Endpoint details
Bearer
pat_... (Project API Token). Keep this token on your backend/server.Project slug. This acts as the Project ID in API paths.
true for a successful response and false for an error response.Endpoint-specific response data when
ok is true; null on errors.Error code and message when
ok is false; null on success.Request identifier you can use when troubleshooting a specific API call.
Authentication
Project API Token.Parameters
Body:sql or query required; params optional array or object; limit optional integer, clamped 1-1000, default 500.
Notes
OnlySELECT, WITH, and EXPLAIN QUERY PLAN are accepted. Multiple statements and write/schema keywords are blocked.