Mobilerun Tools/Browser API

The Tools/Browser API from Mobilerun — 1 operation(s) for tools/browser.

GitHub OpenAPI

Operations 1

POST /devices/{deviceId}/browser/execute-script Execute JavaScript in the device's Chrome browser (CDP) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mobilerun-ai:mobilerun-ai-tools-browser-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mobilerun-ai-tools-browser-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mobilerun Ai Tools/Browser API
  version: v1
  contact:
    name: Droidrun
    email: support@droidrun.ai
  description: 'Operations tagged Tools/Browser across 2 of this provider''s published API definitions: openapi.json, mobilerun-ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.mobilerun.ai
  description: Droidrun Cloud API
security:
- bearerAuth: []
tags:
- name: Tools/Browser
paths:
  /devices/{deviceId}/browser/execute-script:
    post:
      description: Evaluates a JavaScript expression exactly once in the device's single, confirmed foreground Chrome tab via the Chrome DevTools Protocol and returns its JSON-serialized result. A responsive browser state without exactly one visible page returns DEVICE_NO_BROWSER_TARGET (400). Transient discovery, page-dial, or visibility-probe transport failures return CDP_TRANSPORT_UNAVAILABLE (503) with Retry-After and an executionOutcome; the service may start Chrome once and retry selection before Runtime.evaluate, but dial or probe recovery is skipped for a backgrounded Chrome, and a user script is never retried after its write or read. Devices without browser support return an unsupported-feature error.
      operationId: browser-execute-script
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteScriptArgs'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteScriptOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      summary: Execute JavaScript in the device's Chrome browser (CDP)
      tags:
      - Tools/Browser
      x-mint:
        content: 'The script is a single JavaScript expression, not a function body — skip the top-level `return` and wrap multi-statement logic in an IIFE:


          ```js

          (() => { const links = [...document.querySelectorAll(''a'')]; return links.map(a => a.href); })()

          ```


          The result must be JSON-serializable: `undefined` comes back as `null`, and `NaN`, `Infinity`, and `-0` are returned as strings. Scripts run in Chrome itself — in-app WebViews are not reachable. iOS devices don''t support browser control and fail with `400`.


          If CDP discovery, page connection, or the foreground visibility probe fails before `Runtime.evaluate` is sent, the service may start Chrome once and retry target selection. Dial and probe recovery only starts Chrome when it is already the foreground app (or the Chrome CDP socket itself is unavailable), so a backgrounded browser still fails closed. The response keeps the `CDP_TRANSPORT_UNAVAILABLE` `503` contract and reports the phase and recovery result in its details when recovery was attempted. A selection deadline shortfall, or failures while writing or reading `Runtime.evaluate`, is never replayed.


          <Tip>

          For a persistent session or full DevTools protocol access, connect a Playwright- or Puppeteer-style CDP client to the raw websocket at `/devices/{deviceId}/browser/cdp` instead of issuing one-shot calls.

          </Tip>

          '
      parameters:
      - in: path
        name: deviceId
        required: true
        schema:
          type: string
      - in: header
        name: X-Device-Display-ID
        schema:
          default: 0
          format: int64
          minimum: 0
          type: integer
    servers:
    - url: https://api.mobilerun.ai
      description: Droidrun Cloud API
components:
  schemas:
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    ExecuteScriptArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/ExecuteScriptArgs.json
          format: uri
          readOnly: true
          type: string
        script:
          description: JavaScript expression to evaluate in the device's foreground Chrome tab (CDP Runtime.evaluate). It is an expression, not a function body — the expression's value is returned (no top-level 'return'). Must evaluate to a JSON-serializable value; wrap multi-statement logic in an IIFE, e.g. (() => { ... ; return x })().
          type: string
      required:
      - script
      type: object
    ExecuteScriptOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/ExecuteScriptOutputBody.json
          format: uri
          readOnly: true
          type: string
        result:
          description: JSON-serialized return value of the script (null if it returned undefined). Non-JSON-serializable numbers (Infinity, NaN, -0) are returned as their string representation.
      required:
      - result
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
          - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
          - array
          - 'null'
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
          - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
          - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
          - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
          - https://example.com/errors/example
          format: uri
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header
x-refined-from:
- openapi.json
- mobilerun-ai-openapi.json
x-provenance:
  method: harvested
  publisher: Mobilerun
  source: https://api.mobilerun.ai/v1/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)