Documentation Index Fetch the complete documentation index at: https://trickest.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Solutions API gives you programmatic read access to your Live Tables. Use it to fetch rows, apply filters, select specific columns, sort results, and paginate through large datasets from any HTTP client or script.
The platform generates ready-to-run code examples for each of your Live Tables with all IDs pre-filled. Find them in the API docs panel on your database page.
Authentication
Include your API token in the Authorization header of every request:
Authorization: Token <YOUR_TOKEN>
A missing or invalid token returns 403 Forbidden.
Endpoint
GET /api/database-tables/{table_id}/data
Fetch rows from a Live Table. The table_id is unique to each table and is pre-filled in the code examples on your database page.
Query Parameters
Parameter Type Required Description offsetinteger No Number of rows to skip. Default: 0 limitinteger No Maximum rows to return. Default: 20 selectstring No Comma-separated column names to include in the response order_bystring No Comma-separated column names to sort by qstring No TQL filter expression
Response
{
"total_count" : 1500 ,
"result_count" : 20 ,
"offset" : 0 ,
"limit" : 20 ,
"results" : [
{ "url" : "https://example.com" , "status_code" : 200 , "webserver" : "nginx" }
]
}
Field Type Description total_countinteger Total number of rows matching the query result_countinteger Number of rows returned in this page offsetinteger Offset used for this page limitinteger Limit used for this page resultsarray Array of row objects
Status Codes
Code Meaning 200Success 400Invalid query parameters 403Missing or invalid authorization token
Examples
Fetch Rows
const response = await fetch (
"/api/database-tables/{table_id}/data?offset=0&limit=20" ,
{
headers: {
"Authorization" : "Token <YOUR_TOKEN>" ,
"Content-Type" : "application/json" ,
},
}
);
const data = await response . json ();
console . log ( "Results:" , data . results );
console . log ( "Total count:" , data . total_count );
import requests
response = requests.get(
"/api/database-tables/ {table_id} /data" ,
params = { "offset" : 0 , "limit" : 20 },
headers = { "Authorization" : "Token <YOUR_TOKEN>" },
)
data = response.json()
print ( "Results:" , data[ "results" ])
print ( "Total count:" , data[ "total_count" ])
curl -G "https://trickest.io/api/database-tables/{table_id}/data" \
-H "Authorization: Token <YOUR_TOKEN>" \
-d "offset=0" \
-d "limit=20"
Select Specific Columns
Use select to limit which fields are returned. This reduces response size for tables with many columns.
const params = new URLSearchParams ({
select: "url,status_code,webserver" ,
offset: "0" ,
limit: "20" ,
});
const response = await fetch (
`/api/database-tables/{table_id}/data? ${ params } ` ,
{
headers: {
"Authorization" : "Token <YOUR_TOKEN>" ,
"Content-Type" : "application/json" ,
},
}
);
const data = await response . json ();
import requests
params = {
"select" : "url,status_code,webserver" ,
"offset" : 0 ,
"limit" : 20 ,
}
response = requests.get(
"/api/database-tables/ {table_id} /data" ,
params = params,
headers = { "Authorization" : "Token <YOUR_TOKEN>" },
)
data = response.json()
curl -G "https://trickest.io/api/database-tables/{table_id}/data" \
-H "Authorization: Token <YOUR_TOKEN>" \
-d "select=url,status_code,webserver" \
-d "offset=0" \
-d "limit=20"
Filter with TQL
Use the q parameter to pass a TQL filter expression.
const params = new URLSearchParams ({
q: 'status_code = 200 AND webserver ~ "nginx"' ,
offset: "0" ,
limit: "20" ,
});
const response = await fetch (
`/api/database-tables/{table_id}/data? ${ params } ` ,
{
headers: {
"Authorization" : "Token <YOUR_TOKEN>" ,
"Content-Type" : "application/json" ,
},
}
);
const data = await response . json ();
console . log ( "Filtered results:" , data . results );
import requests
params = {
"q" : 'status_code = 200 AND webserver ~ "nginx"' ,
"offset" : 0 ,
"limit" : 20 ,
}
response = requests.get(
"/api/database-tables/ {table_id} /data" ,
params = params,
headers = { "Authorization" : "Token <YOUR_TOKEN>" },
)
data = response.json()
print ( "Filtered results:" , data[ "results" ])
curl -G "https://trickest.io/api/database-tables/{table_id}/data" \
-H "Authorization: Token <YOUR_TOKEN>" \
--data-urlencode 'q=status_code = 200 AND webserver ~ "nginx"' \
-d "offset=0" \
-d "limit=20"
Quote strings and dates in TQL expressions. Leave numbers unquoted. See Querying for the full TQL syntax reference.
Paginate Through All Results
Use offset and limit together to iterate through large result sets. Stop when an empty results array is returned.
async function fetchAll ( tableId , limit = 100 ) {
const allResults = [];
let offset = 0 ;
while ( true ) {
const params = new URLSearchParams ({
offset: String ( offset ),
limit: String ( limit ),
});
const response = await fetch (
`/api/database-tables/ ${ tableId } /data? ${ params } ` ,
{
headers: {
"Authorization" : "Token <YOUR_TOKEN>" ,
"Content-Type" : "application/json" ,
},
}
);
const data = await response . json ();
const rows = data . results || [];
if ( rows . length === 0 ) break ;
allResults . push ( ... rows );
offset += limit ;
}
return allResults ;
}
import requests
def fetch_all ( table_id , limit = 100 ):
all_results = []
offset = 0
while True :
response = requests.get(
f "/api/database-tables/ { table_id } /data" ,
params = { "offset" : offset, "limit" : limit},
headers = { "Authorization" : "Token <YOUR_TOKEN>" },
)
data = response.json()
rows = data.get( "results" , [])
if not rows:
break
all_results.extend(rows)
offset += limit
return all_results
# Fetch the first page
curl -G "https://trickest.io/api/database-tables/{table_id}/data" \
-H "Authorization: Token <YOUR_TOKEN>" \
-d "offset=0" \
-d "limit=100"
# Fetch the next page by incrementing offset
curl -G "https://trickest.io/api/database-tables/{table_id}/data" \
-H "Authorization: Token <YOUR_TOKEN>" \
-d "offset=100" \
-d "limit=100"
Next Steps
Solutions & Database How Solutions and Live Tables work on the platform.
Querying Write and run TQL filters against your Live Tables in the UI.