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

# Read grid data

> Read what is inside a grid: its columns, its rows, a single cell, the run behind a computed cell, or the rows matching a search.

**Example:** "Show me the columns of the 'FAQ Suggester v2 Grid' grid"

**Usage:** pick what to read with `view` and always pass the grid id. `columns` lists the grid's columns; `rows` returns the data a page at a time (up to 200, 50 by default) and can be limited to certain columns or specific rows; `cell` and `cell_run` open one cell (both need the row id and column id, and `cell_run` also needs the run id); `row_search` finds rows matching your text (needs the search text).

**Response:** columns come back with their names and types; rows come as a page of cell values tagged with the grid version; a cell returns its value, status, and the run that produced it; a cell run returns its inputs, status, and version; a search returns the row-and-column matches.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/grids/data
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/grids/data:
    post:
      tags:
        - business
      summary: Read grid data
      description: >-
        Read what is inside a grid: its columns, its rows, a single cell, the
        run behind a computed cell, or the rows matching a search.


        **Example:** "Show me the columns of the 'FAQ Suggester v2 Grid' grid"


        **Usage:** pick what to read with `view` and always pass the grid id.
        `columns` lists the grid's columns; `rows` returns the data a page at a
        time (up to 200, 50 by default) and can be limited to certain columns or
        specific rows; `cell` and `cell_run` open one cell (both need the row id
        and column id, and `cell_run` also needs the run id); `row_search` finds
        rows matching your text (needs the search text).


        **Response:** columns come back with their names and types; rows come as
        a page of cell values tagged with the grid version; a cell returns its
        value, status, and the run that produced it; a cell run returns its
        inputs, status, and version; a search returns the row-and-column
        matches.
      operationId: get_grid_data_api_v1_business_grids_data_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GridDataArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GridDataArgs:
      properties:
        view:
          $ref: '#/components/schemas/GridDataView'
          description: >-
            Which grid data slice to return: columns, rows, cell (needs
            row_id/column_id), cell_run (that cell's producing run - needs
            row_id/column_id/workflow_run_id), or row_search. Prefer
            cell/cell_run over rows+page_size=1 for a single-row/cell question -
            but only for expandable (blob-backed) columns, e.g. workflow/output
            columns with markdown/json/array/file content; plain scalar columns
            (text/number/boolean/single_select) already return their full value
            via rows and have no cell view to expand.
        grid_id:
          type: string
          format: uuid
          title: Grid Id
          description: Grid to read from
        row_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Row Id
          description: Row id; required for cell and cell_run views
        column_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Column Id
          description: >-
            Column id; required for cell and cell_run views. For cell_run
            specifically, must be the WORKFLOW-type column id (not the
            input/output column) - the one whose AI runs are being traced.
        workflow_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Run Id
          description: Run id; required for the cell_run view
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: >-
            Search text; required for the row_search view. row_search matches
            only searchable (text-like input) cell values — generated workflow
            output stored as markdown/JSON/blobs is not indexed and won't match.
        page:
          type: integer
          minimum: 1
          title: Page
          default: 1
        page_size:
          type: integer
          maximum: 200
          minimum: 1
          title: Page Size
          default: 50
        column_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Column Ids
          description: >-
            Column id filter for the rows view — return only these columns per
            row instead of every column. See also field_name/column_type for the
            columns view.
        row_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Row Ids
          description: >-
            Row id filter for the rows view — fetch specific, non-contiguous
            rows (e.g. 'rows 3, 7, and 9') instead of a page range. Resolve
            ordinal positions to ids with a prior rows view read, then pass them
            here.
        column_type:
          anyOf:
            - items:
                $ref: '#/components/schemas/GridColumnType'
              type: array
            - type: 'null'
          title: Column Type
          description: >-
            Column-type filter for the columns view. Defaults to INPUT columns;
            pass ['output'] to see the generated/workflow columns the grid
            produces for each row.
        field_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Field Name
          description: >-
            Column filter for the columns view — matches the underlying workflow
            input schema's field name (not the grid's display column name). Use
            this to answer 'which column maps to field X' directly instead of
            listing all columns and matching by eye.
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Id
          description: Filter columns by workflow id (for the columns view)
      type: object
      required:
        - view
        - grid_id
      title: GridDataArgs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GridDataView:
      type: string
      enum:
        - columns
        - rows
        - cell
        - cell_run
        - row_search
      title: GridDataView
    GridColumnType:
      type: string
      enum:
        - input
        - workflow
        - output
      title: GridColumnType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````