> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-larsen-v1-unified-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Browsercode Run Events

> Incremental event feed for a browsercode run. Events carry monotonic ids;
poll `?after=<id>` for only newer ones. MOCKED items.



## OpenAPI

````yaml /cloud/openapi/v1.json get /agents/browsercode/runs/{run_id}/events
openapi: 3.1.0
info:
  title: Browser Use API v1
  summary: Unified /api/v1 preview spec, non-production only
  version: 1.0.0
servers:
  - url: https://api-staging-ufcbwvyv9yifyyvc3.browser-use.com/api/v1
    description: Browser Use API v1 (staging)
security: []
paths:
  /agents/browsercode/runs/{run_id}/events:
    get:
      tags:
        - 'Agent: browsercode'
      summary: Get Browsercode Run Events
      description: >-
        Incremental event feed for a browsercode run. Events carry monotonic
        ids;

        poll `?after=<id>` for only newer ones. MOCKED items.
      operationId: get_browsercode_run_events_agents_browsercode_runs__run_id__events_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Return only events with id > this. Pass the last id you saw.
            title: After
          description: Return only events with id > this. Pass the last id you saw.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunEventList'
        '404':
          description: Run not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrowsercodeRunNotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RunEventList:
      properties:
        events:
          items:
            $ref: '#/components/schemas/RunEvent'
          type: array
          title: Events
        nextAfter:
          anyOf:
            - type: integer
            - type: 'null'
          title: Nextafter
          description: Highest event id in this page, or null.
        hasMore:
          type: boolean
          title: Hasmore
          default: false
      type: object
      required:
        - events
      title: RunEventList
      description: >-
        Incremental event page. `next_after` is the highest id here — pass it
        back

        as `?after=` to get the delta; `has_more` says whether more already
        exist.
    BrowsercodeRunNotFoundError:
      properties:
        detail:
          type: string
          title: Detail
          default: Run not found
      type: object
      title: BrowsercodeRunNotFoundError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunEvent:
      properties:
        id:
          type: integer
          title: Id
          description: Monotonic event id. Pass the last one you saw as ?after=.
        runId:
          type: string
          title: Runid
        ts:
          type: string
          format: date-time
          title: Ts
        type:
          type: string
          title: Type
          description: Event type, e.g. "run.started", "tool.call", "run.completed".
        data:
          additionalProperties: true
          type: object
          title: Data
      type: object
      required:
        - id
        - runId
        - ts
        - type
      title: RunEvent
      description: >-
        One browsercode run event. Events have monotonic ids; poll `?after=<id>`
        to

        fetch only newer ones (never the whole list each time).
    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

````