---
title: "Look up a table query for a Tulip Table by id"
slug: "look-up-a-table-query-for-a-tulip-table-by-id"
updated: 2026-04-02T17:37:08Z
published: 2026-04-02T17:37:27Z
canonical: "support.tulip.co/look-up-a-table-query-for-a-tulip-table-by-id"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Look up a table query for a Tulip Table by id

Get/tables/{tableId}/query/{queryId}

Looks up a table query for a Tulip Table by id.

Requires the `table-queries:read` API key scope.

SecurityHTTPType basic

Access to the Tulip API requires the use of [HTTP Basic Authentication](https://datatracker.ietf.org/doc/html/rfc7617) using the credentials of an active [Tulip API Token](https://support.tulip.co/docs/set-up-a-tulip-api). All requests require the `Authorization` HTTP header with the `Basic` scheme to provide API credentials unless otherwise noted.

API tokens can be configured with a set of *scopes* which determine what parts of the API that specific token has access to. Security best practices dictate that API credentials be given the minimum set of capabilities required to fulfill their intended purpose. For example, an API token created for use in an integration that is only designed to use the Tables API should probably only be given the `tables:read` and `tables:write` scopes. In this way you can minimize risk in the event that API credentials are compromised. API endpoints will document what API token scopes are required to access that endpoint in their descriptions. If a request is made to an endpoint with an API token which does not have the required scopes, the response will be an authorization error.

Path parameterstableIdstringRequired

The id of a Tulip Table.

Pattern^[a-zA-Z0-9_]+$Exampleg56RCoZCtzv7borvp
queryIdstringRequired

The id of a Tulip Table query.

Pattern^[a-zA-Z0-9_]+$Exampleg56RCoZCtzv7borvp

Responses200

The Tulip Table query was retrieved successfully.

<select class='api-response-data' aria-label='Media type'><option value='44d8ee4f-4e2e-4360-bc69-289c748126b5'>application/json</option>
</select>Expand Allobject  

A Tulip Table query that exists on a Tulip Table. The record object will include all the fields of the query, addition to the record's created timestamp and last updated timestamp.

Example{
  "id": "PRYGkKgnqySMcpWwr",
  "createdAt": "2019-01-15T17:30:01.244Z",
  "createdBy": "N24uug8iXSTWR39rB",
  "updatedAt": "2019-01-15T17:31:20.002Z",
  "updatedBy": "N24uug8iXSTWR39rB",
  "tableId": "b93Aj93KlIoaw",
  "label": "Basic Query",
  "filters": [
    {
      "_id": "aidv93mise9",
      "field": "Color",
      "functionType": "equal",
      "value": {
        "datasourceType": "static",
        "params": {
          "value": "yellow"
        }
      }
    },
    {
      "_id": "jfsa093m9ds",
      "field": "ID",
      "functionType": "notEqual",
      "value": {
        "datasourceType": "static",
        "params": {
          "value": "a"
        }
      }
    }
  ],
  "filterAggregator": "all",
  "sortOptions": [
    {
      "sortBy": "Color",
      "sortDir": "asc"
    }
  ],
  "limit": 1000.0
}_createdAtstring  (date-time)    
_updatedAtstring  (date-time)    
tableIdstring    

The ID of the Tulip Table that the query exists on.

labelstring    

The name of the Tulip Table Query.

filters Array of object (TulipTableFilter)   

The filters that are applied on this Tulip Table Query.

object  

The filters can use any of the columns defined in the Tulip Table (including `_createdAt` and `_updatedAt`) that the query exists on with any of the functions.

Example{
  "_id": "abcdefg",
  "field": "Color",
  "functionType": "equal",
  "value": {
    "datasourceType": "static",
    "params": {
      "value": "yellow"
    }
  }
}_idstring    
fieldstring    
functionTypestring    Valid values[
  "equal",
  "notEqual",
  "blank",
  "notBlank",
  "greaterThanOrEqual",
  "lessThanOrEqual",
  "greaterThan",
  "lessThan",
  "contains",
  "notContains",
  "startsWith",
  "notStartsWith",
  "endsWith",
  "notEndsWith",
  "isIn",
  "notIsIn"
]
valueobject  

The value to compare to.

If `datasourceType` is set to `&quot;app-info&quot;`, then `params` is not required.

If `datasourceType` is set to `&quot;static&quot;`, then `params` is required.

datasourceTypestring    Valid values[
  "static",
  "app-info"
]
paramsobject  value

The static value to compare to. Must be of the same type as the data in the column specified by `field`.

filterAggregatorValid values[
  "all",
  "any"
]Default"all"
sortOptions Array of object (TulipTableSortOption)   

The field and sorting direction used to sort the query results

object  

Sorts are used to order the queries based on columns defined in the Tulip Table where the query exists.

Example{
  "sortBy": "Color",
  "sortDir": "asc"
}sortBystring    

The field that records should be sorted by in the response. Can be the name of any of the columns of the Table (including `id`) or one of these special values:

- `_sequenceNumber`
- `_createdAt`
- `_updatedAt`

sortDirstring    

The direction of the records, either ascending or descending

Valid values[
  "asc",
  "desc"
]Default"asc"

limitnumber    

The number of records that will be returned at most from this Tulip Table query.

400

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

<select class='api-response-data' aria-label='Media type'><option value='dacd53f4-9c23-4b2f-9886-f68c505bdc72'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

401

The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.

<select class='api-response-data' aria-label='Media type'><option value='e6a4aa4a-778f-4d76-b524-0759eafe6517'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

403

The provided authentication info was rejected. The response will provide additional details.

<select class='api-response-data' aria-label='Media type'><option value='361e42dd-eebd-4bbc-9fa2-278a40267f92'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

404

The requested database entry was not found.

<select class='api-response-data' aria-label='Media type'><option value='d0a52475-cd3a-427e-9f9c-40eab27c2ee6'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

422

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

<select class='api-response-data' aria-label='Media type'><option value='c6536d92-4d00-4791-ad79-1260e515477b'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring    

500

The server encountered an unexpected error.

<select class='api-response-data' aria-label='Media type'><option value='1e958e8e-f311-40bb-8c01-d5aa32596de6'>application/json</option>
</select>object  errorCodestring    
errorUniqueIDstring    Pattern^[a-zA-Z0-9+/]+$Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
detailsstring
