> ## 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 Files

> List a browsercode run's files. `?kind=output` = what it produced (the
golden path); `?kind=input` = attached uploads. Each item's `downloadUrl` is
a presigned direct link. MOCKED items.



## OpenAPI

````yaml /cloud/openapi/v1.json get /agents/browsercode/runs/{run_id}/files
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}/files:
    get:
      tags:
        - 'Agent: browsercode'
      summary: Get Browsercode Run Files
      description: >-
        List a browsercode run's files. `?kind=output` = what it produced (the

        golden path); `?kind=input` = attached uploads. Each item's
        `downloadUrl` is

        a presigned direct link. MOCKED items.
      operationId: get_browsercode_run_files_agents_browsercode_runs__run_id__files_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: kind
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - input
                  - output
                type: string
              - type: 'null'
            title: Kind
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunFileList'
        '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:
    RunFileList:
      properties:
        files:
          items:
            $ref: '#/components/schemas/RunFile'
          type: array
          title: Files
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nextcursor
        hasMore:
          type: boolean
          title: Hasmore
          default: false
      type: object
      required:
        - files
      title: RunFileList
      description: >-
        A run's files. `GET /runs/{id}/files?kind=input|output` unions the two

        physical stores (staged uploads + session workspace outputs) into one
        list.
    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
    RunFile:
      properties:
        id:
          type: string
          title: Id
          description: File id (e.g. "up_..." for inputs).
        kind:
          type: string
          enum:
            - input
            - output
          title: Kind
          description: '`input` (attached to the run) or `output` (produced by it).'
        name:
          type: string
          title: Name
          description: Filename, e.g. "data.csv".
        sizeBytes:
          type: integer
          title: Sizebytes
        contentType:
          type: string
          title: Contenttype
          default: application/octet-stream
        downloadUrl:
          type: string
          title: Downloadurl
          description: >-
            Presigned direct download link (expiring). GET it yourself; no API
            key needed.
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
        - id
        - kind
        - name
        - sizeBytes
        - downloadUrl
        - createdAt
      title: RunFile
      description: >-
        One file attached to or produced by a run.


        `download_url` is a presigned link straight at storage — you GET it
        directly,

        no Browser Use API call, no key. There is deliberately no `GET
        /files/{id}`.

        Re-list to refresh an expired link.
    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

````