Full definition
A headless browser is exactly what it sounds like: Chrome or Firefox launched in a mode where there's no visible window, but everything else — the JavaScript engine, the DOM, the network stack, even WebGL — runs identically to a real browser. You control it via a scripting library: Playwright (modern, cross-browser), Puppeteer (Chrome-focused), or Selenium (legacy, broad support).
Use a headless browser when: the site renders content via JavaScript after page load (most modern sites), you need to interact with the page (click buttons, fill forms, wait for elements), or you need true browser fingerprint authenticity that's impossible to fake from raw HTTP.
The cost: headless browsers are 10–50× slower and 100× more memory-hungry than raw HTTP. They also have detectable artifacts (`navigator.webdriver === true`, missing `chrome.runtime`, console traces) that anti-bot systems target. Stealth plugins (`puppeteer-extra-plugin-stealth`, `playwright-stealth`) patch these but they're a moving target.
Several providers ship hosted headless browsers as a service: Bright Data Scraping Browser, Browserless.io, ScrapingBee. You pay per session-second and skip the infrastructure headache.