Skip to main content
POST
/
base
/
{baseId}
/
sql-query
cURL
curl --request POST \
  --url https://app.teable.ai/api/base/%7BbaseId%7D/sql-query \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"sql":"SELECT * FROM table_name LIMIT 10"}'
{
  "rows": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

baseId
string
required

The base ID to execute query on

Body

application/json
sql
string
required

The SQL query to execute

Minimum string length: 1
Example:

"SELECT * FROM table_name LIMIT 10"

Response

200 - application/json

Query executed successfully

rows
object[]
required

The query result rows

Last modified on March 5, 2026