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

# List capture sessions

> <p>List all capture sessions, newest first.</p>



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/indices/openapi.documented.yml get /v1beta/capture_sessions
openapi: 3.1.0
info:
  title: Indices API
  description: 'The Indices REST API. See docs for details: https://docs.indices.io'
  version: 0.0.1
servers:
  - url: https://api.indices.io
security:
  - ApiKeyAuth: []
tags:
  - name: Capture Sessions
    description: >-
      Record a browser session; a completed capture is a reusable input for
      building connectors.
  - name: Connectors
    description: Manage connectors.
  - name: Runs
    description: Execute a connector.
  - name: Secrets
    description: Manage secrets like login credentials and API keys.
paths:
  /v1beta/capture_sessions:
    get:
      tags:
        - Capture Sessions
      summary: List capture sessions
      description: <p>List all capture sessions, newest first.</p>
      operationId: listCaptureSessions
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CaptureSession'
                type: array
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Indices from 'indicesio';

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

            const captureSessions = await client.beta.captureSessions.list();

            console.log(captureSessions);
        - lang: Python
          source: |-
            import os
            from indices import Indices

            client = Indices(
                api_key=os.environ.get("INDICES_API_KEY"),  # This is the default and can be omitted
            )
            capture_sessions = client.beta.capture_sessions.list()
            print(capture_sessions)
components:
  schemas:
    CaptureSession:
      properties:
        id:
          type: string
          description: Unique identifier for the capture session.
          examples:
            - cap_0R3kPq8mWxYz1aBcDeFgHi
          example: cap_0R3kPq8mWxYz1aBcDeFgHi
        state:
          $ref: '#/components/schemas/CaptureSessionState'
          description: >-
            Current state of the capture session. A session records while
            active, is completing once completion is requested, and becomes a
            reusable recording once completed.
          examples:
            - active
          example: active
        browser_session_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque identifier for the spawned browser session. Null once the
            browser is gone.
        iframe_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            URL to embed in an iframe to control the browser. Only usable while
            the session is active.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the object was created.
          examples:
            - '2026-01-01T12:00:00Z'
          example: '2026-01-01T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the object was last updated.
          examples:
            - '2026-01-06T12:05:00Z'
          example: '2026-01-06T12:05:00Z'
      type: object
      required:
        - id
        - state
        - browser_session_id
        - iframe_url
        - created_at
        - updated_at
      title: CaptureSession
    CaptureSessionState:
      type: string
      enum:
        - active
        - completing
        - completed
        - abandoned
        - failed
      title: CaptureSessionState
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Enter your API key as the bearer token. Set header: `Authorization` to
        `Bearer <api_key>`

````