LLM Chat Scraper OpenClaw Skill
Use this skill to scrape AI chat conversations from various LLM models via the Scrapeless API. The skill supports ChatGPT, Gemini, Perplexity, Copilot, Google AI Mode, and Grok.
Authentication: Set X_API_TOKEN in your environment or in a .env file in the repo root.
Errors: On failure the script writes a JSON error to stderr and exits with code 1.
Tools
1. ChatGPT Scraper
Scrape ChatGPT responses with optional web search enrichment. Returns JSON object with result_text, model, links, citations, and more.
Command:
CODEBLOCK0
Examples:
python3 scripts/llm_chat_scraper.py chatgpt --query "Most reliable proxy service for data extraction"
python3 s
Optional: `--country` fcripts/llm_chat_scraper.py chatgpt --query "AI trends in 2024" --web-search
python3 scripts/llm_chat_scraper.py chatgpt --query "Best programming languages" --country GB
or location,
--web-search to enable web search.
2. Gemini Scraper
Scrape Google Gemini responses. Returns JSON object with result_text, citations, and more.
Command:
CODEBLOCK2
Examples:
CODEBLOCK3
Optional: --country for location (JP and TW not supported).
3. Perplexity Scraper
Scrape Perplexity AI responses with optional web search. Returns JSON object with result_text, related_prompt, web_results, media_items.
Command:
CODEBLOCK4
Examples:
CODEBLOCK5
Optional: --country for location, --web-search to enable web search.
4. Copilot Scraper
Scrape Microsoft Copilot responses across different modes (search, smart, chat, reasoning, study). Returns JSON object with result_text, mode, links, citations.
Command:
CODEBLOCK6
Examples:
CODEBLOCK7
Optional: --country for location (JP and TW not supported), --mode for operation mode.
5. Google AI Mode Scraper
Scrape Google AI Mode responses. Returns JSON object with result_text, result_md, result_html, citations, raw_url.
Command:
CODEBLOCK8
Examples:
CODEBLOCK9
Optional: --country for location (JP and TW not supported).
6. Grok Scraper
Scrape xAI Grok responses with different modes (FAST, EXPERT, AUTO). Returns JSON object with full_response, user_model, follow_up_suggestions, web_search_results.
Command:
CODEBLOCK10
Examples:
CODEBLOCK11
Optional: --country for location (JP and TW not supported), --mode for operation mode.
Summary
| Action | Command | Argument | Example |
|---|
| ChatGPT | INLINECODE34 | INLINECODE35 | INLINECODE36 |
| Gemini |
gemini |
--query |
python3 scripts/llm_chat_scraper.py gemini --query "Best restaurants" |
| Perplexity |
perplexity |
--query |
python3 scripts/llm_chat_scraper.py perplexity --query "Latest news" |
| Copilot |
copilot |
--query |
python3 scripts/llm_chat_scraper.py copilot --query "Explain ML" |
| Google AI Mode |
aimode |
--query |
python3 scripts/llm_chat_scraper.py aimode --query "Programming" |
| Grok |
grok |
--query |
python3 scripts/llm_chat_scraper.py grok --query "Quantum physics" |
Output: All commands return JSON objects with model-specific fields (see tool descriptions above).
Response Fields by Model
ChatGPT
- -
result_text: Markdown response - INLINECODE53 : Model identifier (e.g., gpt-4)
- INLINECODE54 : Boolean indicating if search ran
- INLINECODE55 : Array of supplementary links
- INLINECODE56 : Array of content references
Gemini
- -
result_text: Markdown response - INLINECODE58 : Array with favicon, highlights, snippet, title, url, website_name
Perplexity
- -
result_text: Markdown response - INLINECODE60 : Array of related questions
- INLINECODE61 : Array with name, url, snippet
- INLINECODE62 : Array of media references
Copilot
- -
result_text: Markdown response - INLINECODE64 : Mode used (search/smart/chat/reasoning/study)
- INLINECODE65 : Array of outbound links
- INLINECODE66 : Array with title, url
Google AI Mode
- -
result_text: Answer body - INLINECODE68 : Markdown version
- INLINECODE69 : HTML version
- INLINECODE70 : Original URL
- INLINECODE71 : Array with snippet, thumbnail, title, url, website_name, favicon
Grok
- -
full_response: Response content - INLINECODE73 : Model used
- INLINECODE74 : Array of suggested questions
- INLINECODE75 : Array with preview, title, url
- INLINECODE76 : Object with conversation metadata
Notes
⚠️ Regional Restrictions:
- - Gemini, Copilot, Google AI Mode, and Grok do not support Japan (JP) and Taiwan (TW)
⚠️ Result Expiry:
- - Task results are available for 12 hours
⚠️ Rate Limits:
- - 429 errors indicate rate limit exceeded. Reduce request frequency or upgrade plan.
LLM Chat Scraper OpenClaw 技能
使用此技能通过 Scrapeless API 从各种 LLM 模型中抓取 AI 聊天对话。该技能支持 ChatGPT、Gemini、Perplexity、Copilot、Google AI Mode 和 Grok。
身份验证: 在环境变量或仓库根目录的 .env 文件中设置 XAPITOKEN。
错误处理: 失败时,脚本会将 JSON 错误写入 stderr 并以退出码 1 退出。
工具
1. ChatGPT 抓取器
抓取 ChatGPT 响应,可选网页搜索增强功能。返回包含 result_text、model、links、citations 等字段的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py chatgpt --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py chatgpt --query 最可靠的数据提取代理服务
python3 scripts/llmchatscraper.py chatgpt --query 2024年AI趋势 --web-search
python3 scripts/llmchatscraper.py chatgpt --query 最佳编程语言 --country GB
可选参数:--country 指定位置或地区,--web-search 启用网页搜索。
2. Gemini 抓取器
抓取 Google Gemini 响应。返回包含 result_text、citations 等字段的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py gemini --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py gemini --query 纽约推荐景点
python3 scripts/llmchatscraper.py gemini --query 东京最佳餐厅 --country JP
可选参数:--country 指定位置(不支持日本和台湾)。
3. Perplexity 抓取器
抓取 Perplexity AI 响应,可选网页搜索功能。返回包含 resulttext、relatedprompt、webresults、mediaitems 的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py perplexity --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py perplexity --query 最新AI发展
python3 scripts/llmchatscraper.py perplexity --query 量子计算详解 --web-search
可选参数:--country 指定位置,--web-search 启用网页搜索。
4. Copilot 抓取器
抓取 Microsoft Copilot 在不同模式(搜索、智能、聊天、推理、学习)下的响应。返回包含 result_text、mode、links、citations 的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py copilot --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py copilot --query 什么是机器学习?
python3 scripts/llmchatscraper.py copilot --query 解释区块链 --mode reasoning
python3 scripts/llmchatscraper.py copilot --query 2024年最佳笔记本电脑 --mode search
可选参数:--country 指定位置(不支持日本和台湾),--mode 指定操作模式。
5. Google AI Mode 抓取器
抓取 Google AI Mode 响应。返回包含 resulttext、resultmd、resulthtml、citations、rawurl 的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py aimode --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py aimode --query 最佳编程语言学习
python3 scripts/llmchatscraper.py aimode --query 气候变化解决方案 --country GB
可选参数:--country 指定位置(不支持日本和台湾)。
6. Grok 抓取器
抓取 xAI Grok 响应,支持不同模式(快速、专家、自动)。返回包含 fullresponse、usermodel、followupsuggestions、websearchresults 的 JSON 对象。
命令:
bash
python3 scripts/llmchatscraper.py grok --query 你的提示词
示例:
bash
python3 scripts/llmchatscraper.py grok --query 解释量子纠缠
python3 scripts/llmchatscraper.py grok --query AI领域最新动态 --mode MODELMODEEXPERT
python3 scripts/llmchatscraper.py grok --query 最新科技新闻 --mode MODELMODEFAST
可选参数:--country 指定位置(不支持日本和台湾),--mode 指定操作模式。
摘要
| 操作 | 命令 | 参数 | 示例 |
|---|
| ChatGPT | chatgpt | --query | python3 scripts/llmchatscraper.py chatgpt --query AI趋势 |
| Gemini |
gemini | --query | python3 scripts/llm
chatscraper.py gemini --query 最佳餐厅 |
| Perplexity | perplexity | --query | python3 scripts/llm
chatscraper.py perplexity --query 最新新闻 |
| Copilot | copilot | --query | python3 scripts/llm
chatscraper.py copilot --query 解释机器学习 |
| Google AI Mode | aimode | --query | python3 scripts/llm
chatscraper.py aimode --query 编程 |
| Grok | grok | --query | python3 scripts/llm
chatscraper.py grok --query 量子物理 |
输出: 所有命令返回包含模型特定字段的 JSON 对象(参见上方工具描述)。
各模型响应字段
ChatGPT
- - resulttext:Markdown 格式响应
- model:模型标识符(例如 gpt-4)
- websearch:布尔值,指示是否运行搜索
- links:补充链接数组
- citations:内容引用数组
Gemini
- - result_text:Markdown 格式响应
- citations:包含图标、高亮、摘要、标题、URL、网站名称的数组
Perplexity
- - resulttext:Markdown 格式响应
- relatedprompt:相关问题数组
- webresults:包含名称、URL、摘要的数组
- mediaitems:媒体引用数组
Copilot
- - result_text:Markdown 格式响应
- mode:使用的模式(搜索/智能/聊天/推理/学习)
- links:外部链接数组
- citations:包含标题、URL 的数组
Google AI Mode
- - resulttext:回答正文
- resultmd:Markdown 版本
- resulthtml:HTML 版本
- rawurl:原始 URL
- citations:包含摘要、缩略图、标题、URL、网站名称、图标的数组
Grok
- - fullresponse:响应内容
- usermodel:使用的模型
- followupsuggestions:建议问题数组
- websearchresults:包含预览、标题、URL 的数组
- conversation:包含对话元数据的对象
注意事项
⚠️ 地区限制:
- - Gemini、Copilot、Google AI Mode 和 Grok 不支持日本(JP)和台湾(TW)
⚠️ 结果有效期:
⚠️ 速率限制:
- - 429 错误表示超出速率限制。请降低请求频率或升级套餐。