Programa de referidos →
InicioGlosarioNavegador headless
Glosario

Navegador headless

Un navegador web completo que se ejecuta sin interfaz gráfica, controlado por código para cargar, renderizar e interactuar con páginas.

Un navegador headless es un navegador completo -normalmente Chrome o Firefox- que se ejecuta sin una ventana visible, controlado de forma programática. Carga páginas, ejecuta JavaScript y renderiza el DOM exactamente como lo haría un navegador normal, pero bajo el control de un script. Playwright, Puppeteer y Selenium son las herramientas comunes para controlarlos.

Los navegadores headless existen para hacer scraping de sitios modernos que construyen su contenido con JavaScript. Una simple solicitud HTTP devuelve el HTML inicial, que para muchas aplicaciones de una sola página está casi vacío - los datos reales se cargan después mediante JavaScript. Un navegador headless ejecuta ese JavaScript, así que puedes extraer la página completamente renderizada en lugar de una cáscara vacía.

La contrapartida es el coste y la detectabilidad. Renderizar una página completa usa mucha más CPU, memoria y ancho de banda que una simple solicitud HTTP, así que el scraping headless es más lento y caro a escala. Los navegadores headless también llevan huellas de automatización (banderas navigator.webdriver, renderizadores WebGL inusuales) que los sistemas antibot buscan específicamente.

Usa un navegador headless cuando el objetivo realmente requiera renderizado de JavaScript, y combínalo con proxies residenciales y refuerzo de huella para que parezca el navegador de un usuario real. Para HTML estático o APIs disponibles, las simples solicitudes HTTP son dramáticamente más rápidas y deberían preferirse.

A real browser with no window

A headless browser is a normal browser engine running without a visible interface, driven by code through Playwright, Puppeteer or Selenium. It executes JavaScript, renders pages and holds cookies exactly as the visible version does.

That makes it the tool for sites that build their content in the browser rather than on the server. An HTTP client fetching such a page receives a shell with no data in it.

The cost is traffic and time. A headless browser downloads scripts, styles, fonts and images unless told otherwise, so a page that would be 80 KB as HTML becomes several hundred kilobytes, which matters directly on metered proxies.

Headless mode also used to be detectable through obvious signals. Modern versions are much closer to the visible browser, but automation frameworks still leave traces that dedicated defences look for.

Running one through our proxies

Per-context proxies are the feature worth having, because they let one browser hold several identities:

Playwright with a proxy per context

ctx = browser.new_context(
    proxy={
        "server": "http://proxy.sotaproxy.com:10000",
        "username": "login_c_US_s_7_ttl_1h",
        "password": "password",
    },
    locale="en-US", timezone_id="America/New_York",
)
  • Block images, media and fonts through request routing. On residential this cuts the bill several times over.
  • Use a sticky session for the life of the context. A rotation mid-page loads half the assets from another address.
  • Match locale and timezone to the proxy country, or the address and the browser will contradict each other.
  • For account work prefer an antidetect browser over raw headless automation: it adds fingerprint and storage isolation you would otherwise build yourself.

Headless misconceptions

Headless is not required for most scraping

If the data is in the HTML or an API, an HTTP client is faster and much cheaper.

It does not hide automation by itself

Framework traces remain, and defences look for them specifically.

Traffic is not comparable to curl

A rendered page can be five times the bytes of its HTML.

A proxy does not fix detection

The address and the browser are separate signals and both are checked.

¿Listo para usar navegador headless?

SotaProxy te da acceso a proxies residenciales rotativos, móviles, de centro de datos e ISP. Sin compromiso mínimo.

Empezar