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

# Query the records in a table

> Retrieves the records of the table matching the table_id.

The results are ordered by the `orders` in the body, which replace the order
the table or view stores; a body that omits them, or that sends the default
`id asc`, is ordered by the stored one. To page, follow `links.next` or
`links.prev`: a link
carries the page token only, so send the same body with it to get the
adjacent page. `meta.next_cursor` can be passed as the `cursor` parameter
instead, which is the same value the links carry.



## OpenAPI

````yaml /api-reference/specs/tables.yaml post /tables/v2/tables/{table_id}/records/query
openapi: 3.1.0
info:
  title: Tables API
  description: >-
    Read and write Tables by Zapier data — create and manage tables and their
    fields, and create, query, update and delete the records in them.
  version: 1.0.0
  contact:
    url: https://docs.zapier.com
servers:
  - url: https://api.zapier.com
    description: Production
security:
  - OAuth: []
tags:
  - name: Fields
    description: Operations for managing the fields on a table.
  - name: Records
    description: Operations for managing the records in a table.
  - name: Tables
    description: Operations for creating and managing tables.
paths:
  /tables/v2/tables/{table_id}/records/query:
    post:
      tags:
        - Records
      summary: Query the records in a table
      description: >-
        Retrieves the records of the table matching the table_id.


        The results are ordered by the `orders` in the body, which replace the
        order

        the table or view stores; a body that omits them, or that sends the
        default

        `id asc`, is ordered by the stored one. To page, follow `links.next` or

        `links.prev`: a link

        carries the page token only, so send the same body with it to get the

        adjacent page. `meta.next_cursor` can be passed as the `cursor`
        parameter

        instead, which is the same value the links carry.
      operationId: queryTableRecords
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            examples:
              - 01563e3a-b5d3-d676-4c61-efb99302bd5b
            title: Table Id
        - name: trash
          in: query
          required: false
          schema:
            enum:
              - exclude
              - include
              - only
            type: string
            description: >-
              Control trashed record visibility: 'exclude' (default), 'include',
              or 'only'
            default: exclude
            title: Trash
          description: >-
            Control trashed record visibility: 'exclude' (default), 'include',
            or 'only'
        - name: skip_persisted_filters
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Ignore the filters a view stores, returning the parent table's
              records instead. Applied only when you can edit the table;
              otherwise the view's stored filters still apply. Orders are
              unaffected: the view's stored order still applies unless the body
              supplies orders of its own
            default: false
            title: Skip Persisted Filters
          description: >-
            Ignore the filters a view stores, returning the parent table's
            records instead. Applied only when you can edit the table; otherwise
            the view's stored filters still apply. Orders are unaffected: the
            view's stored order still applies unless the body supplies orders of
            its own
        - name: cursor
          in: query
          required: false
          schema:
            description: >-
              Return the page this cursor names. Take one from `links` or
              `meta.next_cursor`
            title: Cursor
            oneOf:
              - type: string
              - type: 'null'
          description: >-
            Return the page this cursor names. Take one from `links` or
            `meta.next_cursor`
        - name: annotate_linked_source
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Annotate each record with whether it is currently used as the
              source of a linked record field, populating `is_source_record`.
              Passing `false` skips the work of computing it
            default: true
            title: Annotate Linked Source
          description: >-
            Annotate each record with whether it is currently used as the source
            of a linked record field, populating `is_source_record`. Passing
            `false` skips the work of computing it
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2QueryTableRecordsRequest'
            examples:
              First page:
                summary: The first page of the table
                description: >-
                  The smallest useful request: no filters, the table's own
                  stored order, one page
                value:
                  limit: 25
              Filter on a field and order by another:
                summary: Filter and sort
                description: >-
                  A field key is `f{field_id}`, or the field's slug where the
                  account has slugs enabled. A `__`-joined path reaches a nested
                  value, e.g. `f2__label` for a linked record's label
                value:
                  filters:
                    - key: f1
                      operator: exact
                      value: Acme Corp
                  orders:
                    - key: f2
                      direction: desc
                  limit: 10
              One record by id:
                summary: Look up a single record
                description: >-
                  A record id is the UUID form `V2Record.id` publishes, not the
                  internal ULID
                value:
                  filters:
                    - key: id
                      operator: exact
                      value: 01563e3a-b5d3-d676-4c61-efb99302bd5b
                  limit: 1
              Next page:
                summary: The page after this one
                description: >-
                  Send the cursor from `meta.next_cursor` (or the `cursor`
                  inside `links.next`) as the `cursor` parameter, with this same
                  body: the cursor carries the position, the body carries the
                  filters, orders and page size
                value:
                  limit: 10
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2QueryTableRecordsResponse'
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
        '400':
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
          description: Bad Request
        '401':
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
          description: Unauthorized
        '403':
          description: >-
            Refused: the token's scope does not permit this operation
            (`auth:insufficient_scope`), or the table's sharing does not grant
            the caller this action (`permissions:errors`).
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: >-
            Not found: no table or view has that id (`table:notfound`), or the
            table was deleted while the request was in flight
            (`schema:table_deleted`).
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          headers:
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
          description: Unprocessable Entity
        '429':
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request
              schema:
                type: integer
            X-RateLimit-Limit:
              description: Requests permitted in the current rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests still permitted in the current window, after this one.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Seconds until quota next frees up. A delta, like Retry-After --
                not an epoch timestamp.
              schema:
                type: integer
          description: Too Many Requests
        '503':
          description: >-
            The Public API Gateway could not reach the authorization service.
            The condition is transient; retry the request.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request
              schema:
                type: integer
      security:
        - OAuth:
            - external
            - table:record:read
