Skip to content

Tools ​

Every tool your agent sees, its arguments and what it returns. The agent picks the arguments itself; this page is for you to know what it can do and what it costs.

The names and arguments follow Playwright MCP wherever the action is the same, so agents already know how to use them. The examples on this page are real replies from a test session; only the IDs, the exit IP, the test limits and our test site's address were changed.

A session, step by step ​

An agent asked to order a pizza on httpbin's test form makes these calls. Each reply is short: the agent asks for a snapshot when it needs to see the page.

1. Start a browser. Datacenter by default; the reply gives the limits and prices.

Agent calls browser_create
json
{ "country": "us" }
BitFetcher replies
json
{
  "session_id": "bs_db67f0378680655285b4",
  "proxy": "datacenter",
  "idle_timeout_sec": 600,
  "max_seconds": 3600,
  "max_mb": 500,
  "pricing": { "credits_per_minute": 2, "credits_per_gb": 2000 }
}

2. Open the page.

Agent calls browser_navigate
json
{ "url": "https://httpbin.io/forms/post" }
BitFetcher replies
json
{
  "url": "https://httpbin.io/forms/post",
  "title": "httpbin.io/forms/post",
  "status": 200
}

3. Read it. The snapshot gives each element a ref.

Agent calls browser_snapshot
BitFetcher replies (start of it)
yaml
- Page URL: https://httpbin.io/forms/post
- Page Title: httpbin.io/forms/post
- Page Snapshot:
- form [ref=e40]:
  - paragraph [ref=e3]:
    - LabelText [ref=e2]:
      - text: Customer name:
      - textbox "Customer name:" [ref=e1]
  …
  - group "Pizza Size" [ref=e17]:
    - Legend [ref=e10]: Pizza Size
    - paragraph [ref=e12]:
      - radio "Small" [ref=e11]
    - paragraph [ref=e14]:
      - radio "Medium" [ref=e13]
  …
  - paragraph [ref=e39]:
    - button "Submit order" [ref=e38]

4. Fill the form. Typing and clicks are real keyboard and mouse input; each reply is the page's status.

Agent calls browser_type, then browser_click
json
{ "element": "Customer name", "ref": "e1", "text": "Ada Lovelace" }
{ "element": "Medium size", "ref": "e13" }
BitFetcher replies, each time
json
{ "url": "https://httpbin.io/forms/post", "title": "httpbin.io/forms/post" }

5. Submit. The click leads to a new page, so the status has its HTTP code.

Agent calls browser_click
json
{ "element": "Submit order", "ref": "e38" }
BitFetcher replies
json
{
  "url": "https://httpbin.io/post",
  "title": "httpbin.io/post",
  "status": 200
}

6. Close the browser. Billing stops, and the reply says what the session cost.

Agent calls browser_close
BitFetcher replies
json
{
  "session_id": "bs_db67f0378680655285b4",
  "state": "ended",
  "seconds": 21,
  "mb": { "datacenter": 0.03 },
  "credits": 4,
  "end_reason": "client closed",
  "exit_ip": "203.0.113.7",
  "balance": 999989
}

Every account ​

scrape ​

Fetches one page through the Scraping API and returns it. It opens no browser for the agent to drive, and costs what the same API request costs.

ArgumentTypeDefaultDescription
urlstringrequiredThe page to fetch (http or https).
formatstringmarkdownmarkdown or html.
proxystringautoauto: datacenter first, then residential once if the site blocks, charged only for the try that works. datacenter, or premium (residential).
countrystringTwo-letter country code of the exit IP, e.g. us.
renderbooleanfalseRender JavaScript in a browser. Implied by wait_for and screenshot.
wait_forstringCSS selector to wait for before reading the page.
screenshotbooleanfalseAlso return a JPEG screenshot of the viewport.
extract_promptstringExtract data with AI, following this instruction. Returns extracted_data instead of the page.
extract_schemaobjectExtract data matching this JSON schema. Use this or extract_prompt, not both.
max_creditsintegerNever spend more than this many credits on the call.

