Jump to content

Use a page in a browser

Your agent clicks and types on a page, then gets what it found.

Some pages only show what you need after a search or a click. Chab opens the page in a browser and does what your agent asks, one step at a time. It can type into a search box and click a link. It can also scroll down so more results load. At the end your agent gets the page as text or as a screenshot. It can also ask for only the data it needs, like prices. Each step says if it worked, so your agent sees where it got stuck. If a page needs a login, use this only for your own account.

Paste this into your AI agent

Set up Chab for me: fetch https://www.chab.ai/agent-setup.md?v=497c0f and follow it. Then use Chab to search python.org for "asyncio" and send me a screenshot of the first result.

Your agent connects Chab and then runs it. Price: 2 credits per started 30 seconds in the browser. The free credits cover a first try. How it works in each app

Full reference for developers
Returns
JSON result
REST endpoint
POST /v1/browser/run
Over MCP
Call chab_operation_start with "browser.run"

What you get

Example request

{  "url": "https://www.python.org/",  "steps": [    {      "action": "type",      "selector": "#id-search-field",      "text": "asyncio",      "submit": true    },    {      "action": "click",      "selector": ".list-recent-events li h3 a"    }  ],  "outputs": [    "markdown",    "screenshot"  ]}

Example result

{  "data": {    "result": {      "url": "https://www.python.org/",      "final_url": "https://www.python.org/jobs/8213/",      "title": "Internet Measurement Researcher (Censorship & Proxies), TGScope | Python.org",      "completed": true,      "stopped_at": null,      "steps": 2,      "log": [        {          "step": 0,          "action": "type",          "selector": "#id-search-field",          "characters": 7,          "submit": true,          "status": "ok",          "error": null        },        {          "step": 1,          "action": "click",          "selector": ".list-recent-events li h3 a",          "status": "ok",          "error": null        }      ],      "markdown": "## Internet Measurement Researcher (Censorship & Proxies) New TGScope Remote, Remote, North America, Europe\n\n## Job Title\n\n Internet Measurement Researcher (Censorship & Proxies) \n\n## Job Description\n\nTGScope is looking for a researcher for a project-based contract of about two months, fully remote, paid by the hour.\n\n...",      "markdown_truncated": false,      "data": null,      "data_error": null,      "screenshot": {        "width": 1280,        "height": 800,        "mime_type": "image/png",        "byte_size": 179763      },      "step_screenshots": 0,      "html_byte_size": null,      "browser_seconds": 5.31,      "usage": null    },    "artifacts": [      {        "id": "art_01M7K1BWJ6WQZ0D9T11E8D6W5C",        "type": "image",        "role": "screenshot",        "mime_type": "image/png",        "byte_size": 179763,        "checksum": "sha256:f28b37e10d80f41330e508b5925aa25c276277520a9204fc965d0e0c092c7f74",        "filename": "page.png",        "metadata_url": "/v1/operations/op_01M7K1BM9G3X3HNDBDK3Y8Z7KG/artifacts/art_01M7K1BWJ6WQZ0D9T11E8D6W5C",        "download_url": "/v1/operations/op_01M7K1BM9G3X3HNDBDK3Y8Z7KG/artifacts/art_01M7K1BWJ6WQZ0D9T11E8D6W5C/download",        "expires_at": "2026-11-19T20:39:20+00:00"      }    ],    "warnings": [],    "result_expires_at": "2026-11-19T20:39:20+00:00"  },  "meta": {    "request_id": "req_123"  }}

You can also run this tool on a schedule as a monitor. Chab then keeps every result and emails you when it changes. Monitors need bought credits or a monthly plan. How monitors work

Inputs