components:
  schemas:
    V2QueryTableRecordsRequest:
      properties:
        filters:
          items:
            $ref: '#/components/schemas/V2RecordFilter'
          type: array
          title: Filters
          description: Filters to apply. All of them must match
        orders:
          items:
            $ref: '#/components/schemas/V2RecordOrder'
          type: array
          title: Orders
          description: Order the results by these fields, in this order
        selected_fields:
          title: Selected Fields
          description: Return only these fields of each record. Omit for every field
          oneOf:
            - items:
                type: string
              type: array
            - type: string
              const: '*'
            - type: 'null'
        limit:
          type: integer
          exclusiveMinimum: 0
          title: Limit
          description: >-
            Maximum number of records to return. A larger value is reduced to
            1000
          default: 1000
      additionalProperties: false
      type: object
      title: V2QueryTableRecordsRequest
      description: Which records to return, and how many.
      required: []
    V2QueryTableRecordsResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/V2Record'
          type: array
          title: Results
          description: The page of results
        meta:
          $ref: '#/components/schemas/V2QueryTableRecordsMeta'
        links:
          $ref: '#/components/schemas/V2CollectionLinks'
      type: object
      required:
        - results
        - meta
        - links
      title: V2QueryTableRecordsResponse
      description: A page of the table's records.
    ErrorsResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Detailed error description
        code:
          type: string
          title: Code
          description: Error code identifying the type of error
        message:
          type: string
          title: Message
          description: Human-readable error message
          default: ''
        support_id:
          type: string
          title: Support Id
          description: Support identifier for tracking this error
          default: ''
          x-zapier-id-format-exempt: true
        meta:
          additionalProperties: true
          type: object
          title: Meta
          description: Additional metadata about the error
        errors:
          items:
            $ref: '#/components/schemas/Error'
          type: array
          title: Errors
          description: List of specific errors that occurred
      type: object
      required:
        - detail
        - code
        - meta
        - errors
      title: ErrorsResponse
      description: Represents an API error response with detailed information.
    V2RecordFilter:
      properties:
        key:
          type: string
          title: Key
          description: >-
            The field to filter on: `id`, `created_at`, `edited_at`, or the key
            of one of the table's fields. A `__`-joined path reaches a nested
            value, e.g. `f2__label` for a linked record's label
        operator:
          type: string
          enum:
            - exact
            - different
            - contains
            - icontains
            - gte
            - gt
            - lt
            - lte
            - range
            - in
            - isnull
            - startswith
            - search
            - is_within
          title: Operator
          description: >-
            How to compare the field's value. `search` is accepted for requests
            migrated from v1 and is ignored
          default: exact
        value:
          title: Value
          description: >-
            The value to compare against. For `is_within`, pass one of the time
            range values instead of a date
          oneOf:
            - type: string
            - type: boolean
            - type: integer
            - type: number
            - items:
                oneOf:
                  - type: string
                  - type: boolean
                  - type: integer
                  - type: number
              type: array
            - additionalProperties: true
              type: object
            - $ref: '#/components/schemas/TimeRange'
      additionalProperties: false
      type: object
      required:
        - key
        - value
      title: V2RecordFilter
      description: A filter on the records to return.
    V2RecordOrder:
      properties:
        key:
          type: string
          title: Key
          description: >-
            The field to order by: `id`, `created_at`, `edited_at`, or the key
            of one of the table's fields. A `__`-joined path reaches a nested
            value, e.g. `f2__label` for a linked record's label
          default: id
        direction:
          type: string
          enum:
            - asc
            - desc
          title: Direction
          description: The direction to order in
          default: asc
      additionalProperties: false
      type: object
      title: V2RecordOrder
      description: The order the records are returned in.
      required: []
    V2Record:
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          format: uuid
          title: Id
          description: Unique identifier for the record
          examples:
            - 01563e3a-b5d3-d676-4c61-efb99302bd5b
        data:
          additionalProperties: true
          type: object
          title: Data
          description: >-
            The record's data, keyed by field key (`f{id}`). On an account whose
            field-slug rollout has reached it, a field that has a user-defined
            slug is keyed by the slug instead
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the record was created
        edited_at:
          type: string
          format: date-time
          title: Edited At
          description: When the record was last modified
        deleted_at:
          title: Deleted At
          description: >-
            Timestamp when the record was moved to the trash, or null if it is
            active
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
        is_source_record:
          title: Is Source Record
          description: >-
            Whether this record is currently used as the source of a linked
            record field, somewhere else in the account. Null when the operation
            did not compute it: `queryTableRecords` skips it when
            `annotate_linked_source=false`, and the create and update operations
            never compute it
          oneOf:
            - type: boolean
            - type: 'null'
        errors:
          additionalProperties:
            $ref: '#/components/schemas/V2RecordFieldError'
          type: object
          title: Errors
          description: Validation errors for the record's fields, keyed like `data`
      type: object
      required:
        - id
        - data
        - created_at
        - edited_at
      title: V2Record
      description: A record of a table.
    V2QueryTableRecordsMeta:
      properties:
        limit:
          type: integer
          title: Limit
          description: >-
            Maximum number of records the request asked for, after any reduction
            to the server's maximum
        cursor:
          title: Cursor
          description: The cursor this page was requested with, or null for the first page
          oneOf:
            - type: string
            - type: 'null'
        next_cursor:
          title: Next Cursor
          description: The cursor that returns the next page, or null on the last page
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - limit
        - cursor
        - next_cursor
      title: V2QueryTableRecordsMeta
      description: Pagination metadata for a page of records.
    V2CollectionLinks:
      properties:
        next:
          title: Next
          description: Link to the next page of results, or null on the last page
          oneOf:
            - type: string
            - type: 'null'
        prev:
          title: Prev
          description: Link to the previous page of results, or null on the first page
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - next
        - prev
      title: V2CollectionLinks
      description: >-
        Links to the adjacent pages of a collection, `null` when there is no
        such

        page.
    Error:
      properties:
        title:
          type: string
          title: Title
          description: Human-readable error title or summary
        status:
          title: Status
          description: HTTP status code associated with this error
          oneOf:
            - type: integer
            - type: 'null'
        code:
          title: Code
          description: Error code identifying the type of error
          oneOf:
            - type: string
            - type: 'null'
        detail:
          title: Detail
          description: Detailed description of the error
          oneOf:
            - type: string
            - type: 'null'
        meta:
          title: Meta
          description: Additional metadata about the error
          oneOf:
            - additionalProperties: true
              type: object
            - type: 'null'
      type: object
      required:
        - title
      title: Error
      description: Represents an error that occurred during API request processing.
    TimeRange:
      type: string
      enum:
        - yesterday
        - today
        - tomorrow
        - The past week
        - The next week
        - The past month
        - The next month
        - The past year
        - The next year
        - This calendar week
        - This calendar month
        - This calendar year
        - Year to date
        - Month to date
        - Week to date
        - Last 7 days
        - Next 7 days
        - Last 30 days
        - Next 30 days
        - Last 365 days
        - Next 365 days
      title: TimeRange
      description: Enumeration for defining dynamic time range filters.
    V2RecordFieldError:
      properties:
        severity:
          type: string
          enum:
            - error
            - warning
          title: Severity
          description: Whether the value was rejected ('error') or accepted with a warning
        value:
          title: Value
          description: The value that failed validation or raised the warning
        message:
          type: string
          title: Message
          description: Technical description of the validation failure
        human_message:
          title: Human Message
          description: >-
            A version of `message` suitable for display to a person, when the
            failure has one
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - severity
        - value
        - message
      title: V2RecordFieldError
      description: Why one field of a record was rejected, or flagged as suspicious.
  securitySchemes:
    OAuth:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        authorizationCode:
          authorizationUrl: https://zapier.com/oauth/authorize
          tokenUrl: https://zapier.com/oauth/token
          scopes:
            external: Scope that gives access to all Public APIs
            table:read: Grants table:read access
            table:write: Grants table:write access
            table:delete: Grants table:delete access
            table:field:read: Grants table:field:read access
            table:field:write: Grants table:field:write access
            table:field:delete: Grants table:field:delete access
            table:record:write: Grants table:record:write access
            table:record:delete: Grants table:record:delete access
            table:record:read: Grants table:record:read access
        clientCredentials:
          tokenUrl: https://zapier.com/oauth/token
          scopes:
            external: Scope that gives access to all Public APIs
            table:read: Grants table:read access
            table:write: Grants table:write access
            table:delete: Grants table:delete access
            table:field:read: Grants table:field:read access
            table:field:write: Grants table:field:write access
            table:field:delete: Grants table:field:delete access
            table:record:write: Grants table:record:write access
            table:record:delete: Grants table:record:delete access
            table:record:read: Grants table:record:read access

````