Menu

Glossary

What is headless browser scraping?

Headless browser scraping loads a page in a real browser with no visible window, runs its JavaScript, and then extracts the rendered content.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

Headless browser scraping uses a real web browser running without a visible window, controlled by a program through a browser automation library, to load a page, execute its JavaScript, and then extract the fully rendered content. It is needed for sites that build their pages in the browser, where a plain HTTP request returns an empty shell.

Why a plain HTTP request sometimes isn't enough

A simple scraper sends an HTTP GET and parses the HTML that comes back. That works for pages rendered on the server. But many modern sites are single-page applications: they send a nearly empty HTML document plus a bundle of JavaScript, and the content only exists after that JavaScript runs. Fetch such a page without a browser and you get an empty container element and a loading indicator.

A headless browser closes that gap. It is a full browser engine that runs without drawing to a screen, driven by an automation protocol. It executes scripts, makes the page's own API calls, waits for content to appear, and can click, scroll and fill in forms. Everything a person's browser does, it does under program control.

The trade-offs

Rendering is powerful but expensive, which is why it is not the default everywhere:

The usual engineering answer is selective rendering: try the cheap static fetch first, and fall back to a browser only when the page needs it.

Headless browsers in AI data pipelines

For LLM workloads, rendering is a means and not the end. The rendered page still has to be cleaned and converted before a model can use it, as covered in what a web scraping API does and HTML to markdown conversion. Managed extraction services bundle the whole chain, so that rendering becomes an option on a request instead of infrastructure you run.

Many questions do not need a browser at all. If what you need is to find pages and read a passage from each, a web search API answers from an index that was built ahead of time.

Where MillionShort fits

MillionShort does not offer a headless browser or browser automation. A search returns results with text snippets, and your code never loads a page. When you need one page's text, Extract turns a URL into clean text; its rendered mode loads the page in a browser first, so content built by scripts appears.

This page as Markdown ยท llms.txt