AgentQL’s document loader provides structured data extraction from any web page using an AgentQL query. AgentQL can be used across multiple languages and web pages without breaking over time and change.Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-mdrxyo-1777658790-7be347c.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
AgentQLLoader requires the following two parameters:
url: The URL of the web page you want to extract data from.query: The AgentQL query to execute. Learn more about how to write an AgentQL query in the docs or test one out in the AgentQL Playground.
api_key: Your AgentQL API key from dev.agentql.com.Optional.timeout: The number of seconds to wait for a request before timing out. Defaults to900.is_stealth_mode_enabled: Whether to enable experimental anti-bot evasion strategies. This feature may not work for all websites at all times. Data extraction may take longer to complete with this mode enabled. Defaults toFalse.wait_for: The number of seconds to wait for the page to load before extracting data. Defaults to0.is_scroll_to_bottom_enabled: Whether to scroll to bottom of the page before extracting data. Defaults toFalse.mode:"standard"uses deep data analysis, while"fast"trades some depth of analysis for speed and is adequate for most usecases. Learn more about the modes in this guide. Defaults to"fast".is_screenshot_enabled: Whether to take a screenshot before extracting data. Returned in ‘metadata’ as a Base64 string. Defaults toFalse.
Integration details
| Class | Package | Local | Serializable | JS support |
|---|---|---|---|---|
AgentQLLoader | langchain-agentql | ✅ | ❌ | ❌ |
Loader features
| Source | Document Lazy Loading | Native Async Support |
|---|---|---|
AgentQLLoader | ✅ | ❌ |
Setup
To use the AgentQL Document Loader, you will need to configure theAGENTQL_API_KEY environment variable, or use the api_key parameter. You can acquire an API key from our Dev Portal.
Installation
Install langchain-agentql.Set credentials
Initialization
Next instantiate your model object:Load
Lazy load
AgentQLLoader currently only loads one Document at a time. Therefore, load() and lazy_load() behave the same:
API reference
For more information on how to use this integration, please refer to the git repo or the langchain integration documentationConnect these docs to Claude, VSCode, and more via MCP for real-time answers.

