POST
/
sessions
/
{session_id}
/
page
/
observe
curl
curl -X POST "https://api.notte.cc/sessions/$session_id/page/observe" \
-H "Authorization: Bearer $NOTTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"min_nb_actions": null,
"max_nb_actions": 100,
"url": null,
"instructions": null,
"perception_type": null
}'
{
  "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"
  },
  "screenshot": {
    "bboxes": [
      {
        "x": 123,
        "y": 123,
        "width": 123,
        "height": 123,
        "scroll_x": 123,
        "scroll_y": 123,
        "iframe_offset_x": 0,
        "iframe_offset_y": 0,
        "viewport_width": 123,
        "viewport_height": 123,
        "notte_id": "<string>"
      }
    ],
    "last_action_id": "<string>"
  },
  "space": {
    "description": "<string>",
    "interaction_actions": [
      {
        "type": "click",
        "category": "Interaction Actions",
        "description": "Click on an element of the current page",
        "id": "<string>",
        "selector": {
          "css_selector": "<string>",
          "xpath_selector": "<string>",
          "notte_selector": "<string>",
          "in_iframe": true,
          "in_shadow_root": true,
          "iframe_parent_css_selectors": [
            "<string>"
          ],
          "playwright_selector": "<string>",
          "python_selector": "<string>"
        },
        "press_enter": true,
        "text_label": "<string>"
      }
    ],
    "category": "homepage",
    "actions": [
      {
        "type": "form_fill",
        "category": "Special Browser Actions",
        "description": "Fill a form with multiple values. Important: If you detect a form requesting personal information, try to use this action at first, and otherwise use the regular fill action. CRITICAL: If this action fails once, use the regular form fill instead.",
        "value": {}
      }
    ],
    "browser_actions": [
      {
        "type": "<string>",
        "category": "<string>",
        "description": "<string>",
        "value": {}
      }
    ],
    "markdown": "<string>"
  },
  "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",
    "steps": [
      {}
    ],
    "error": "<string>",
    "credit_usage": 123,
    "proxies": false,
    "browser_type": "chromium",
    "use_file_storage": false
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-notte-request-origin
string | null
x-notte-sdk-version
string | null

Path Parameters

session_id
string
required

Body

application/json
min_nb_actions
integer | null

The minimum number of actions to list before stopping. If not provided, the listing will continue until the maximum number of actions is reached.

max_nb_actions
integer
default:100

The maximum number of actions to list after which the listing will stop. Used when min_nb_actions is not provided.

url
string | null

The URL to observe. If not provided, uses the current page URL.

instructions
string | null

Additional instructions to use for the observation.

perception_type
enum<string> | null

Whether to run with fast or deep perception

Available options:
fast,
deep

Response

Successful Response

metadata
object
required

Metadata of the current page, i.e url, page title, snapshot timestamp.

screenshot
object
required

Base64 encoded screenshot of the current page

space
object
required

Available actions in the current state

session
object
required

Browser session information