Skip to main content


Returns the results of a SQL read query against the Tableland network.


The /query endpoint supports both GET and POST requests, returning the results of a SQL read query, along with options for formatting the response.

GET /query or POST /query

GET request

The following describes the GET usage with placeholder parameters on a testnet gateway URL:

curl -X GET{objects|table}&extract={boolean}&unwrap={boolean}&statement={sql_select_statement} \
-H 'Accept: application/json'

For example, to query the healthbot_80001_1 table with default formatting options:

curl -X GET \
-H 'Accept: application/json'

POST request

The following describes the POST usage with example parameters on a testnet gateway URL:

curl -L '' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"statement": "select * from healthbot_80001_1",
"format": "objects",
"extract": false,
"unwrap": false


statementquerystringtrueThe SQL read query statement
formatquerystringfalseThe requested response format: objects (array of objects) or table (object with columns and rows as properties).
extractquerybooleanfalseWhether to extract the JSON object from the single property of the surrounding JSON object.
unwrapquerybooleanfalseWhether to unwrap the returned JSON objects from their surrounding array.


200 operationInline
400 query/statement valueNone
404 Not FoundNone
429 Many RequestsNone

Response properties

See the query formatting section for how to transform the response, such as composing a JSON object (e.g., for ERC721 compliance).


curl -X GET \
-H 'Accept: application/json'


curl -L '' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"statement": "select * from healthbot_80001_1"

Returns a successful (200) response:

"counter": 148247