FieldTypeDetails
urlrequiredstringThe public page to open first. Private and local addresses are refused.Up to 2048 characters
stepsarray of objectUp to 20 steps, run in order. A step that fails stops the run there; the log says which and why.
outputsarray of stringWhat to return from the page where the run ended: markdown (in the result), html and screenshot (files). Default markdown.Default ["markdown"]
extractobjectData from the page where the run ended, by a plain prompt, a JSON schema or both, like scrape.extract. Only when every step worked.
extract.promptstringWhat to get from the page, in plain words.Up to 4000 characters
extract.schemaobjectA JSON schema for the data. The answer is checked against it.
extract.max_output_tokensintegerDefault 2048. Min 16 max 8192
full_pagebooleanThe screenshot shows the whole page, not only the window.Default false
capture_each_stepbooleanAlso save a small screenshot (JPEG) after each step that worked.Default false
viewportobjectThe browser window. Default 1280 by 800.
viewport.widthrequiredintegerMin 320 max 1920
viewport.heightrequiredintegerMin 320 max 1600
wait_untilstringWhen the first page counts as open; a goto step can set its own. When a page counts as open: load (the page and its images, the default), domcontentloaded (the HTML only) or networkidle (no requests for half a second).One of load, domcontentloaded, networkidle. Default "load"
max_secondsintegerThe time limit for the steps. No step starts after it and waits stop at it; then the page is captured. Chab holds the credits for it and charges the time used, at most what it holds.Default 60. Min 10 max 120
allow_loginbooleanAllow typing into password fields. Only for your own accounts: never for accounts that are not yours, for new sign-ups or for bulk form posting.Default false

How to call it

AI apps use it through hosted MCP. Coding agents can also use the CLI, and your own code can call the API. Each call starts a job, and your agent picks up the result when it is ready.

curl -X POST https://www.chab.ai/v1/browser/run \  -H "Authorization: Bearer CHAB_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: browser-run-001" \  -d '{"url":"https://www.python.org/","steps":[{"action":"type","selector":"#id-search-field","text":"asyncio","submit":true},{"action":"click","selector":".list-recent-events li h3 a"}],"outputs":["markdown","screenshot"]}'

Use a page in a browser result

{  "data": {    "result": {      "url": "https://www.python.org/",      "final_url": "https://www.python.org/jobs/8213/",      "title": "Internet Measurement Researcher (Censorship & Proxies), TGScope | Python.org",      "completed": true,      "stopped_at": null,      "steps": 2,      "log": [        {          "step": 0,          "action": "type",          "selector": "#id-search-field",          "characters": 7,          "submit": true,          "status": "ok",          "error": null        },        {          "step": 1,          "action": "click",          "selector": ".list-recent-events li h3 a",          "status": "ok",          "error": null        }      ],      "markdown": "## Internet Measurement Researcher (Censorship & Proxies) New TGScope Remote, Remote, North America, Europe\n\n## Job Title\n\n Internet Measurement Researcher (Censorship & Proxies) \n\n## Job Description\n\nTGScope is looking for a researcher for a project-based contract of about two months, fully remote, paid by the hour.\n\n...",      "markdown_truncated": false,      "data": null,      "data_error": null,      "screenshot": {        "width": 1280,        "height": 800,        "mime_type": "image/png",        "byte_size": 179763      },      "step_screenshots": 0,      "html_byte_size": null,      "browser_seconds": 5.31,      "usage": null    },    "artifacts": [      {        "id": "art_01M7K1BWJ6WQZ0D9T11E8D6W5C",        "type": "image",        "role": "screenshot",        "mime_type": "image/png",        "byte_size": 179763,        "checksum": "sha256:f28b37e10d80f41330e508b5925aa25c276277520a9204fc965d0e0c092c7f74",        "filename": "page.png",        "metadata_url": "/v1/operations/op_01M7K1BM9G3X3HNDBDK3Y8Z7KG/artifacts/art_01M7K1BWJ6WQZ0D9T11E8D6W5C",        "download_url": "/v1/operations/op_01M7K1BM9G3X3HNDBDK3Y8Z7KG/artifacts/art_01M7K1BWJ6WQZ0D9T11E8D6W5C/download",        "expires_at": "2026-11-19T20:39:20+00:00"      }    ],    "warnings": [],    "result_expires_at": "2026-11-19T20:39:20+00:00"  },  "meta": {    "request_id": "req_123"  }}

Price: 2 credits per started 30 seconds in the browser. See all prices

Want to try Chab with your agent?

Copy the prompt and paste it into your AI. Your agent starts with free credits and doesn't need an account.

See plans