Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ AgentQL is a suite of tools for extracting data and automating workflows on live
| Compare Product Prices | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/compare_product_prices) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/compare_product_prices) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/compare-product-prices) |
| Get Element by Prompt | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/get_by_prompt) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/get-by-prompt) |
| Infinite Scroll | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/infinite_scroll) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/infinite_scroll) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/infinite-scroll) |
| Use External Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_external_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-external-browser) |
| Use Remote Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_remote_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-remote-browser) |
| Use Existing Browser | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/use_existing_browser) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/use-existing-browser) |
| Query List Items | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/list_query_usage) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/list-query-usage) |
| Site Login | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/python/log_into_sites) / [Colab](https://github.com/tinyfish-io/agentql/tree/main/examples/googlecolab/log_into_sites) | [Script](https://github.com/tinyfish-io/agentql/tree/main/examples/js/log-into-sites) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Use external browser for AgentQL queries
title: Use remote browser for AgentQL queries
description: Browser is hosted remotely - you connect to it over CDP.
updated: 2025-06-24
---

# Example script: Use external browser with AgentQL
# Example script: Use remote browser with AgentQL

This example demonstrates how to use external browser with AgentQL.
This example demonstrates how to use remote browser with AgentQL.

## Run the script

Expand All @@ -18,7 +18,7 @@ This example demonstrates how to use external browser with AgentQL.
node main.js
```

Script will take care of allocating AgentQL External Browser, connecting to it and running the AgentQL query.
Script will take care of allocating AgentQL Remote Browser, connecting to it and running the AgentQL query.

## Play with the query

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This example demonstrates how to interact with an external browser with AgentQL.
* This example demonstrates how to interact with an remote browser with AgentQL.
*/
import { wrap } from 'agentql';
import { UserAgentPreset, createBrowserSession } from 'agentql/tools';
Expand Down Expand Up @@ -28,7 +28,7 @@ async function getRemoteBrowserUrl() {
return cdpUrl;
}

async function runInExternalBrowser() {
async function runInRemoteBrowser() {
// This function demonstrates how to open and interact with a new page using remote browser
const browserUrl = await getRemoteBrowserUrl();

Expand All @@ -55,4 +55,4 @@ async function runInExternalBrowser() {
await browser.close();
}

runInExternalBrowser().catch(console.error);
runInRemoteBrowser().catch(console.error);
4 changes: 2 additions & 2 deletions examples/python/use_existing_browser/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""This example demonstrates how to interact with an external or existing browser with AgentQL."""
"""This example demonstrates how to interact with an existing browser with AgentQL."""

import agentql
from playwright.sync_api import sync_playwright

# The URL of the external or existing browser you wish to connect.
# The URL of the existing browser you wish to connect.
WEBSOCKET_URL = "http://localhost:9222"

URL = "https://scrapeme.live/shop"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Use external browser with AgentQL
title: Use remote browser with AgentQL
description: Browser is hosted remotely - you connect to it over CDP.
updated: 2025-06-24
---

# Example script: Use external browser with AgentQL
# Example script: Use remote browser with AgentQL

This example demonstrates how to use external browser with AgentQL.
This example demonstrates how to use remote browser with AgentQL.

## Run the script

Expand All @@ -18,7 +18,7 @@ This example demonstrates how to use external browser with AgentQL.
python3 main.py
```

Script will take care of allocating AgentQL External Browser, connecting to it and running the AgentQL query.
Script will take care of allocating AgentQL Remote Browser, connecting to it and running the AgentQL query.

## Play with the query

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""This example demonstrates how to interact with an external browser with AgentQL."""
"""This example demonstrates how to interact with an remote browser with AgentQL."""

import asyncio

Expand Down Expand Up @@ -31,7 +31,7 @@ async def get_remote_browser_url() -> str:
return cdp_url


async def run_in_external_browser():
async def run_in_remote_browser():
"""This function demonstrates how to open and interact with a new page using remote browser."""
browser_url = await get_remote_browser_url()
async with async_playwright() as p:
Expand All @@ -58,4 +58,4 @@ async def run_in_external_browser():


if __name__ == "__main__":
asyncio.run(run_in_external_browser())
asyncio.run(run_in_remote_browser())