Step

Execute an action in the browser session and observe the resulting state.

The step endpoints should only be used after a previous observe (or another step) call. Observations give you a snapshot of the current state, including available actions. Stepping allows you to execute an action and observe the resulting state.

Example of a step request:

{
    "action_id": "I1",
    "value": "Paris",
}

Returns a new observation of the new state after executing the specified action.

/sessions/{session_id}/page/step
{
  "session": {
    "session_id": "<string>",
    "timeout_minutes": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "closed_at": "2023-11-07T05:31:56Z",
    "last_accessed_at": "2023-11-07T05:31:56Z",
    "duration": "<string>",
    "status": "active",
    "error": "<string>",
    "proxies": false,
    "browser_type": "chromium"
  },
  "space": {
    "markdown": "<string>",
    "actions": [
      {
        "id": "<string>",
        "description": "<string>",
        "category": "<string>",
        "params": [
          {
            "name": "<string>",
            "type": "<string>",
            "default": "<string>",
            "values": [
              "<string>"
            ]
          }
        ],
        "status": "valid"
      }
    ],
    "browser_actions": [
      {
        "id": "S1",
        "description": "Special action",
        "category": "Special Browser Actions",
        "params": [
          {
            "name": "<string>",
            "type": "<string>",
            "default": "<string>",
            "values": [
              "<string>"
            ]
          }
        ],
        "status": "valid"
      }
    ],
    "description": "<string>",
    "category": "<string>"
  },
  "metadata": {
    "title": "<string>",
    "url": "<string>",
    "viewport": {
      "scroll_x": 123,
      "scroll_y": 123,
      "viewport_width": 123,
      "viewport_height": 123,
      "total_width": 123,
      "total_height": 123
    },
    "tabs": [
      {
        "tab_id": 123,
        "title": "<string>",
        "url": "<string>"
      }
    ],
    "timestamp": "2023-11-07T05:31:56Z"
  },
  "data": {
    "markdown": "<string>",
    "images": [
      {
        "id": "<string>",
        "url": "<string>",
        "category": "icon"
      }
    ],
    "structured": {
      "success": true,
      "error": "<string>",
      "data": {}
    }
  },
  "progress": {
    "current_step": 123,
    "max_steps": 123
  }
}

Last updated