Guide · November 26, 2026

Web browsing API for LLMs: fetch, headless browser or agent browser?

Three ways to give ChatGPT, Claude or any LLM access to the web through an API, compared by speed, token cost and what each can and cannot do.

An LLM cannot reach the web by itself. Something has to fetch pages for it. If you are adding web access to an agent, whether it runs on Claude, GPT, Gemini or an open model, you will choose between three kinds of API.

1. A plain fetch

The simplest option is a function that downloads a URL and returns the body. You can write it in ten lines.

It works until you look at what comes back. A modern page is mostly scripts, styles and markup. The model reads all of it and pays for all of it, and it still only sees one page. To find the page it needs, it follows links one at a time, and every hop is a full model turn.

Good for: a known URL with clean content. Weak at: anything that involves finding the right page.

2. A headless browser

The opposite extreme is a real browser running on a server, controlled through an API. The agent can click, type and scroll, so it can use any site a person can, including apps that render everything with JavaScript.

The cost is time. Each action is a round trip through a browser, and the agent usually needs several to get anywhere. It is the right tool when the task is to do something on a site.

Good for: logging in, forms, web apps, checkout flows. Weak at: reading a lot of pages quickly and cheaply.

3. An agent browser

The third kind is built around what agents do most, which is read. It keeps the speed of a fetch and removes its two problems:

  • Pages come back as compact markdown, not HTML, so the model reads content and not markup.
  • The first response includes a map of the site, so the model can pick the right pages immediately and read them in one parallel call.

ompro is this kind. Its API has four calls: open for a page plus the site map, read for many pages at once, find for the passages that answer a question, and map to search a site's pages.

Good for: documentation, research, reference and fact checking. Weak at: anything that needs a click.

How to choose

Ask what the agent is doing on the web.

  • It needs one page whose address you already know: a fetch is enough.
  • It needs to find and read information on websites: use an agent browser.
  • It needs to operate a site: use a headless browser.

Many products end up with two of the three. Reading through an agent browser and acting through a headless browser keeps the common case fast and the rare case possible.

Connecting it to your model

All three plug into a model the same way, as tools. You describe the function to the model, the model asks to call it, your code runs it and returns the result.

With ompro you can skip writing the tool definitions. It is available as an MCP server, so any MCP client can use it by adding one URL, and as plain HTTP endpoints for everything else. The documentation has copyable examples for both, and the playground lets you watch an agent use it with your own model key.

All posts

Give your agent a browser.

Hand it this prompt, or call the API yourself.

Prompt
Give yourself a browser by adding the MCP server at  and call open on any link to see the page and the whole site index.