Skip to main content
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.

概述

AgentQLLoader 需要以下两个参数: 以下参数为可选设置:
  • 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 to 900.
  • 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 to False.
  • wait_for: The number of seconds to wait for the page to load before extracting data. Defaults to 0.
  • is_scroll_to_bottom_enabled: Whether to scroll to bottom of the page before extracting data. Defaults to False.
  • 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 to False.
AgentQLLoader is implemented with AgentQL’s REST API

集成详情

加载器特性

设置

要使用 AgentQL Document Loader,你需要configure the AGENTQL_API_KEY environment variable, or use the api_key parameter. You can acquire an API key from our Dev Portal.

安装

安装 langchain-agentql

设置凭证

初始化

接下来实例化你的模型对象:

加载

惰性加载

AgentQLLoader currently only loads one Document at a time. Therefore, load() and lazy_load() behave the same:

API 参考

有关如何使用此集成的更多信息,请参阅 git repo or the langchain integration documentation