The reply is a summary, then the page as markdown or HTML (cut at 100,000 characters, with truncated_from), then the screenshot as an image if asked:

Agent calls scrape
json
{ "url": "https://example.com" }
BitFetcher replies
json
{
  "url": "https://example.com",
  "status_code": 200,
  "proxy_used": "datacenter",
  "credits_cost": 1
}
md
This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.
  • status_code is the site's. A 404 or 5xx comes back as it is, as a result rather than an error, and isn't retried on residential.
  • stop_reason: max_credits means the cap skipped the residential retry; the blocked answer is returned free. See Costs and limits.

account_usage ​

No arguments. The balance, what the account can run at once, the residential traffic left this month, and the prices. On accounts with the Hosted Browser, also the browser limit, how many are running and the price per minute.

BitFetcher replies
json
{
  "credits": 1000000,
  "limits": { "concurrent_requests": 2 },
  "browsers": { "limit": 5, "running": 0, "max_seconds": 3600 },
  "residential_mb": { "used": 0, "cap": 512, "left": 512 },
  "pricing": {
    "request_credits": {
      "base": 1,
      "js_render": 5,
      "premium": 10,
      "js_premium": 25,
      "llm": 5,
      "screenshot": 1
    },
    "credits_per_gb": {
      "datacenter": 2000,
      "residential": 16000,
      "custom": 400
    },
    "browser_credits_per_minute": 2
  }
}

Browser sessions Beta ​

Listed for accounts with the Hosted Browser enabled. The tool list is read when the agent connects: once the Hosted Browser is enabled, reconnect the server.

Every browser tool takes an optional session_id. Without it, the tool uses the last browser created in this connection, so the common case needs no IDs. A connection holds up to 5 browsers at once, within your plan's browser limit.

browser_create ​

Starts a browser: our Chromium with a consistent device identity, behind the proxy it asks for.

ArgumentTypeDefaultDescription
proxystringdatacenterdatacenter or premium (residential, about 8 times the traffic price). A browser keeps its proxy for life.
countrystringTwo-letter country code of the exit IP, e.g. us.
osstringlinuxwindows or linux: the operating system the browser presents.
identitystringA label (letters, digits, ., _, -) that brings back the same device and exit IP on every browser created with it, as with the API's persistent identity.
max_creditsintegerClose the browser before it costs more than this, time and traffic together. See Spending cap.
user_approvedbooleanfalseSet to true only after you approved a residential browser. See Residential proxy policy.

Returns session_id, proxy, idle_timeout_sec, max_seconds, max_mb, pricing, and max_credits if set (see step 1). The exit IP is known at the end: browser_close returns it.

A residential browser is a new browser: the datacenter one's cookies and logins don't carry over. Under the default ask policy, asking for one without your approval returns the price to show you:

Agent calls browser_create
json
{ "proxy": "premium" }
BitFetcher replies (an error)
json
{
  "error": "premium_needs_approval",
  "message": "a residential (premium) browser costs more: show the user the price below and ask. If they approve, call browser_create again with proxy=premium and user_approved=true. It is a new browser: the current one's cookies and logins do not carry over",
  "price": {
    "datacenter_credits_per_gb": 2000,
    "residential_credits_per_gb": 16000,
    "residential_vs_datacenter": 8,
    "browser_credits_per_minute": 2
  }
}

browser_list ​

No arguments. Every browser of this connection, open or closed. A running one shows seconds, the current tab's url and credits_so_far, which counts the minutes only: its traffic is known when it closes. A closed one shows what browser_close reports, with closed_because (for example idle time) or stop_reason: max_credits. The default browser has default: true.

BitFetcher replies
json
{
  "browsers": [
    {
      "session_id": "bs_db67f0378680655285b4",
      "state": "running",
      "proxy": "datacenter",
      "seconds": 19,
      "url": "https://example.com/",
      "credits_so_far": 2,
      "note": "credits_so_far counts minutes only; traffic (MB) is known at close",
      "default": true
    }
  ]
}

