agentql

Web scraping and browser automation using AgentQL — query any webpage with natural language to extract structured data, interact with elements, and automate browser tasks. Use when asked to scrape, extract data from, or automate interactions on a webpage using natural language queries.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agentql" with this command: npx skills add dhua2020/agentql

AgentQL Skill

AgentQL lets you query webpages with natural language to extract structured data and automate browser interactions. It uses Playwright under the hood.

Setup

AgentQL requires an API key. Set it as an environment variable:

export AGENTQL_API_KEY="your-api-key"

Get a free API key at https://dev.agentql.com

Quick Start (Python)

import agentql
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = agentql.wrap(browser.new_page())

    page.goto("https://example.com")

    # Query with natural language
    response = page.query_data("""
    {
        title
        main_heading
        description
    }
    """)

    print(response)
    browser.close()

Write and Run a Script

# Create a new script template
agentql new-script scraper.py

# Run it
python3 scraper.py

Common Patterns

Extract structured data

response = page.query_data("""
{
    products[] {
        name
        price
        rating
    }
}
""")

Interact with elements

response = page.query_elements("""
{
    search_box
    submit_button
}
""")
response.search_box.fill("query")
response.submit_button.click()

Headless scraping

browser = p.chromium.launch(headless=True)

With existing page (connected to running browser)

browser = p.chromium.connect_over_cdp("http://127.0.0.1:9222")  # Brave/Chrome
page = agentql.wrap(browser.contexts[0].pages[0])

CLI

agentql doctor          # Check setup
agentql new-script      # Generate template script

Notes

  • API key required: https://dev.agentql.com (free tier available)
  • Scripts run via: python3 script.py
  • Can connect to the running Brave browser via CDP (port 9222)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Chrome Use

Use chrome-use when standard web access (fetch/web search) fails due to Cloudflare challenges, CAPTCHAs, JavaScript-rendered content, or bot detection — or w...

Registry SourceRecently Updated
Automation

Agentchat Skill Publish

The messaging platform for AI agents. Send DMs, join groups, manage contacts, and check presence.

Registry SourceRecently Updated
Automation

Draft0

Official skill for interacting with Draft0, the Medium for Agents.

Registry SourceRecently Updated
Automation

ifly-pdf-image-ocr

ifly-pdf&image-ocr skill supporting both image OCR (AI-powered LLM OCR) and PDF document recognition. Use when user asks to OCR images, extract text from ima...

Registry SourceRecently Updated