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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# List browser runs

> Browse your browser task history with filters and offset pagination.

```bash theme={null}
curl --fail-with-body 'https://api.pre.dev/list-browser-agents?limit=20&skip=0' \
  -H "Authorization: Bearer $PREDEV_API_KEY"
```

The response contains `batches`, `total`, and `hasMore`. Entries are sorted newest first. Increase `skip` by your page size while `hasMore` is true. `limit` defaults to 20 and is clamped to 1–100. Use a nonnegative `skip`.

The `status` filter accepts `processing` or `completed`; omit it to include all stored statuses, including failed runs.

## Summary rows

Rows include the run `id`, task count `total`, finished-task `completed` count, `status`, `totalCreditsUsed`, and available names and timestamps. Their `results` arrays can contain null slots. The first slot may be a partial task stub to identify the run before results arrive.

Fetch [run status](https://predev.mintlify.site/browser-agents/api/task-status.md) for full task details and timelines. List summaries and detailed run snapshots have different behavior for the `completed` count; use `status` to decide whether a run is terminal.

Node: `client.listBrowserAgents({ limit: 20, skip: 0 })`. Python: `client.list_browser_agents(limit=20, skip=0)` returns a dictionary.

## Errors

| Status | When |
| - | - |
| `401` | Missing or invalid key |
| `500` | Unexpected error |

Each status has an example body in the response examples. See [errors and retries](https://predev.mintlify.site/api-reference/errors.md).


## OpenAPI

````yaml api-reference/openapi.json GET /list-browser-agents
openapi: 3.1.0
info:
  title: pre.dev API
  description: >-
    Public REST API for software specifications, browser automation, and credit
    balance. Base URL: https://api.pre.dev. MCP is documented separately at
    https://docs.pre.dev/mcp/tools.
  version: 1.1.0
  contact:
    name: pre.dev Support
    url: https://pre.dev
    email: support@pre.dev
  license:
    name: Proprietary
    url: https://pre.dev/terms
servers:
  - url: https://api.pre.dev
    description: Production API Server
security:
  - apiKeyAuth: []
  - xApiKey: []
tags:
  - name: Specifications
  - name: Browser Agents
  - name: Account
paths:
  /list-browser-agents:
    get:
      tags:
        - Browser Agents
      summary: List browser runs
      description: Newest first; use the detail endpoint for complete task results.
      operationId: listRuns
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - processing
              - completed
              - failed
      responses:
        '200':
          description: Paginated run summaries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBatchesResponse'
              example:
                batches:
                  - id: 507f1f77bcf86cd799439011
                    name: Example heading
                    status: completed
                    total: 1
                    completed: 1
                    totalCreditsUsed: 0.1
                    createdAt: '2026-09-27T12:00:00.000Z'
                    completedAt: '2026-09-27T12:00:21.000Z'
                    results: []
                total: 1
                hasMore: false
        '401':
          description: Missing, invalid, or ineligible authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_key:
                  summary: No key sent
                  value:
                    error: Missing API key
                    message: >-
                      Please provide an API key via Authorization: Bearer
                      <token> header or x-api-key header
                invalid_key:
                  summary: Unknown key
                  value:
                    error: Authentication failed
                    message: Invalid API key
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Internal server error
components:
  schemas:
    ListBatchesResponse:
      type: object
      required:
        - batches
        - total
        - hasMore
      properties:
        batches:
          type: array
          items:
            $ref: '#/components/schemas/BatchSummary'
        total:
          type: integer
        hasMore:
          type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          description: Optional detail; not returned by every endpoint.
        code:
          type: string
          description: Machine-readable code when available.
        actionUrl:
          type: string
          format: uri
        requiresSubscription:
          type: boolean
        trialsUsed:
          type: integer
        maxTrials:
          type: integer
      additionalProperties: true
    BatchSummary:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          description: 24-character record ID.
          pattern: ^[a-fA-F0-9]{24}$
        name:
          anyOf:
            - type: string
            - type: 'null'
        taskNames:
          type: array
          items:
            type: string
        total:
          type: integer
        completed:
          type: integer
          description: Count of stored task results in this history response.
        results:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TaskResult'
              - type: 'null'
          description: >-
            Compact preview, not a complete result set. Use GET
            /browser-agent/{id} for details.
        totalCreditsUsed:
          type: number
        status:
          type: string
          enum:
            - processing
            - completed
            - failed
        createdAt:
          type: string
          format: date-time
        completedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
      additionalProperties: true
    TaskResult:
      type: object
      properties:
        url:
          type: string
        name:
          type: string
        instruction:
          type: string
        input:
          type: object
          properties: {}
          additionalProperties: true
        output:
          type: object
          properties: {}
          additionalProperties: true
        status:
          type: string
          description: >-
            PENDING and RUNNING are status placeholders; all other listed values
            are terminal task outcomes.
          enum:
            - PENDING
            - RUNNING
            - SUCCESS
            - ERROR
            - TIMEOUT
            - BLOCKED
            - CAPTCHA_FAILED
            - LOOP
            - NO_TARGET
            - EXHAUSTED
        data:
          description: >-
            Extracted result; shape follows the requested or inferred schema.
            May be null or omitted.
        creditsUsed:
          type: number
          description: >-
            Settled task charge: every task keeps the 0.1-credit floor charged
            at submission; every status except ERROR and EXHAUSTED adds any
            usage above it.
        durationMs:
          type: integer
          description: Wall-clock task duration in milliseconds.
        error:
          anyOf:
            - type: string
            - type: 'null'
        attempts:
          type: integer
        queuePosition:
          anyOf:
            - type: integer
              description: Queue estimate; 0 when running.
            - type: 'null'
        events:
          type: array
          items:
            $ref: '#/components/schemas/RunnerEvent'
          description: Available timeline when includeEvents=true.
      additionalProperties: true
    RunnerEvent:
      type: object
      required:
        - type
        - timestamp
      properties:
        type:
          type: string
          description: >-
            Extensible event type, for example navigation, screenshot, plan,
            action, validation, waiting, done, or error.
        timestamp:
          type: number
          description: Unix timestamp in milliseconds.
        iteration:
          type: integer
        data:
          description: >-
            Event-specific payload. Screenshot data is not guaranteed to be a
            URL.
      additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Your pre.dev workspace API key (pdk_...) from Integrations, Built-in
        tab: https://pre.dev/projects/integrations?tab=built-in
    xApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Alternative to Authorization: Bearer.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.