browser_close ​

ArgumentTypeDefaultDescription
session_idstringthe default browserThe browser to close.

Closes the browser, which stops its billing, and returns seconds, mb per proxy kind, credits, end_reason, exit_ip and your balance after the charge (see step 6). If the usage isn't reported within 30 seconds, the browser is closed anyway, and browser_list shows the usage once it's in. A later call on a closed browser fails with session_not_found.

browser_navigate ​

ArgumentTypeDefaultDescription
urlstringrequiredThe URL to open (http or https).

Opens the URL in the current tab and waits up to 30 seconds for it to load. Returns the status with the page's HTTP status; loading: true means it was still loading.

When the page is a challenge (a 403, 429 or 503, or a bot-protection page), it waits up to 10 seconds more for the challenge to pass and reload into the real page, and reports that page. A block that stays costs those 10 seconds and comes back as blocked:

BitFetcher replies, on a page that refuses datacenter IPs
json
{
  "url": "…",
  "title": "Just a moment...",
  "status": 403,
  "blocked": {
    "vendor": "cloudflare",
    "status": 403,
    "advice": "blocked by cloudflare, which often refuses datacenter IPs. A premium (residential) browser may get through at the price below: create one with browser_create(proxy=premium), with the user's approval unless the connection allows it. It is a new browser: redo the steps, cookies do not carry over",
    "premium_price": {
      "datacenter_credits_per_gb": 2000,
      "residential_credits_per_gb": 16000,
      "residential_vs_datacenter": 8,
      "browser_credits_per_minute": 2
    }
  }
}

browser_navigate_back ​

No arguments. Goes back one page in the current tab and returns the status. Fails with invalid_argument when there's no previous page.

browser_tabs ​

ArgumentTypeDefaultDescription
actionstringrequiredlist, new, select or close.
indexintegerThe tab, for select and close. close without it closes the current tab.
urlstringThe URL to open, for new.

Returns tabs, each with its index, url, title, and current: true on the selected one. Tabs the page opens (a target=_blank link, window.open) appear in the list, and actions report them as new_tab. Snapshots and actions go to the selected tab.

json
{
  "tabs": [
    { "index": 0, "url": "https://httpbin.io/forms/post", "title": "httpbin.io/forms/post" },
    { "index": 1, "url": "https://example.com/", "title": "Example Domain", "current": true }
  ]
}

Reading the page ​

browser_snapshot ​

No arguments. The page URL and title, then the page's accessibility tree as YAML: each element's role and name, its state (checked, disabled, expanded, selected, required, heading level), field values, link targets, and a ref such as e12 (see step 3).

  • The tree comes from the browser's accessibility data: no script runs in the page.
  • Same-site iframes are included. Elements with no role and no text are left out.
  • A snapshot is cut at 100,000 characters.
  • Each snapshot replaces the refs of the previous one in that tab. An element keeps its ref while it stays on the page.

browser_take_screenshot ​

ArgumentTypeDefaultDescription
fullPagebooleanfalseThe whole page instead of the viewport.
refstringOnly this element, from the latest snapshot.
elementstringIts description.

Returns a JPEG at most 1280 px wide, and its size:

json
{ "width": 1280, "height": 729, "css_px_scale": 0.852 }

css_px_scale is the image's pixels per page pixel. With fullPage, the page is scrolled with the mouse wheel, as a reader would, captured part by part, then scrolled back; the image is cut at 8,000 px tall.

browser_wait_for ​

ArgumentTypeDefaultDescription
textstringWait for this text to appear.
textGonestringWait for this text to disappear.
timenumberSeconds, 30 at most. Alone, waits that long; with text or textGone, the time limit.

Returns the status once the text appears or goes, or waited_seconds with time alone. Fails with timeout when the text doesn't come, or go, in time.

Actions ​

Every action takes a ref from the latest snapshot of the current tab, and an element: a short description of it, which the agent writes for you to follow along. A ref from an older snapshot, or whose element left the page, fails with stale_ref:

