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": [
{}
]
}base
Execute SQL query
Execute SQL query on a base
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The base ID to execute query on
Body
application/json
The SQL query to execute
Minimum string length:
1Example:
"SELECT * FROM table_name LIMIT 10"
Response
200 - application/json
Query executed successfully
The query result rows
Show child attributes
Show child attributes
Last modified on March 5, 2026
Was this page helpful?
⌘I

