> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/documentation/es/empezar/inicio-rapido-headless-browser.md).

# Inicio rápido: Headless Browser

{% hint style="success" %}
¿Ya conoces lo básico? Consulta la [documentación de Headless Browser](/products/es/headless-browser.md).
{% endhint %}

Oxylabs [Headless Browser](https://oxylabs.io/products/headless-browser) es una infraestructura de navegador alojada en la nube que gestiona automáticamente los sistemas de control del tráfico de bots, los CAPTCHAs y la rotación de proxies. Es totalmente compatible con Playwright, Puppeteer y el Model Context Protocol (MCP) para aplicaciones de IA.

{% stepper %}
{% step %}

### Configuración y credenciales

1. **Crea una cuenta:** Regístrate en el [Dashboard de Oxylabs](https://dashboard.oxylabs.io/).
2. **Elige un plan:** Selecciona un plan o una prueba gratuita en Scraping Solutions → Headless Browser.
3. **Crea credenciales de usuario:** Ve a la pestaña Users en la sección de producto Headless Browser y crea un nombre de usuario y una contraseña (Estas credenciales se usan para la autenticación WebSocket Secure).
   {% endstep %}

{% step %}

### Tu primera solicitud

Oxylabs Headless Browser usa el Chrome DevTools Protocol (CDP). Puedes conectarte a él usando Playwright o Puppeteer sin gestionar binarios locales del navegador.

**Ejemplo de Python + Playwright:**

1. Instala Playwright: `pip install playwright`
2. Ejecuta el siguiente script (reemplaza `USERNAME` y `PASSWORD` con tus credenciales):

```python
from playwright.sync_api import sync_playwright

username = "USERNAME"
password = "PASSWORD"
endpoint = "ubc.oxylabs.io"
browser_url = f"wss://{username}:{password}@{endpoint}"

with sync_playwright() as p:
    # Connect to the remote Oxylabs browser
    browser = p.chromium.connect_over_cdp(browser_url)
    page = browser.new_page()
    
    page.goto('https://oxylabs.io/')
    print(f"Page Title: {page.title()}")
    
    browser.close()
```

{% endstep %}
{% endstepper %}

### Personalizar el navegador

También puedes pasar instrucciones directamente a través de la URL de conexión usando parámetros de consulta:

<table><thead><tr><th width="138.5">Parámetro</th><th width="172">Ejemplo</th><th>Descripción</th></tr></thead><tbody><tr><td><code>p_cc</code></td><td><code>?p_cc=US</code></td><td>Rutea el tráfico del navegador a través de un país específico.</td></tr><tr><td><code>p_device</code></td><td><code>?p_device=mobile</code></td><td>Emula un tipo de dispositivo específico.</td></tr><tr><td><code>session_name</code></td><td><code>?session_name=ses-1</code></td><td>Crea una sesión persistente para mantener tu instancia remota del navegador en la nube.</td></tr></tbody></table>

Encuentra más opciones de personalización en Headless Browser [documentación](/products/es/headless-browser.md#features).

### Siguientes pasos

* **¿Quieres monitorizar tu navegador?** Aprende sobre la [Session Inspection Tool](/products/es/headless-browser/inspeccion-y-grabacion-de-sesiones.md) para seguir visualmente las interacciones de tu script con el navegador en tiempo real.
* **¿Tu script es demasiado lento?** Prueba [Optimización del tráfico](/products/es/headless-browser.md#recommended-setup) para bloquear la carga de recursos innecesarios. Esto aumentará la velocidad de scraping y reducirá el consumo de ancho de banda.
* **¿Encuentras errores o tiempos de espera?** Visita la [Guía de solución de problemas](/products/es/headless-browser/troubleshooting-guide.md) para resolver problemas comunes de conexión con CDP, discrepancias de versiones de bibliotecas y tiempos de espera de ejecución.
* **¿Te aparece un "403 Forbidden" en un sitio importante?** Consulta la [Restricted Targets](/products/es/headless-browser/restricted-targets.md) lista para ver qué sitios web o servicios tienen acceso restringido para Headless Browser.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/documentation/es/empezar/inicio-rapido-headless-browser.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
