Browse

POST

Allows for browsing the web using detailed natural language instructions. The function supports multi-step command execution based on the CONTINUE status.

Request

This endpoint expects an object.
cmd
stringRequired
A specific natural language instruction for the agent to execute
url
stringOptional
The URL to start or continue browsing from. (Default: google.com)
local
booleanOptional
Boolean flag to indicate if session to be run locally or in the cloud (Default: False)
session_id
stringOptional

Continues the session with session_id if provided.

max_steps
integerOptionalDefaults to 20
Maximum number of steps to execute. (Default: 20)
include_screenshot
booleanOptional
Boolean flag to include a screenshot of the final page.
optional_params
objectOptional

Response

This endpoint returns an object
message
string
The final message or result of the browsing session.
status
string
The final status of the browsing session.
url
string
The current URL of the session.
screenshot
string
image url of the screenshot taken during the session.
session_id
string
The unique identifier for the session.
metadata
objectOptional
Additional metadata for the session

Errors

POST
1curl -X POST https://api.multion.ai/v1/web/browse \
2 -H "X_MULTION_API_KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "cmd": "find the top post on hackernews",
6 "url": "https://news.ycombinator.com/"
7}'
1{
2 "message": "Memorizing the following information: The top post on Hacker News is \"Show HN: Sonauto – a more controllable AI music creator\" with 219 points.\n",
3 "status": "DONE",
4 "url": "https://news.ycombinator.com/",
5 "screenshot": "https://api.multion.ai/v1/web/screenshot/1",
6 "session_id": "1",
7 "metadata": {
8 "step_count": 1,
9 "processing_time": 10
10 }
11}