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

# List Sessions

> List the project's V4 sessions — one row per session (its most recent
run), most-recent first.

A session is a conversation: follow-up runs reuse the same
public_session_id, so GET /api/v4/runs would list one row per RUN. This
collapses to one row per SESSION directly in Postgres with DISTINCT ON, so a
chatty session with 100 runs is still a single row (no scan amplification),
and selects only the slim columns the session list needs — never the heavy
per-run text/token/cost fields.

Keyset-paginated on the latest run's (created_at, id): pass `next_cursor`
back as `cursor` to page. Offset/COUNT was dropped — it doesn't scale on
projects with many sessions.



## OpenAPI

````yaml /cloud/openapi/v4.json get /sessions
openapi: 3.1.0
info:
  title: Browser Use Public API v4
  summary: Browser Use agent runs API (v4)
  version: 4.0.0
servers:
  - url: https://api.browser-use.com/api/v4
    description: Production server
security: []
tags:
  - name: Runs
  - name: Sessions
  - name: Workspaces
  - name: Browsers
  - name: Profiles
paths:
  /sessions:
    get:
      tags:
        - Sessions
      summary: List Sessions
      description: >-
        List the project's V4 sessions — one row per session (its most recent

        run), most-recent first.


        A session is a conversation: follow-up runs reuse the same

        public_session_id, so GET /api/v4/runs would list one row per RUN. This

        collapses to one row per SESSION directly in Postgres with DISTINCT ON,
        so a

        chatty session with 100 runs is still a single row (no scan
        amplification),

        and selects only the slim columns the session list needs — never the
        heavy

        per-run text/token/cost fields.


        Keyset-paginated on the latest run's (created_at, id): pass
        `next_cursor`

        back as `cursor` to page. Offset/COUNT was dropped — it doesn't scale on

        projects with many sessions.
      operationId: list_sessions_sessions_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Max sessions per page (max 100).
            default: 20
            title: Limit
          description: Max sessions per page (max 100).
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Keyset cursor from a prior response.
            title: Cursor
          description: Keyset cursor from a prior response.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionListResponse'
        '400':
          description: Malformed pagination cursor.
        '403':
          description: Zero Data Retention is enabled on the project (V4 unsupported).
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SessionListResponse:
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/SessionInfo'
          type: array
          title: Sessions
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nextcursor
        hasMore:
          type: boolean
          title: Hasmore
          default: false
      type: object
      required:
        - sessions
      title: SessionListResponse
      description: >-
        One entry per session (the session's most recent run), most-recent
        first.


        A V4 session is a conversation: every follow-up run reuses the same

        public_session_id. GET /api/v4/runs returns one row per RUN, so callers
        that

        want a list of distinct *sessions* (e.g. the recent-sessions panel)
        should

        use this instead of de-duplicating runs client-side.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionInfo:
      properties:
        sessionId:
          type: string
          format: uuid
          title: Sessionid
        workspaceId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workspaceid
        latestRunId:
          type: string
          format: uuid
          title: Latestrunid
        task:
          type: string
          title: Task
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        status:
          type: string
          enum:
            - queued
            - dispatching
            - running
            - completed
            - failed
            - cancelled
          title: Status
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - sessionId
        - workspaceId
        - latestRunId
        - task
        - title
        - status
        - createdAt
        - updatedAt
      title: SessionInfo
      description: >-
        Lightweight metadata for one V4 session (its most recent run).


        Deliberately slim — just what a session list needs (open the
        conversation,

        show a label + status + time). The heavy per-run fields (result, error,

        token/cost totals) live on RunSummary and aren't repeated here.
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````