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

# List records

> Returns a list of records for a table.



## OpenAPI

````yaml get /tables/{table_id}/records
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /tables/{table_id}/records:
    get:
      tags:
        - Tables
      summary: List records
      description: Returns a list of records for a table.
      operationId: Tables.listRecords
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
          description: The id of the table to retrieve records from.
        - name: limit
          in: query
          schema:
            type: integer
            default: 500
            minimum: 1
            maximum: 1000
          required: false
          description: >-
            The limit on the number of objects to return, ranging between 1 and
            1000.
        - $ref: '#/components/parameters/next'
      responses:
        '200':
          description: List of records
          content:
            application/json:
              schema:
                type: object
                required:
                  - object
                  - data
                properties:
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Record'
                    description: >-
                      An array containing the actual response elements,
                      paginated by any request parameters.
                  cursor:
                    type: string
                    description: The stable cursor to use to get the next page of records.
                    x-stainless-pagination-property:
                      purpose: next_cursor_field
                  has_more:
                    type: boolean
                    description: >-
                      Whether or not there are more elements available after
                      this set. If false, this set comprises the end of the
                      list.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Datagrid from 'datagrid-ai';


            const client = new Datagrid({
              apiKey: process.env['DATAGRID_API_KEY'], // This is the default and can be omitted
            });


            // Automatically fetches more pages as needed.

            for await (const record of
            client.knowledge.tables.records.list('table_id')) {
              console.log(record.id);
            }
        - lang: Python
          source: |-
            import os
            from datagrid_ai import Datagrid

            client = Datagrid(
                api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
            )
            page = client.knowledge.tables.records.list(
                table_id="table_id",
            )
            page = page.data[0]
            print(page.id)
components:
  parameters:
    next:
      name: next
      in: query
      schema:
        type: string
      required: false
      description: >-
        A cursor to use in pagination to continue a query from the previous
        request. This is automatically added when the request has more results
        to fetch.
  schemas:
    Record:
      type: object
      description: The `record` object represents a single record within a table.
      required:
        - object
        - id
        - table_id
        - created_at
        - updated_at
        - data
      properties:
        object:
          type: string
          enum:
            - record
          description: The object type, which is always `record`.
        id:
          type: string
          description: The record identifier, which can be referenced in the API endpoints.
        table_id:
          type: string
          description: The id of the table this record belongs to.
        created_at:
          type: string
          format: date-time
          description: The ISO string for when the record was created.
        updated_at:
          type: string
          format: date-time
          description: The ISO string for when the record was last updated.
        data:
          type: object
          additionalProperties: true
          description: The actual record data as a JSON object.
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````