Skip to main content

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

ParameterTypeRequiredDescription
offsetintegerNoNumber of rows to skip. Default: 0
limitintegerNoMaximum rows to return. Default: 20
selectstringNoComma-separated column names to include in the response
order_bystringNoComma-separated column names to sort by
qstringNoTQL filter expression

Response

{
  "total_count": 1500,
  "result_count": 20,
  "offset": 0,
  "limit": 20,
  "results": [
    { "url": "https://example.com", "status_code": 200, "webserver": "nginx" }
  ]
}
FieldTypeDescription
total_countintegerTotal number of rows matching the query
result_countintegerNumber of rows returned in this page
offsetintegerOffset used for this page
limitintegerLimit used for this page
resultsarrayArray of row objects

Status Codes

CodeMeaning
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);

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();

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);
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;
}

Next Steps