JavaScript Examples Scripts
Close a cookie dialog
Close a site's dialog for rejecting/accepting cookies with AgentQL.
Close popup windows
Close modals like promotional forms and banners with AgentQL.
Collect paginated bookstore listing data
Collect paginated bookstore listing data with AgentQL.
Collect paginated data from HackerNews
Collect paginated data from HackerNews with AgentQL.
Collect pricing data from e-commerce websites
Collect pricing data from an e-commerce website using AgentQL.
Interact with YouTube and extract video information
Interact with YouTube website and extract video information using AgentQL.
Compare product price across multiple websites
Compare product prices across websites with query_data() method with AgentQL.
Collect pricing data from e-commerce websites
Collect pricing data from an e-commerce website using AgentQL.
Get single element by prompt
Use AgentQL's get_by_prompt method to retrieve an element and interact with it.
Use humanlike mouse movement to avoid antibot
Use humanlike mouse movement to avoid antibot when using AgentQL.
Scroll to load more content
How to load additional content on pages that load content based on scroll position (aka 'infinite scroll').
Query a list of items
How to query a list of items on the page with AgentQL.
Login to sites with AgentQL
Use AgentQL to interact with login forms and log into websites.
Query a list of items
How to query a list of items on the page with AgentQL.
Perform sentiment analysis
Perform sentiment analysis on YouTube comments with AgentQL and OpenAI's GPT-3.5 model.
Perform sentiment analysis
Perform sentiment analysis on YouTube comments with AgentQL and OpenAI's GPT-3.5 model.
Run a script in headless browser
Run the script in headless browser with AgentQL.
Save and load authenticated state
Save and load an authenticated state (i.e. signed-in state) with AgentQL.
Run script in a stealth mode
How to apply different techniques to lower the risk of being detected by an anti-bot system.
Submit form
Submit form with AgentQL.
Use existing browser with AgentQL
If you don't want to use Playwright's default browser, you can bring your own.
Use remote browser for AgentQL queries
Browser is hosted remotely - you connect to it over CDP.
Wait for page to load
Wait for the page to load completely before querying the page with AgentQL.
Get an element's XPath
Get XPath of an element that was fetched with AgentQL.