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

# Get a sheet's rows

> Read a sheet's rows with their cell values, a page at a time, with optional filters.



## OpenAPI

````yaml api-reference/openapi.yaml GET /v1/grids/{grid_id}/sheets/{sheet_id}
openapi: 3.0.3
info:
  title: QX API
  version: '1.0'
  description: >-
    Run what you build in QX from your own code. Message agents, execute flows
    and grids, and read their results.
servers:
  - url: https://api.qxlabs.com
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: >-
      Message agents through OpenAI's Responses API, so OpenAI's SDKs work with
      a QX API key.
  - name: Flows
    description: Execute flows and follow their executions.
  - name: Grids
    description: Execute grids, follow their executions and read their rows.
paths:
  /v1/grids/{grid_id}/sheets/{sheet_id}:
    get:
      tags:
        - Grids
      summary: Get a sheet's rows
      description: >
        Returns a sheet's rows, each with its `row_id` and current cell values,
        a page at a time.

        Every parameter is optional, and `row_ids`, `filters` and paging
        combine: filters apply within `row_ids`.

        Each cell keeps only its latest value, so this always returns the sheet
        as it is now.
      operationId: getSheetRows
      parameters:
        - name: grid_id
          in: path
          required: true
          schema:
            type: string
          description: The grid's ID
          example: 3e7a9c415b2d4f8ea6c19d0b2e4f7a18
        - name: sheet_id
          in: path
          required: true
          schema:
            type: string
          description: The sheet's ID
          example: b2d4f6a81c3e4a5b8d7f0e9c2a4b6d81
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
          description: Rows to skip
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
          description: Rows per page, up to 500
        - name: row_ids
          in: query
          schema:
            type: string
          description: >-
            Comma-separated row IDs. Returns only these rows. About 200 IDs fit
            in a URL most servers accept
        - name: column_ids
          in: query
          schema:
            type: string
          description: Comma-separated column IDs. Returns only these columns' cells
        - name: filters
          in: query
          schema:
            type: string
          description: >
            JSON list of `{"column_id", "operator", "value"}`. A row is kept
            only if it matches every filter.

            Operators: equals, not_equal, contains, does_not_contain,
            starts_with, ends_with, is_empty, is_not_empty, greater_than,
            less_than, greater_or_equal, less_or_equal, is_true, is_false,
            on_day, before and after.

            They compare against the text the app shows in the cell. The number
            operators ignore thousands commas.
          example: >-
            [{"column_id": "9f8e7d6c5b4a439281706f5e4d3c2b1a", "operator":
            "contains", "value": "sensors"}]
      responses:
        '200':
          description: A page of rows
          content:
            application/json:
              schema:
                type: object
                properties:
                  rows:
                    type: array
                    description: The page of rows, in the order the app shows them
                    items:
                      type: object
                      properties:
                        row_id:
                          type: string
                        cells:
                          type: object
                          description: >
                            The row's cells keyed by column ID. A column with no
                            cell in the row yet is missing.

                            Each cell has `value` (its real value: a string,
                            number, boolean, object or list), `status` (idle,
                            stale, pending, processing, completed, invalid,
                            error or skipped) and `error`.
                  total_count:
                    type: integer
                    description: >-
                      The number of rows that match `row_ids` and `filters`,
                      across all pages
                  has_more:
                    type: boolean
                    description: Whether there are rows after this page
              example:
                rows:
                  - row_id: 7d1e3f5a9b2c4d6e8f0a1b3c5d7e9f20
                    cells:
                      c1a2b3c4d5e64f708a9b0c1d2e3f4a5b:
                        value: acme.com
                        status: completed
                        error: null
                      9f8e7d6c5b4a439281706f5e4d3c2b1a:
                        value: Acme makes industrial sensors for factory lines.
                        status: completed
                        error: null
                total_count: 240
                has_more: true
        '400':
          description: '`filters` isn''t a JSON list'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The grid is in your org but isn't shared with you
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: There's no such grid or sheet, or it belongs to another org
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Read rate limit exceeded for grids endpoints
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            "https://api.qxlabs.com/v1/grids/3e7a9c415b2d4f8ea6c19d0b2e4f7a18/sheets/b2d4f6a81c3e4a5b8d7f0e9c2a4b6d81?limit=50"
            \
              -H "Authorization: Bearer <YOUR_QX_API_KEY>"
        - lang: python
          label: Python
          source: |
            import requests

            headers = {"Authorization": "Bearer <YOUR_QX_API_KEY>"}

            page = requests.get(
                "https://api.qxlabs.com/v1/grids/3e7a9c415b2d4f8ea6c19d0b2e4f7a18/sheets/b2d4f6a81c3e4a5b8d7f0e9c2a4b6d81",
                params={"limit": 50, "column_ids": "9f8e7d6c5b4a439281706f5e4d3c2b1a"},
                headers=headers,
            ).json()
            for row in page["rows"]:
                print(row["row_id"], row["cells"])
            print(page["total_count"], page["has_more"])
        - lang: typescript
          label: TypeScript
          source: >
            const headers = { Authorization: "Bearer <YOUR_QX_API_KEY>" };

            const url = new
            URL("https://api.qxlabs.com/v1/grids/3e7a9c415b2d4f8ea6c19d0b2e4f7a18/sheets/b2d4f6a81c3e4a5b8d7f0e9c2a4b6d81");

            url.searchParams.set("limit", "50");

            url.searchParams.set("column_ids",
            "9f8e7d6c5b4a439281706f5e4d3c2b1a");


            const page = await (await fetch(url, { headers })).json();

            for (const row of page.rows) {
              console.log(row.row_id, row.cells);
            }

            console.log(page.total_count, page.has_more);
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your QX API key. The `X-API-Key` header works too

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.