HomeGlossaryHeadless browser

What is a headless browser?

A headless browser is a real browser engine without a visible window, used to load pages and run page scripts for automation and scraping.

A headless browser is a full browser engine that runs without showing a window on screen. Programs drive it through an API: open a page, wait for selectors, click, type, take a screenshot, or read the DOM. Chrome, Firefox, and WebKit all ship headless modes used in testing and automation.

Scrapers reach for headless browsers when a simple HTTP GET is not enough: content appears only after client-side rendering, or a flow needs clicks and form fills. The tradeoff is cost and complexity. A browser session uses more CPU, memory, and time than fetching HTML once. For agent workloads, that usually means higher per-page credits or minute-based billing.

Not every “web access for LLMs” job needs a headless browser. Public docs, blogs, and many marketing pages return useful HTML over a normal request. Starting with scrape-to-Markdown keeps latency and spend down. Escalate to browser automation when the page truly requires interaction.

Webcrawl exposes browser-style work through POST /v1/interact for jobs that need automation minutes, while POST /v1/scrape remains the default path for page-to-Markdown. CreditSchedule on /health lists interact pricing separately from scrape, crawl, and map so you can estimate before you build. Agents on MCP should prefer scrape or map tools first, then interact when the task genuinely needs a browser.

If you self-host or write your own stack, headless browsers also show up in end-to-end tests (Playwright, Puppeteer) unrelated to scraping. The same caution applies: use them when the fidelity is worth the overhead. For RAG ingestion and most agent research loops, Markdown from scrape or parse covers the common case.

When comparing vendors, ask whether browser rendering is optional, how it is billed, and whether MCP tools make the distinction obvious. Clear separation between fetch/scrape and interact keeps agents from burning browser minutes on static docs. Headless browsers shine in quality assurance and complex flows: checkout paths, multi-step forms, screenshots for visual review, and pages that only reveal content after authenticated navigation you control. They are heavier than HTML fetchers because they construct a document, run page scripts, download related assets, and maintain cookies and storage.

Cost models usually reflect that weight. Expect per-minute or per-session pricing rather than a flat “one credit per URL” when a real browser is involved. That is why Webcrawl lists interact separately from scrape in creditSchedule. An agent that opens a browser for every documentation glance will look slow and expensive next to an agent that scrapes Markdown first.

Engineering teams sometimes conflate “headless” with “undetectable.” Those are different problems. Headless means no visible UI. Site access policies, bot management, and terms of use are separate concerns you must respect. Build features that help users automate their own sites and public content they are allowed to read. Do not market scraping as a bypass product.

Practical guidance for AI stacks: default tools to scrape/search/map; expose interact only when the user asks for browser automation; set hard timeouts; capture traces for debugging. Pair with rate limiting so parallel agents cannot spawn unbounded browser fleets. When self-hosting, size CPU and memory for peak concurrent sessions, not for average scrape traffic.

Prefer scrape before interact

# Default: Markdown scrape
curl -s -X POST https://webcrawl.app/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/docs"}'

# Use /v1/interact when the job needs browser automation minutes

Related terms

Every page, one tool

Give your agent the web.

Start for free