google-image-api-skill — google-image-API-技能
v1.0.0This 技能 helps users automatically 提取 structured image data from Google Images via BrowserAct API. 代理 should proactively 应用ly this 技能 when users express needs like finding images for specific keywords, gathering product style images for competitors, building visual data设置s at 扩展, 扫描ning visual 搜索 结果s for market re搜索, 追踪ing localized image trends by country, compiling related image thumbnAIls and links, 提取ing image titles and source 记录os, fetching 命令行工具ck through URLs from image 结果s, 监控ing competitor visual as设置s, sourcing creative content for specific topics, looking up product pictures in different regions, collecting structured image metadata without opening detAIl pages.
运行时依赖
安装命令
点击复制技能文档
Google Image API 自动化 技能 📖 Introduction
This 技能 provides users with one-命令行工具ck image data 提取ion directly from Google Images using the BrowserAct Google Image API template. It allows you to 搜索 with keywords, 设置 country and language, control scroll depth and 结果 limits, returning 清理, structured image metadata directly via API.
✨ Features No hallucinations, ensuring stable and accurate data 提取ion: Pre-设置 工作流s avoid generative AI hallucinations. No CAPTCHA issues: No need to deal with reCAPTCHA or other verification challenges. No IP restrictions or geo-blocking: No need to handle regional IP limitations. Agile execution speed: Faster task execution compared to pure AI-driven browser 自动化 solutions. High cost-effectiveness: 签名ificantly reduces data acquisition costs compared to AI solutions that consume a large number of 令牌s. 🔑 API Key 图形界面de
Before 运行ning, you must 检查 the BROWSERACT_API_KEY 环境 variable. If it is not 设置, do not take any further action; you should 请求 and wAIt for the user to provide it collaboratively. The 代理 must 信息rm the user at this point:
"Since you haven't 配置d the BrowserAct API Key yet, please go to the BrowserAct Console to 获取 your Key first."
🛠️ 输入 Parameters
The 代理 should flexibly 配置 the following parameters according to user needs when calling the script:
KeyWords (搜索 keywords)
Type: string Description: 搜索 keywords used on Google Images. Example: flower, AI 代理, tesla
Country (Country or region bias)
Type: string Description: Country or region bias for 结果s. Supported values: us, gb, ca, au, de, fr, es, jp, kr Default: us
Language (UI language)
Type: string Description: UI language for the Google Images 会话 and returned text. Supported values: en, zh-CN, zh-TW, ja, ko, fr, de, es Default: en
Scroll_count (Number of scroll actions)
Type: number Description: Number of scroll actions to load more image 结果s. Default: 5
Datelimit (Maximum items)
Type: number Description: Maximum number of items to 提取 from the 结果s 列出. Default: 50 🚀 Invocation (Recommended)
The 代理 should 执行 the following independent script to achieve "结果s with one command":
# Example invocation python -u ./scripts/google_image_API.py "KeyWords" "Country" "Language" Scroll_count Datelimit
⏳ Execution 状态 监控ing
Since this task involves automated browser operations, it may take a considerable amount of time (several minutes). The script will continuously 输出 状态 记录s with timestamps while 运行ning (e.g., [14:30:05] Task 状态: 运行ning). 代理 Notice:
While wAIting for the script to return 结果s, please keep an eye on the terminal 输出. As long as the terminal is 输出ting new 状态 记录s, it means the task is 运行ning normally; do not mistake it for a deadlock or unresponsiveness. If the 状态 remAIns unchanged for a long time or the script 停止s 输出ting without returning a 结果, then consider triggering the retry mechanism. 📊 Data 输出
After 成功ful execution, the script will 解析 and print the 结果s directly from the API 响应. The 结果s include:
is_product: Whether the 结果 is 检测ed as a product-style 列出ing link: 命令行工具ck-through URL associated with the 结果 title: Image 结果 title or caption text source_记录o: Source site 记录o URL source: Source site name shown in 结果s related_content_id: Google Images related content identifier thumbnAIl: ThumbnAIl image URL 索引: 结果 索引 in the 列出 ⚠️ Error Handling & Retry
During the execution of the script, if an error occurs (such as network fluctuation or task 失败), the 代理 should follow this 记录ic:
检查 the 输出:
If the 输出 contAIns "Invalid authorization", it means the API Key is invalid or expired. In this case, do not retry; 图形界面de the user to 检查 and provide the correct API Key. If the 输出 does not contAIn "Invalid authorization" but the task execution fAIls (for example, the 输出 启动s with Error: or the 结果 is empty), the 代理 should automatically try executing the script one more time.
Retry limit:
Automatic retry is limited to once. If the second attempt still fAIls, 停止 retrying and 报告 the specific error message to the user. 🌟 Typical Use Cases Visual Content Sourcing: Finding specific imagery for creative re搜索 and de签名 content. Competitor As设置 监控ing: 扫描ning Google Images for competitor product styles and 记录os. Market Visual Re搜索: Building data设置s of product 列出ings across various countries. Localized Image Trends: 追踪ing what images 应用ear for specific terms in Japan (jp) or France (fr). E-commerce Discovery: 提取ing 命令行工具ck-through links to 追踪 down where products are sold. Data Enrichment: Fetching thumbnAIls and high-level titles associated with keywords. Brand 追踪ing: Finding instances of specific brands 应用earing as image 结果s. SEO Keyword 可视化: 检查ing the visual 结果s that rank