Skip to main content
POST
/
sessions
/
{session_id}
/
page
/
execute
python
from notte_sdk import NotteClient, actions

notte = NotteClient()
with notte.Session() as session:
    # go to google
    _ = session.execute(
        actions.Goto(
            url="https://www.duckduckgo.com"
        )
    )

    # fill the search bar with our query
    _ = session.execute(
        actions.Fill(
            value="dog pictures",
            selector='internal:role=combobox[name="Search with DuckDuckGo"i]',
        )
    )
import { NotteClient } from "notte-sdk";

const notte = new NotteClient();
await notte.Session().use(async (session) => {
// go to duckduckgo
await session.execute({
type: "goto",
url: "https://www.duckduckgo.com",
});

// fill the search bar with our query
await session.execute({
type: "fill",
value: "dog pictures",
selector: 'internal:role=combobox[name="Search with DuckDuckGo"i]',
});
});
curl --X POST "https://api.notte.cc/sessions/$session_id/page/execute" \
-H "Authorization: Bearer $NOTTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "goto",
"url": "https://www.duckduckgo.com"
}'
{
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z",
  "action": {
    "value": {},
    "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."
  },
  "success": true,
  "message": "<string>",
  "data": {
    "markdown": "<string>",
    "images": [
      {
        "url": "<string>",
        "description": "<string>"
      }
    ],
    "structured": {
      "success": true,
      "error": "<string>",
      "data": {}
    }
  },
  "exception": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

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

Query Parameters

update_metadata
boolean
default:true

Body

application/json
value
Value · object
required
type
string
default:form_fill
Allowed value: "form_fill"
category
string
default:Special Browser Actions
description
string
default: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.

Response

Successful Response

started_at
string<date-time>
required
ended_at
string<date-time>
required
action
FormFillAction · object
required
success
boolean
required
message
string
required
data
DataSpace · object | null
exception
string | null