BitFetcher replies, to a click with a ref from before the page changed
json
{
  "error": "stale_ref",
  "message": "ref e1 is not in the latest snapshot of this tab (the page changed or another snapshot was taken): take a new snapshot with browser_snapshot"
}

Actions return the status, not a snapshot: the agent takes a new snapshot to see the result.

browser_click ​

ArgumentTypeDefaultDescription
refstringrequiredThe element.
elementstringIts description.
doubleClickbooleanfalseDouble click.
buttonstringleftleft, right or middle.

Scrolls the element into view, moves the mouse to it and presses, with human timing. If another element covers it, the click lands on that element, as it would for a person, and the status says so in warning. An element with no box on the page (hidden, zero size) fails with not_visible.

browser_type ​

ArgumentTypeDefaultDescription
refstringrequiredThe field.
textstringrequiredThe text. It replaces what the field holds.
elementstringIts description.
submitbooleanfalsePress Enter after typing.
slowlybooleanfalseAccepted for compatibility with Playwright MCP: typing is always key by key.

Clicks the field to focus it, clears it, and types key by key; it never sets the field's value from a script. Characters a US keyboard doesn't have are entered as text input, as an input method would.

browser_press_key ​

ArgumentTypeDefaultDescription
keystringrequiredA key name or character: Enter, ArrowLeft, a, or a combination such as Control+a, Shift+Tab.

Presses the key in the current tab, on whatever has the focus.

browser_scroll ​

ArgumentTypeDefaultDescription
directionstringdowndown, up, left or right.
amountnumber600Pixels.
refstringScroll until this element is in view, instead of by an amount.
elementstringIts description.

Scrolls with the mouse wheel. Returns url, title, and the scroll position as scroll_x and scroll_y.

browser_select_option ​

ArgumentTypeDefaultDescription
refstringrequiredThe <select>.
valuesstring[]requiredThe option, by value or visible text. One value: multiple selects aren't supported yet.
elementstringIts description.

Opens the select with a click and picks the option with the arrow keys and Enter, as a person would, so the page sees real input and change events. For a custom dropdown built from other elements, the agent clicks it, takes a snapshot and clicks the option.

browser_evaluate ​

ArgumentTypeDefaultDescription
functionstringrequiredA JavaScript function, () => …, or (element) => … with ref.
refstringAn element to pass to the function.
elementstringIts description.

Returns the function's result as JSON, under 100,000 bytes:

Agent calls browser_evaluate
json
{ "function": "() => document.querySelector('input[name=custname]').value" }
BitFetcher replies
json
"Ada Lovelace"

The function runs in an isolated world: it sees and can change the DOM, but not the page's own JavaScript variables, and the page can't see it. If it throws, the call fails with invalid_argument and the error.

Status ​

Navigation and actions return this short reply instead of a snapshot:

FieldWhen
url, titleAlways.
statusThe page's HTTP status, after a navigation.
loadingThe page was still loading when the tool returned.
new_tabThe page opened a tab: its index and url.
dialogA dialog opened: its type, message, and the action taken. Alerts and "leave this page?" dialogs are accepted; confirm and prompt dialogs are dismissed.
warningSomething to know about the action, for example the click landed on a covering element.
blockedThe page is a bot-protection block or challenge: vendor (cloudflare, datadome, akamai or perimeterx; absent for a plain 401, 403 or 429), status, advice for the agent, and on datacenter, premium_price (see browser_navigate).

When the balance is low, every reply also carries a low balance warning. Error codes are listed in Costs and limits.

How the browser is driven ​

The tools are built so that a site sees a person using a browser, not an agent:

  • Real input. Clicks are mouse moves and presses at the element's position, typing is key events, and our browser adds human timing to both.
  • Nothing in the page. Snapshots read the browser's accessibility data and browser_evaluate runs in an isolated world, so no script or global variable of ours appears in the page.
  • One identity. The viewport, screen and device are the identity's own, never emulated.

Not available yet: file upload and download, answering dialogs, drag and drop, PDF, and request interception.