> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rustybrowser.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wait For Node

> Wait until a DOM element appears on the page

## Description

Blocks until a DOM element matching the given CSS selector appears on the page, or until the timeout is reached. Useful after navigation or dynamic content loads.

## Authentication

Open-source deployments do not require authentication by default. If your server config enables `X-API-Key`, include that header with the request.

## Path Parameters

<ParamField path="id" type="string" required>
  The browser ID returned from Create Session.
</ParamField>

## Request Body

<ParamField body="selector" type="string" required>
  CSS selector for the element to wait for.
</ParamField>

<ParamField body="timeout_ms" type="integer">
  Maximum time to wait in milliseconds. Defaults to `5000`.
</ParamField>

## Response

<ResponseField name="node_id" type="integer">
  The node ID of the matched element once it appears.
</ResponseField>

## Example

```bash theme={null}
curl -X POST http://localhost:8080/browsers/exc-b9534e98-c3ce-4d1b-9671-b563ac66adc3/wait-for-node/ \
  -H "Content-Type: application/json" \
  -d '{ "selector": "#example", "timeout_ms": 5000 }'
```
