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

# go_to_url

<Info>This function has multiple overloads</Info>

<Tabs>
  <Tab title="Without AI Loading Detection">
    Navigates to a specified URL with enhanced reliability features including automatic retries with exponential backoff,
    intelligent timeout handling, and optional AI-powered loading verification.

    This function handles common navigation challenges by automatically retrying failed requests, detecting navigation hangs, and ensuring the page reaches a truly idle state.

    ```python theme={null}
    async def go_to_url(
        page: Page,
        url: str,
        *,
        timeout_s: int,
        retries: int,
        wait_for_load_state: str,
        throw_on_timeout: bool,
        wait_for_load_using_ai: Literal[False],
    ) -> None
    ```

    Use this overload for standard navigation without AI-powered loading detection.

    ## Examples

    <CodeGroup>
      ```python Without options theme={null}
      from typing import TypedDict
      from playwright.async_api import Page
      from intuned_browser import go_to_url
      class Params(TypedDict):
          pass
      async def automation(page: Page, params: Params, **_kwargs):
          await go_to_url(
              page,
              url='https://sandbox.intuned.dev/'
          )
          # At this point, go_to_url has waited for the page to be loaded and the network requests to be settled.
      ```

      ```python With options theme={null}
      from typing import TypedDict
      from playwright.async_api import Page
      from intuned_browser import go_to_url
      class Params(TypedDict):
          pass
      async def automation(page: Page, params: Params, **_kwargs):
          await go_to_url(
              page,
              url='https://intunedhq.com',
              wait_for_load_state="domcontentloaded",  # Faster than "load" state. The function automatically waits for the page to settle.
              throw_on_timeout=True,
              timeout_s=10,
              retries=3
          )
          # At this point, DOM content is loaded and go_to_url has waited for network requests to settle.
      ```
    </CodeGroup>

    ## Arguments

    <ResponseField name="page" type="Page" required>
      The Playwright Page object to navigate.
    </ResponseField>

    <ResponseField name="url" type="str" required>
      The URL to navigate to.
    </ResponseField>

    <ResponseField name="timeout_s" type="int">
      Maximum navigation time in seconds. Defaults to 30.
    </ResponseField>

    <ResponseField name="retries" type="int">
      Number of retry attempts with exponential backoff (factor: 2). Defaults to 3.
    </ResponseField>

    <ResponseField name="wait_for_load_state" type="Literal['load', 'domcontentloaded', 'networkidle', 'commit']">
      When to consider navigation succeeded. Defaults to "load".
    </ResponseField>

    <ResponseField name="throw_on_timeout" type="bool">
      Whether to raise an error on navigation timeout. When False, the function returns without throwing, allowing continued execution. Defaults to False.
    </ResponseField>

    <ResponseField name="wait_for_load_using_ai" type="bool">
      Set to False to disable AI-powered loading checks. Defaults to False.
    </ResponseField>
  </Tab>

  <Tab title="With AI Loading Detection">
    Navigates to a specified URL with enhanced reliability features including automatic retries with exponential backoff,
    intelligent timeout handling, and optional AI-powered loading verification.

    This function handles common navigation challenges by automatically retrying failed requests, detecting navigation hangs, and ensuring the page reaches a truly idle state.

    ```python theme={null}
    async def go_to_url(
        page: Page,
        url: str,
        *,
        timeout_s: int,
        retries: int,
        wait_for_load_state: str,
        throw_on_timeout: bool,
        wait_for_load_using_ai: Literal[True],
        model: str | None,
        api_key: str | None,
    ) -> None
    ```

    Use this overload when you need AI vision to verify the page is fully loaded by checking for loading spinners, blank content, or incomplete states.

    ## Examples

    <CodeGroup>
      ```python With AI Loading Detection theme={null}
      from typing import TypedDict
      from playwright.async_api import Page
      from intuned_browser import go_to_url
      class Params(TypedDict):
          pass
      async def automation(page: Page, params: Params, **_kwargs):
          await go_to_url(
              page,
              url='https://intunedhq.com',
              wait_for_load_using_ai=True,
              model="gpt-4o"
          )
          # The page is loaded and ready to use.
          # If the AI check fails, the method won't throw even if throw_on_timeout is true.
          # It only throws if the page times out reaching the default load state and throw_on_timeout is true.
      ```
    </CodeGroup>

    ## Arguments

    <ResponseField name="page" type="Page" required>
      The Playwright Page object to navigate.
    </ResponseField>

    <ResponseField name="url" type="str" required>
      The URL to navigate to.
    </ResponseField>

    <ResponseField name="timeout_s" type="int">
      Maximum navigation time in seconds. Defaults to 30.
    </ResponseField>

    <ResponseField name="retries" type="int">
      Number of retry attempts with exponential backoff (factor: 2). Defaults to 3.
    </ResponseField>

    <ResponseField name="wait_for_load_state" type="Literal['load', 'domcontentloaded', 'networkidle', 'commit']">
      When to consider navigation succeeded. Defaults to "load".
    </ResponseField>

    <ResponseField name="throw_on_timeout" type="bool">
      Whether to raise an error on navigation timeout. When False, the function returns without throwing, allowing continued execution. Defaults to False.
    </ResponseField>

    <ResponseField name="wait_for_load_using_ai" type="Literal[True]" required>
      Must be set to True to use this AI-powered overload. When true, uses AI vision to verify the page is fully loaded by checking for loading spinners, blank content, or incomplete states. Retries up to 3 times with 5-second delays. Check [is\_page\_loaded](../../ai/functions/is_page_loaded) for more details on the AI loading verification.
    </ResponseField>

    <ResponseField name="model" type="str">
      AI model to use for loading verification. Defaults to "gpt-5-mini-2025-08-07".
    </ResponseField>

    <ResponseField name="api_key" type="str">
      Optional API key for the AI check. Defaults to None.
    </ResponseField>
  </Tab>
</Tabs>

## Returns: `None`

Function completes when navigation is finished or fails after retries.
