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

# Get Dataset Rows

Retrieve paginated rows from a dataset with cell-level data.

## Behavior Notes

* Each row is an array of cells matching the order of the `columns` array.
* Dataset cells use a uniform `type: "dataset"` shape.
* Use `q` to search across dataset row cell values.

## Related

* [List Datasets](/reference/list-datasets)
* [Create Dataset Version from Request History](/reference/create-dataset-version-from-filter-params)
* [Datasets Overview](/features/evaluations/datasets-overview)


## OpenAPI

````yaml GET /api/public/v2/datasets/{dataset_id}/rows
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/datasets/{dataset_id}/rows:
    get:
      tags:
        - datasets
      summary: Get Dataset Rows
      operationId: getDatasetRows
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: integer
          description: The ID of the dataset to retrieve rows from
        - name: workspace_id
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
          description: >-
            Filter by specific workspace ID. Defaults to current user's
            workspace.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number for pagination
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Number of rows per page (max 100)
        - name: q
          in: query
          required: false
          schema:
            type: string
          description: Search query for filtering rows
      responses:
        '200':
          description: Paginated dataset rows.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRowsResponse'
              examples:
                rows:
                  summary: Dataset rows
                  value:
                    success: true
                    message: success
                    columns:
                      - input
                      - expected_output
                    rows:
                      - - type: dataset
                          value: What is PromptLayer?
                        - type: dataset
                          value: A prompt management platform
                    page: 1
                    per_page: 10
                    pages: 5
                    total: 45
        '400':
          description: Invalid workspace_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    DatasetRowsResponse:
      type: object
      title: DatasetRowsResponse
      required:
        - success
        - columns
        - rows
        - page
        - per_page
        - pages
        - total
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        columns:
          type: array
          items:
            type: string
        page:
          type: integer
        per_page:
          type: integer
        pages:
          type: integer
        total:
          type: integer
        rows:
          type: array
          items:
            type: array
            items:
              $ref: '#/components/schemas/DatasetRowCell'
          description: Rows of dataset cells in the same order as columns.
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    DatasetRowCell:
      type: object
      title: DatasetRowCell
      required:
        - type
        - value
      properties:
        type:
          type: string
          enum:
            - dataset
        value:
          description: Dataset cell value.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Not found - requested resource does not exist or is not accessible.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````