# Go To

Source: https://docs.scrappey.com/docs/go-to

> Navigate to a different page or route during your scraping flow — essential for multi-page interactions and workflows.

## Command

`"goto"`

This browser action navigates the browser to a new URL, just like a user would by clicking a link or entering a URL in the address bar.

## Parameters

| Parameter      | Type    | Required | Description                                                                                                                    |
| -------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `url`          | string  | Yes      | The target URL to visit. If the domain is different from the base request, make sure it is added to your `whitelistedDomains`. |
| `when`         | string  | No       | Lifecycle phase to run the action: `beforelaunch`, `beforeload`, `afterload`, or `after_captcha`. Default is `afterload`.       |
| `ignoreErrors` | boolean | No       | Set to `true` to continue execution even if the navigation fails.                                                              |

## 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": "goto",
        "url": "https://example.com/page"
      }
    ]
  }'
```

## Notes

Use case ideas:

* Navigate to a form or detail page before scraping fields.
* Handle multi-step flows by jumping between URLs.
* Move to a CAPTCHA or verification page before solving.

Tips:

* Always ensure the target domain is whitelisted in your request settings (`whitelistedDomains`).
* Use with `wait_for_selector` or `solve_captcha` to ensure the next step happens after the page is fully loaded.
* Combine with `if` or `while` for conditional navigation logic.
