# Wait

Source: https://docs.scrappey.com/docs/wait

> Pause the execution of browser actions for a specified amount of time — useful for waiting for dynamic content, animations, or cooldowns.

## Command

`"wait"`

This action delays further execution for a defined number of seconds, giving the page time to load or content to render.

## Parameters

| Parameter      | Type    | Required | Description                                                                          |
| -------------- | ------- | -------- | ------------------------------------------------------------------------------------ |
| `wait`         | number  | Yes      | Number of seconds to pause execution.                                                |
| `when`         | string  | No       | Define whether the wait happens `beforeload` or `afterload`. Default is `afterload`. |
| `ignoreErrors` | boolean | No       | Set to `true` to suppress any error if the wait fails and continue execution.        |

## Example

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "browserActions": [
      {
        "type": "wait",
        "wait": 5
      }
    ]
  }'
```

## Notes

* Give the page time to fully load before interacting with elements.
* Wait for popups or animations to finish before scraping.
* Introduce realistic pauses between actions to simulate human behavior.
* Combine with `click`, `scroll`, or `solve_captcha` to ensure smooth flow.
* Use `when: "beforeload"` if you need to delay before the page begins loading.
