# AgentQL

AI-powered semantic query language for web scraping and automation

AgentQL uses natural language queries to locate web elements and extract structured data without brittle CSS selectors or XPath.

## Overview

- **Website**: https://agentql.com
- **Docs**: https://docs.agentql.com
- **GitHub**: https://github.com/tinyfish-io/agentql
- **License / Pricing**: Freemium
- **Directory Entry**: https://agentaccess.dk/enablers/agentql

## About

AgentQL eliminates the main failure point of web scrapers: fragile CSS and XPath selectors that break when sites change. By querying elements with semantic descriptions (e.g. `{ company_name, cvr_number, vat_status }`), AgentQL automatically resolves the correct DOM nodes even across UI redesigns.

## Key Features

- Natural language element targeting (no CSS/XPath needed)
- Self-healing against website UI and DOM updates
- Drop-in Playwright extension with Python and TypeScript SDKs
- AgentQL MCP server for interactive agent browser control

## Danish System Application Recipes

### Scrape Danish E-Commerce Prices Resilient to Redesigns
Use AgentQL semantic queries on Danish retail portals to extract price, stock, and SKU details without maintaining custom selectors.

## Quickstart

```typescript
import { wrap } from 'agentql'
import { chromium } from 'playwright'

const browser = await chromium.launch()
const page = await wrap(await browser.newPage())
await page.goto('https://www.cvr.dk')

const QUERY = `{
  search_input
  search_button
}`
const response = await page.queryElements(QUERY)
await response.search_input.type('Novo Nordisk')
await response.search_button.click()
```

---
Source: [AgentAccess Enablers](https://agentaccess.dk/enablers/agentql)